orb-billing 1.14.0 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/orb/client.rb +14 -0
- data/lib/orb/internal/transport/base_client.rb +5 -0
- data/lib/orb/internal/type/union.rb +13 -27
- data/lib/orb/models/accounting_provider_config.rb +14 -3
- data/lib/orb/models/adjustment_interval.rb +185 -3
- data/lib/orb/models/alert.rb +105 -1
- data/lib/orb/models/alert_create_for_subscription_params.rb +120 -7
- data/lib/orb/models/alert_update_params.rb +113 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +2419 -17109
- data/lib/orb/models/beta_create_plan_version_params.rb +2361 -16947
- data/lib/orb/models/changed_subscription_resources.rb +200 -10
- data/lib/orb/models/conversion_rate_config.rb +18 -0
- data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
- data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
- data/lib/orb/models/customer.rb +111 -4
- data/lib/orb/models/customer_create_params.rb +6 -1
- data/lib/orb/models/customer_tax_id.rb +15 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +16 -2
- data/lib/orb/models/customer_update_params.rb +16 -2
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
- data/lib/orb/models/customers/credit_list_response.rb +152 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +4 -4
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +4 -4
- data/lib/orb/models/dimensional_price_group.rb +1 -1
- data/lib/orb/models/discount.rb +145 -1
- data/lib/orb/models/event_ingest_params.rb +5 -2
- data/lib/orb/models/invoice.rb +198 -10
- data/lib/orb/models/invoice_create_params.rb +6 -5
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
- data/lib/orb/models/invoice_issue_summary_response.rb +9 -3
- data/lib/orb/models/invoice_level_discount.rb +145 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +189 -5
- data/lib/orb/models/invoice_list_summary_response.rb +9 -3
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_usage_params.rb +3 -3
- data/lib/orb/models/mutated_subscription.rb +169 -4
- data/lib/orb/models/new_allocation_price.rb +11 -1
- data/lib/orb/models/new_floating_bulk_price.rb +1 -3
- data/lib/orb/models/new_floating_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_floating_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_floating_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_floating_package_price.rb +1 -3
- data/lib/orb/models/new_floating_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_floating_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_floating_tiered_with_proration_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_floating_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/new_plan_bulk_price.rb +1 -1
- data/lib/orb/models/new_plan_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_plan_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_matrix_price.rb +1 -5
- data/lib/orb/models/new_plan_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_plan_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_plan_package_price.rb +1 -5
- data/lib/orb/models/new_plan_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_plan_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_tiered_price.rb +1 -5
- data/lib/orb/models/new_plan_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_plan_unit_price.rb +1 -1
- data/lib/orb/models/new_plan_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_plan_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/new_subscription_bulk_price.rb +1 -3
- data/lib/orb/models/new_subscription_bulk_with_proration_price.rb +1 -3
- data/lib/orb/models/new_subscription_cumulative_grouped_bulk_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_tiered_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_with_metered_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_grouped_with_prorated_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_matrix_with_display_name_price.rb +1 -3
- data/lib/orb/models/new_subscription_max_group_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_minimum_composite_price.rb +1 -3
- data/lib/orb/models/new_subscription_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_package_with_allocation_price.rb +1 -3
- data/lib/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rb +1 -3
- data/lib/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rb +1 -3
- data/lib/orb/models/new_subscription_threshold_total_amount_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_package_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_package_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_price.rb +1 -3
- data/lib/orb/models/new_subscription_tiered_with_minimum_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_with_percent_price.rb +1 -3
- data/lib/orb/models/new_subscription_unit_with_proration_price.rb +1 -3
- data/lib/orb/models/per_price_cost.rb +2 -2
- data/lib/orb/models/plan.rb +189 -9
- data/lib/orb/models/plan_create_params.rb +1047 -8228
- data/lib/orb/models/plan_update_params.rb +9 -1
- data/lib/orb/models/plan_version.rb +186 -5
- data/lib/orb/models/plans/external_plan_id_update_params.rb +9 -1
- data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
- data/lib/orb/models/plans/migration_list_response.rb +22 -4
- data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
- data/lib/orb/models/price.rb +2614 -1268
- data/lib/orb/models/price_create_params.rb +866 -49
- data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
- data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/subscription.rb +168 -4
- data/lib/orb/models/subscription_create_params.rb +2818 -674
- data/lib/orb/models/subscription_price_intervals_params.rb +1098 -57
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +2834 -687
- data/lib/orb/models/subscription_update_params.rb +12 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +14 -3
- data/lib/orb/resources/customers/credits/ledger.rb +28 -14
- data/lib/orb/resources/customers.rb +6 -2
- data/lib/orb/resources/events.rb +7 -34
- data/lib/orb/resources/invoices.rb +6 -2
- data/lib/orb/resources/licenses/external_licenses.rb +1 -1
- data/lib/orb/resources/licenses/usage.rb +2 -2
- data/lib/orb/resources/metrics.rb +5 -5
- data/lib/orb/resources/plans/external_plan_id.rb +5 -3
- data/lib/orb/resources/plans.rb +9 -5
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +5 -5
- data/lib/orb/resources/subscriptions.rb +20 -3
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/models/accounting_provider_config.rbi +38 -5
- data/rbi/orb/models/adjustment_interval.rbi +336 -0
- data/rbi/orb/models/alert.rbi +172 -3
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +268 -9
- data/rbi/orb/models/alert_update_params.rbi +208 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +3833 -28395
- data/rbi/orb/models/beta_create_plan_version_params.rbi +3833 -28363
- data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
- data/rbi/orb/models/conversion_rate_config.rbi +18 -0
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
- data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
- data/rbi/orb/models/customer.rbi +190 -10
- data/rbi/orb/models/customer_create_params.rbi +12 -2
- data/rbi/orb/models/customer_tax_id.rbi +15 -1
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +22 -2
- data/rbi/orb/models/customer_update_params.rbi +22 -2
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
- data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +6 -6
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +6 -6
- data/rbi/orb/models/dimensional_price_group.rbi +1 -1
- data/rbi/orb/models/discount.rbi +269 -1
- data/rbi/orb/models/event_ingest_params.rbi +4 -2
- data/rbi/orb/models/invoice.rbi +360 -5
- data/rbi/orb/models/invoice_create_params.rbi +12 -7
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
- data/rbi/orb/models/invoice_issue_summary_response.rbi +19 -4
- data/rbi/orb/models/invoice_level_discount.rbi +298 -1
- data/rbi/orb/models/invoice_line_item_create_response.rbi +339 -0
- data/rbi/orb/models/invoice_list_summary_response.rbi +19 -4
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +3 -3
- data/rbi/orb/models/mutated_subscription.rbi +324 -2
- data/rbi/orb/models/new_allocation_price.rbi +12 -0
- data/rbi/orb/models/per_price_cost.rbi +3 -0
- data/rbi/orb/models/plan.rbi +339 -2
- data/rbi/orb/models/plan_create_params.rbi +1877 -14138
- data/rbi/orb/models/plan_update_params.rbi +8 -0
- data/rbi/orb/models/plan_version.rbi +339 -0
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +8 -0
- data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
- data/rbi/orb/models/price.rbi +4552 -2285
- data/rbi/orb/models/price_create_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
- data/rbi/orb/models/price_interval.rbi +3 -0
- data/rbi/orb/models/subscription.rbi +324 -2
- data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2127 -264
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +4997 -1185
- data/rbi/orb/models/subscription_update_params.rbi +14 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +39 -4
- data/rbi/orb/resources/customers/credits/ledger.rbi +28 -14
- data/rbi/orb/resources/customers.rbi +23 -0
- data/rbi/orb/resources/events.rbi +8 -35
- data/rbi/orb/resources/invoices.rbi +9 -3
- data/rbi/orb/resources/licenses/external_licenses.rbi +1 -1
- data/rbi/orb/resources/licenses/usage.rbi +2 -2
- data/rbi/orb/resources/metrics.rbi +5 -5
- data/rbi/orb/resources/plans/external_plan_id.rbi +5 -2
- data/rbi/orb/resources/plans.rbi +9 -3
- data/rbi/orb/resources/prices.rbi +3 -0
- data/rbi/orb/resources/subscriptions.rbi +29 -0
- data/sig/orb/models/accounting_provider_config.rbs +21 -4
- data/sig/orb/models/adjustment_interval.rbs +134 -0
- data/sig/orb/models/alert.rbs +85 -3
- data/sig/orb/models/alert_create_for_subscription_params.rbs +86 -4
- data/sig/orb/models/alert_update_params.rbs +86 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +1803 -11601
- data/sig/orb/models/beta_create_plan_version_params.rbs +1747 -11541
- data/sig/orb/models/changed_subscription_resources.rbs +140 -1
- data/sig/orb/models/conversion_rate_config.rbs +12 -0
- data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
- data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
- data/sig/orb/models/customer.rbs +70 -4
- data/sig/orb/models/customer_create_params.rbs +2 -2
- data/sig/orb/models/customer_tax_id.rbs +20 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +7 -2
- data/sig/orb/models/customer_update_params.rbs +7 -2
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
- data/sig/orb/models/customers/credit_list_response.rbs +124 -3
- data/sig/orb/models/discount.rbs +114 -0
- data/sig/orb/models/invoice.rbs +140 -1
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
- data/sig/orb/models/invoice_issue_summary_response.rbs +2 -1
- data/sig/orb/models/invoice_level_discount.rbs +117 -1
- data/sig/orb/models/invoice_line_item_create_response.rbs +134 -0
- data/sig/orb/models/invoice_list_summary_response.rbs +2 -1
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +4 -4
- data/sig/orb/models/mutated_subscription.rbs +124 -0
- data/sig/orb/models/new_allocation_price.rbs +5 -0
- data/sig/orb/models/new_floating_bulk_price.rbs +4 -4
- data/sig/orb/models/new_floating_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_floating_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_floating_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_floating_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_floating_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_floating_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_floating_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_floating_tiered_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_floating_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_plan_bulk_price.rbs +4 -4
- data/sig/orb/models/new_plan_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_plan_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_plan_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_plan_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_plan_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_plan_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_plan_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_price.rbs +4 -4
- data/sig/orb/models/new_plan_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_plan_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_subscription_bulk_price.rbs +4 -4
- data/sig/orb/models/new_subscription_bulk_with_proration_price.rbs +4 -4
- data/sig/orb/models/new_subscription_cumulative_grouped_bulk_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_tiered_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_with_metered_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_grouped_with_prorated_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_matrix_with_display_name_price.rbs +4 -4
- data/sig/orb/models/new_subscription_max_group_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_minimum_composite_price.rbs +4 -4
- data/sig/orb/models/new_subscription_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_package_with_allocation_price.rbs +4 -4
- data/sig/orb/models/new_subscription_scalable_matrix_with_tiered_pricing_price.rbs +4 -4
- data/sig/orb/models/new_subscription_scalable_matrix_with_unit_pricing_price.rbs +4 -4
- data/sig/orb/models/new_subscription_threshold_total_amount_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_package_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_package_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_price.rbs +4 -4
- data/sig/orb/models/new_subscription_tiered_with_minimum_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_with_percent_price.rbs +4 -4
- data/sig/orb/models/new_subscription_unit_with_proration_price.rbs +4 -4
- data/sig/orb/models/plan.rbs +134 -0
- data/sig/orb/models/plan_create_params.rbs +836 -5728
- data/sig/orb/models/plan_update_params.rbs +5 -0
- data/sig/orb/models/plan_version.rbs +134 -0
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +5 -0
- data/sig/orb/models/price.rbs +2200 -1150
- data/sig/orb/models/price_create_params.rbs +611 -23
- data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
- data/sig/orb/models/subscription.rbs +124 -0
- data/sig/orb/models/subscription_create_params.rbs +2009 -430
- data/sig/orb/models/subscription_price_intervals_params.rbs +795 -23
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2009 -430
- data/sig/orb/models/subscription_update_params.rbs +5 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/alerts.rbs +5 -1
- data/sig/orb/resources/customers.rbs +2 -0
- data/sig/orb/resources/licenses/external_licenses.rbs +1 -1
- data/sig/orb/resources/licenses/usage.rbs +2 -2
- data/sig/orb/resources/plans/external_plan_id.rbs +1 -0
- data/sig/orb/resources/plans.rbs +2 -0
- data/sig/orb/resources/subscriptions.rbs +3 -0
- metadata +6 -7
|
@@ -119,11 +119,13 @@ module Orb
|
|
|
119
119
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
120
120
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
121
121
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
122
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
122
123
|
# | Finland | `eu_vat` | European VAT Number |
|
|
123
124
|
# | France | `eu_vat` | European VAT Number |
|
|
124
125
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
125
126
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
126
127
|
# | Germany | `eu_vat` | European VAT Number |
|
|
128
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
127
129
|
# | Greece | `eu_vat` | European VAT Number |
|
|
128
130
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
129
131
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -135,6 +137,7 @@ module Orb
|
|
|
135
137
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
136
138
|
# | Israel | `il_vat` | Israel VAT |
|
|
137
139
|
# | Italy | `eu_vat` | European VAT Number |
|
|
140
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
138
141
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
139
142
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
140
143
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -165,6 +168,7 @@ module Orb
|
|
|
165
168
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
166
169
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
167
170
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
171
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
168
172
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
169
173
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
170
174
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -186,6 +190,7 @@ module Orb
|
|
|
186
190
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
187
191
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
188
192
|
# | Spain | `eu_vat` | European VAT Number |
|
|
193
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
189
194
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
190
195
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
191
196
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -226,8 +231,8 @@ module Orb
|
|
|
226
231
|
sig { returns(T.nilable(Time)) }
|
|
227
232
|
attr_accessor :eligible_to_issue_at
|
|
228
233
|
|
|
229
|
-
# A URL for the customer-facing invoice portal. This URL expires
|
|
230
|
-
#
|
|
234
|
+
# A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
235
|
+
# link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
231
236
|
sig { returns(T.nilable(String)) }
|
|
232
237
|
attr_accessor :hosted_invoice_url
|
|
233
238
|
|
|
@@ -462,11 +467,13 @@ module Orb
|
|
|
462
467
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
463
468
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
464
469
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
470
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
465
471
|
# | Finland | `eu_vat` | European VAT Number |
|
|
466
472
|
# | France | `eu_vat` | European VAT Number |
|
|
467
473
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
468
474
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
469
475
|
# | Germany | `eu_vat` | European VAT Number |
|
|
476
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
470
477
|
# | Greece | `eu_vat` | European VAT Number |
|
|
471
478
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
472
479
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -478,6 +485,7 @@ module Orb
|
|
|
478
485
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
479
486
|
# | Israel | `il_vat` | Israel VAT |
|
|
480
487
|
# | Italy | `eu_vat` | European VAT Number |
|
|
488
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
481
489
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
482
490
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
483
491
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -508,6 +516,7 @@ module Orb
|
|
|
508
516
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
509
517
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
510
518
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
519
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
511
520
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
512
521
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
513
522
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -529,6 +538,7 @@ module Orb
|
|
|
529
538
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
530
539
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
531
540
|
# | Spain | `eu_vat` | European VAT Number |
|
|
541
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
532
542
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
533
543
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
534
544
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -558,8 +568,8 @@ module Orb
|
|
|
558
568
|
# will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
|
|
559
569
|
# true, the invoice will automatically begin issuing at this time.
|
|
560
570
|
eligible_to_issue_at:,
|
|
561
|
-
# A URL for the customer-facing invoice portal. This URL expires
|
|
562
|
-
#
|
|
571
|
+
# A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
572
|
+
# link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
563
573
|
hosted_invoice_url:,
|
|
564
574
|
# The scheduled date of the invoice
|
|
565
575
|
invoice_date:,
|
|
@@ -1196,6 +1206,11 @@ module Orb
|
|
|
1196
1206
|
:stripe,
|
|
1197
1207
|
Orb::Models::InvoiceListSummaryResponse::PaymentAttempt::PaymentProvider::TaggedSymbol
|
|
1198
1208
|
)
|
|
1209
|
+
ADYEN =
|
|
1210
|
+
T.let(
|
|
1211
|
+
:adyen,
|
|
1212
|
+
Orb::Models::InvoiceListSummaryResponse::PaymentAttempt::PaymentProvider::TaggedSymbol
|
|
1213
|
+
)
|
|
1199
1214
|
|
|
1200
1215
|
sig do
|
|
1201
1216
|
override.returns(
|
|
@@ -37,7 +37,7 @@ module Orb
|
|
|
37
37
|
|
|
38
38
|
# How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,
|
|
39
39
|
# 'license,day').
|
|
40
|
-
sig { returns(T.nilable(
|
|
40
|
+
sig { returns(T.nilable(String)) }
|
|
41
41
|
attr_accessor :group_by
|
|
42
42
|
|
|
43
43
|
# Maximum number of rows in the response data (default 20, max 100).
|
|
@@ -59,7 +59,7 @@ module Orb
|
|
|
59
59
|
subscription_id: String,
|
|
60
60
|
cursor: T.nilable(String),
|
|
61
61
|
end_date: T.nilable(Date),
|
|
62
|
-
group_by: T.nilable(
|
|
62
|
+
group_by: T.nilable(String),
|
|
63
63
|
limit: Integer,
|
|
64
64
|
start_date: T.nilable(Date),
|
|
65
65
|
request_options: Orb::RequestOptions::OrHash
|
|
@@ -96,7 +96,7 @@ module Orb
|
|
|
96
96
|
subscription_id: String,
|
|
97
97
|
cursor: T.nilable(String),
|
|
98
98
|
end_date: T.nilable(Date),
|
|
99
|
-
group_by: T.nilable(
|
|
99
|
+
group_by: T.nilable(String),
|
|
100
100
|
limit: Integer,
|
|
101
101
|
start_date: T.nilable(Date),
|
|
102
102
|
request_options: Orb::RequestOptions
|
|
@@ -31,7 +31,7 @@ module Orb
|
|
|
31
31
|
|
|
32
32
|
# How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,
|
|
33
33
|
# 'license,day').
|
|
34
|
-
sig { returns(T.nilable(
|
|
34
|
+
sig { returns(T.nilable(String)) }
|
|
35
35
|
attr_accessor :group_by
|
|
36
36
|
|
|
37
37
|
# Maximum number of rows in the response data (default 20, max 100).
|
|
@@ -52,7 +52,7 @@ module Orb
|
|
|
52
52
|
subscription_id: String,
|
|
53
53
|
cursor: T.nilable(String),
|
|
54
54
|
end_date: T.nilable(Date),
|
|
55
|
-
group_by: T.nilable(
|
|
55
|
+
group_by: T.nilable(String),
|
|
56
56
|
limit: Integer,
|
|
57
57
|
start_date: T.nilable(Date),
|
|
58
58
|
request_options: Orb::RequestOptions::OrHash
|
|
@@ -87,7 +87,7 @@ module Orb
|
|
|
87
87
|
subscription_id: String,
|
|
88
88
|
cursor: T.nilable(String),
|
|
89
89
|
end_date: T.nilable(Date),
|
|
90
|
-
group_by: T.nilable(
|
|
90
|
+
group_by: T.nilable(String),
|
|
91
91
|
limit: Integer,
|
|
92
92
|
start_date: T.nilable(Date),
|
|
93
93
|
request_options: Orb::RequestOptions
|
|
@@ -26,7 +26,7 @@ module Orb
|
|
|
26
26
|
|
|
27
27
|
# How to group the results. Valid values: 'license', 'day'. Can be combined (e.g.,
|
|
28
28
|
# 'license,day').
|
|
29
|
-
sig { returns(T.nilable(
|
|
29
|
+
sig { returns(T.nilable(String)) }
|
|
30
30
|
attr_accessor :group_by
|
|
31
31
|
|
|
32
32
|
# Maximum number of rows in the response data (default 20, max 100).
|
|
@@ -46,7 +46,7 @@ module Orb
|
|
|
46
46
|
license_id: String,
|
|
47
47
|
cursor: T.nilable(String),
|
|
48
48
|
end_date: T.nilable(Date),
|
|
49
|
-
group_by: T.nilable(
|
|
49
|
+
group_by: T.nilable(String),
|
|
50
50
|
limit: Integer,
|
|
51
51
|
start_date: T.nilable(Date),
|
|
52
52
|
request_options: Orb::RequestOptions::OrHash
|
|
@@ -77,7 +77,7 @@ module Orb
|
|
|
77
77
|
license_id: String,
|
|
78
78
|
cursor: T.nilable(String),
|
|
79
79
|
end_date: T.nilable(Date),
|
|
80
|
-
group_by: T.nilable(
|
|
80
|
+
group_by: T.nilable(String),
|
|
81
81
|
limit: Integer,
|
|
82
82
|
start_date: T.nilable(Date),
|
|
83
83
|
request_options: Orb::RequestOptions
|
|
@@ -25,6 +25,13 @@ module Orb
|
|
|
25
25
|
sig { returns(T.nilable(T::Boolean)) }
|
|
26
26
|
attr_accessor :auto_collection
|
|
27
27
|
|
|
28
|
+
# Determines whether invoices for this subscription will be automatically issued.
|
|
29
|
+
# This resolves the effective setting for the subscription: a subscription-level
|
|
30
|
+
# override if set, otherwise the customer-level setting, otherwise the
|
|
31
|
+
# account-level default.
|
|
32
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
33
|
+
attr_accessor :auto_issuance
|
|
34
|
+
|
|
28
35
|
sig { returns(Orb::BillingCycleAnchorConfiguration) }
|
|
29
36
|
attr_reader :billing_cycle_anchor_configuration
|
|
30
37
|
|
|
@@ -199,6 +206,7 @@ module Orb
|
|
|
199
206
|
active_plan_phase_order: T.nilable(Integer),
|
|
200
207
|
adjustment_intervals: T::Array[Orb::AdjustmentInterval::OrHash],
|
|
201
208
|
auto_collection: T.nilable(T::Boolean),
|
|
209
|
+
auto_issuance: T.nilable(T::Boolean),
|
|
202
210
|
billing_cycle_anchor_configuration:
|
|
203
211
|
Orb::BillingCycleAnchorConfiguration::OrHash,
|
|
204
212
|
billing_cycle_day: Integer,
|
|
@@ -212,7 +220,8 @@ module Orb
|
|
|
212
220
|
T.any(
|
|
213
221
|
Orb::AmountDiscountInterval::OrHash,
|
|
214
222
|
Orb::PercentageDiscountInterval::OrHash,
|
|
215
|
-
Orb::UsageDiscountInterval::OrHash
|
|
223
|
+
Orb::UsageDiscountInterval::OrHash,
|
|
224
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::OrHash
|
|
216
225
|
)
|
|
217
226
|
],
|
|
218
227
|
end_date: T.nilable(Time),
|
|
@@ -248,6 +257,11 @@ module Orb
|
|
|
248
257
|
# charged with the saved payment method on the due date. This property defaults to
|
|
249
258
|
# the plan's behavior. If null, defaults to the customer's setting.
|
|
250
259
|
auto_collection:,
|
|
260
|
+
# Determines whether invoices for this subscription will be automatically issued.
|
|
261
|
+
# This resolves the effective setting for the subscription: a subscription-level
|
|
262
|
+
# override if set, otherwise the customer-level setting, otherwise the
|
|
263
|
+
# account-level default.
|
|
264
|
+
auto_issuance:,
|
|
251
265
|
billing_cycle_anchor_configuration:,
|
|
252
266
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
|
253
267
|
# number of days in a month is greater than this value, the last day of the month
|
|
@@ -338,6 +352,7 @@ module Orb
|
|
|
338
352
|
active_plan_phase_order: T.nilable(Integer),
|
|
339
353
|
adjustment_intervals: T::Array[Orb::AdjustmentInterval],
|
|
340
354
|
auto_collection: T.nilable(T::Boolean),
|
|
355
|
+
auto_issuance: T.nilable(T::Boolean),
|
|
341
356
|
billing_cycle_anchor_configuration:
|
|
342
357
|
Orb::BillingCycleAnchorConfiguration,
|
|
343
358
|
billing_cycle_day: Integer,
|
|
@@ -380,9 +395,316 @@ module Orb
|
|
|
380
395
|
T.any(
|
|
381
396
|
Orb::AmountDiscountInterval,
|
|
382
397
|
Orb::PercentageDiscountInterval,
|
|
383
|
-
Orb::UsageDiscountInterval
|
|
398
|
+
Orb::UsageDiscountInterval,
|
|
399
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage
|
|
400
|
+
)
|
|
401
|
+
end
|
|
402
|
+
|
|
403
|
+
class TieredPercentage < Orb::Internal::Type::BaseModel
|
|
404
|
+
OrHash =
|
|
405
|
+
T.type_alias do
|
|
406
|
+
T.any(
|
|
407
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage,
|
|
408
|
+
Orb::Internal::AnyHash
|
|
409
|
+
)
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# The price interval ids that this discount interval applies to.
|
|
413
|
+
sig { returns(T::Array[String]) }
|
|
414
|
+
attr_accessor :applies_to_price_interval_ids
|
|
415
|
+
|
|
416
|
+
sig { returns(Symbol) }
|
|
417
|
+
attr_accessor :discount_type
|
|
418
|
+
|
|
419
|
+
# The end date of the discount interval.
|
|
420
|
+
sig { returns(T.nilable(Time)) }
|
|
421
|
+
attr_accessor :end_date
|
|
422
|
+
|
|
423
|
+
# The filters that determine which prices this discount interval applies to.
|
|
424
|
+
sig do
|
|
425
|
+
returns(
|
|
426
|
+
T::Array[
|
|
427
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter
|
|
428
|
+
]
|
|
429
|
+
)
|
|
430
|
+
end
|
|
431
|
+
attr_accessor :filters
|
|
432
|
+
|
|
433
|
+
# The start date of the discount interval.
|
|
434
|
+
sig { returns(Time) }
|
|
435
|
+
attr_accessor :start_date
|
|
436
|
+
|
|
437
|
+
# Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
438
|
+
# bands of cumulative eligible spend, each discounted at its own percentage.
|
|
439
|
+
sig do
|
|
440
|
+
returns(
|
|
441
|
+
T::Array[
|
|
442
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Tier
|
|
443
|
+
]
|
|
444
|
+
)
|
|
445
|
+
end
|
|
446
|
+
attr_accessor :tiers
|
|
447
|
+
|
|
448
|
+
sig do
|
|
449
|
+
params(
|
|
450
|
+
applies_to_price_interval_ids: T::Array[String],
|
|
451
|
+
end_date: T.nilable(Time),
|
|
452
|
+
filters:
|
|
453
|
+
T::Array[
|
|
454
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::OrHash
|
|
455
|
+
],
|
|
456
|
+
start_date: Time,
|
|
457
|
+
tiers:
|
|
458
|
+
T::Array[
|
|
459
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Tier::OrHash
|
|
460
|
+
],
|
|
461
|
+
discount_type: Symbol
|
|
462
|
+
).returns(T.attached_class)
|
|
463
|
+
end
|
|
464
|
+
def self.new(
|
|
465
|
+
# The price interval ids that this discount interval applies to.
|
|
466
|
+
applies_to_price_interval_ids:,
|
|
467
|
+
# The end date of the discount interval.
|
|
468
|
+
end_date:,
|
|
469
|
+
# The filters that determine which prices this discount interval applies to.
|
|
470
|
+
filters:,
|
|
471
|
+
# The start date of the discount interval.
|
|
472
|
+
start_date:,
|
|
473
|
+
# Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
474
|
+
# bands of cumulative eligible spend, each discounted at its own percentage.
|
|
475
|
+
tiers:,
|
|
476
|
+
discount_type: :tiered_percentage
|
|
477
|
+
)
|
|
478
|
+
end
|
|
479
|
+
|
|
480
|
+
sig do
|
|
481
|
+
override.returns(
|
|
482
|
+
{
|
|
483
|
+
applies_to_price_interval_ids: T::Array[String],
|
|
484
|
+
discount_type: Symbol,
|
|
485
|
+
end_date: T.nilable(Time),
|
|
486
|
+
filters:
|
|
487
|
+
T::Array[
|
|
488
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter
|
|
489
|
+
],
|
|
490
|
+
start_date: Time,
|
|
491
|
+
tiers:
|
|
492
|
+
T::Array[
|
|
493
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Tier
|
|
494
|
+
]
|
|
495
|
+
}
|
|
496
|
+
)
|
|
497
|
+
end
|
|
498
|
+
def to_hash
|
|
499
|
+
end
|
|
500
|
+
|
|
501
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
502
|
+
OrHash =
|
|
503
|
+
T.type_alias do
|
|
504
|
+
T.any(
|
|
505
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter,
|
|
506
|
+
Orb::Internal::AnyHash
|
|
507
|
+
)
|
|
508
|
+
end
|
|
509
|
+
|
|
510
|
+
# The property of the price to filter on.
|
|
511
|
+
sig do
|
|
512
|
+
returns(
|
|
513
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
514
|
+
)
|
|
515
|
+
end
|
|
516
|
+
attr_accessor :field
|
|
517
|
+
|
|
518
|
+
# Should prices that match the filter be included or excluded.
|
|
519
|
+
sig do
|
|
520
|
+
returns(
|
|
521
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator::TaggedSymbol
|
|
522
|
+
)
|
|
523
|
+
end
|
|
524
|
+
attr_accessor :operator
|
|
525
|
+
|
|
526
|
+
# The IDs or values that match this filter.
|
|
527
|
+
sig { returns(T::Array[String]) }
|
|
528
|
+
attr_accessor :values
|
|
529
|
+
|
|
530
|
+
sig do
|
|
531
|
+
params(
|
|
532
|
+
field:
|
|
533
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::OrSymbol,
|
|
534
|
+
operator:
|
|
535
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator::OrSymbol,
|
|
536
|
+
values: T::Array[String]
|
|
537
|
+
).returns(T.attached_class)
|
|
538
|
+
end
|
|
539
|
+
def self.new(
|
|
540
|
+
# The property of the price to filter on.
|
|
541
|
+
field:,
|
|
542
|
+
# Should prices that match the filter be included or excluded.
|
|
543
|
+
operator:,
|
|
544
|
+
# The IDs or values that match this filter.
|
|
545
|
+
values:
|
|
546
|
+
)
|
|
547
|
+
end
|
|
548
|
+
|
|
549
|
+
sig do
|
|
550
|
+
override.returns(
|
|
551
|
+
{
|
|
552
|
+
field:
|
|
553
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol,
|
|
554
|
+
operator:
|
|
555
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator::TaggedSymbol,
|
|
556
|
+
values: T::Array[String]
|
|
557
|
+
}
|
|
558
|
+
)
|
|
559
|
+
end
|
|
560
|
+
def to_hash
|
|
561
|
+
end
|
|
562
|
+
|
|
563
|
+
# The property of the price to filter on.
|
|
564
|
+
module Field
|
|
565
|
+
extend Orb::Internal::Type::Enum
|
|
566
|
+
|
|
567
|
+
TaggedSymbol =
|
|
568
|
+
T.type_alias do
|
|
569
|
+
T.all(
|
|
570
|
+
Symbol,
|
|
571
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field
|
|
572
|
+
)
|
|
573
|
+
end
|
|
574
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
575
|
+
|
|
576
|
+
PRICE_ID =
|
|
577
|
+
T.let(
|
|
578
|
+
:price_id,
|
|
579
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
580
|
+
)
|
|
581
|
+
ITEM_ID =
|
|
582
|
+
T.let(
|
|
583
|
+
:item_id,
|
|
584
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
585
|
+
)
|
|
586
|
+
PRICE_TYPE =
|
|
587
|
+
T.let(
|
|
588
|
+
:price_type,
|
|
589
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
590
|
+
)
|
|
591
|
+
CURRENCY =
|
|
592
|
+
T.let(
|
|
593
|
+
:currency,
|
|
594
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
595
|
+
)
|
|
596
|
+
PRICING_UNIT_ID =
|
|
597
|
+
T.let(
|
|
598
|
+
:pricing_unit_id,
|
|
599
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
600
|
+
)
|
|
601
|
+
|
|
602
|
+
sig do
|
|
603
|
+
override.returns(
|
|
604
|
+
T::Array[
|
|
605
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Field::TaggedSymbol
|
|
606
|
+
]
|
|
607
|
+
)
|
|
608
|
+
end
|
|
609
|
+
def self.values
|
|
610
|
+
end
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
# Should prices that match the filter be included or excluded.
|
|
614
|
+
module Operator
|
|
615
|
+
extend Orb::Internal::Type::Enum
|
|
616
|
+
|
|
617
|
+
TaggedSymbol =
|
|
618
|
+
T.type_alias do
|
|
619
|
+
T.all(
|
|
620
|
+
Symbol,
|
|
621
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator
|
|
622
|
+
)
|
|
623
|
+
end
|
|
624
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
625
|
+
|
|
626
|
+
INCLUDES =
|
|
627
|
+
T.let(
|
|
628
|
+
:includes,
|
|
629
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator::TaggedSymbol
|
|
630
|
+
)
|
|
631
|
+
EXCLUDES =
|
|
632
|
+
T.let(
|
|
633
|
+
:excludes,
|
|
634
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator::TaggedSymbol
|
|
635
|
+
)
|
|
636
|
+
|
|
637
|
+
sig do
|
|
638
|
+
override.returns(
|
|
639
|
+
T::Array[
|
|
640
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Filter::Operator::TaggedSymbol
|
|
641
|
+
]
|
|
642
|
+
)
|
|
643
|
+
end
|
|
644
|
+
def self.values
|
|
645
|
+
end
|
|
646
|
+
end
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
650
|
+
OrHash =
|
|
651
|
+
T.type_alias do
|
|
652
|
+
T.any(
|
|
653
|
+
Orb::MutatedSubscription::DiscountInterval::TieredPercentage::Tier,
|
|
654
|
+
Orb::Internal::AnyHash
|
|
655
|
+
)
|
|
656
|
+
end
|
|
657
|
+
|
|
658
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
659
|
+
sig { returns(Float) }
|
|
660
|
+
attr_accessor :lower_bound
|
|
661
|
+
|
|
662
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
663
|
+
# tier.
|
|
664
|
+
sig { returns(Float) }
|
|
665
|
+
attr_accessor :percentage
|
|
666
|
+
|
|
667
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
668
|
+
# open-ended tier.
|
|
669
|
+
sig { returns(T.nilable(Float)) }
|
|
670
|
+
attr_accessor :upper_bound
|
|
671
|
+
|
|
672
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
673
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
674
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
675
|
+
# open-ended final tier.
|
|
676
|
+
sig do
|
|
677
|
+
params(
|
|
678
|
+
lower_bound: Float,
|
|
679
|
+
percentage: Float,
|
|
680
|
+
upper_bound: T.nilable(Float)
|
|
681
|
+
).returns(T.attached_class)
|
|
682
|
+
end
|
|
683
|
+
def self.new(
|
|
684
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
685
|
+
lower_bound:,
|
|
686
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
687
|
+
# tier.
|
|
688
|
+
percentage:,
|
|
689
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
690
|
+
# open-ended tier.
|
|
691
|
+
upper_bound: nil
|
|
384
692
|
)
|
|
693
|
+
end
|
|
694
|
+
|
|
695
|
+
sig do
|
|
696
|
+
override.returns(
|
|
697
|
+
{
|
|
698
|
+
lower_bound: Float,
|
|
699
|
+
percentage: Float,
|
|
700
|
+
upper_bound: T.nilable(Float)
|
|
701
|
+
}
|
|
702
|
+
)
|
|
703
|
+
end
|
|
704
|
+
def to_hash
|
|
705
|
+
end
|
|
385
706
|
end
|
|
707
|
+
end
|
|
386
708
|
|
|
387
709
|
sig do
|
|
388
710
|
override.returns(
|
|
@@ -47,6 +47,12 @@ module Orb
|
|
|
47
47
|
sig { returns(T.nilable(String)) }
|
|
48
48
|
attr_accessor :license_type_id
|
|
49
49
|
|
|
50
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
51
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
52
|
+
# by setting `metadata` to `null`.
|
|
53
|
+
sig { returns(T.nilable(T::Hash[Symbol, T.nilable(String)])) }
|
|
54
|
+
attr_accessor :metadata
|
|
55
|
+
|
|
50
56
|
# The (per-unit) cost basis of each created block. If non-zero, a customer will be
|
|
51
57
|
# invoiced according to the quantity and per unit cost basis specified for the
|
|
52
58
|
# allocation each cadence.
|
|
@@ -66,6 +72,7 @@ module Orb
|
|
|
66
72
|
filters: T.nilable(T::Array[Orb::NewAllocationPrice::Filter::OrHash]),
|
|
67
73
|
item_id: T.nilable(String),
|
|
68
74
|
license_type_id: T.nilable(String),
|
|
75
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
69
76
|
per_unit_cost_basis: String
|
|
70
77
|
).returns(T.attached_class)
|
|
71
78
|
end
|
|
@@ -90,6 +97,10 @@ module Orb
|
|
|
90
97
|
item_id: nil,
|
|
91
98
|
# The license type ID to associate the price with license allocation.
|
|
92
99
|
license_type_id: nil,
|
|
100
|
+
# User-specified key/value pairs for the resource. Individual keys can be removed
|
|
101
|
+
# by setting the value to `null`, and the entire metadata mapping can be cleared
|
|
102
|
+
# by setting `metadata` to `null`.
|
|
103
|
+
metadata: nil,
|
|
93
104
|
# The (per-unit) cost basis of each created block. If non-zero, a customer will be
|
|
94
105
|
# invoiced according to the quantity and per unit cost basis specified for the
|
|
95
106
|
# allocation each cadence.
|
|
@@ -108,6 +119,7 @@ module Orb
|
|
|
108
119
|
filters: T.nilable(T::Array[Orb::NewAllocationPrice::Filter]),
|
|
109
120
|
item_id: T.nilable(String),
|
|
110
121
|
license_type_id: T.nilable(String),
|
|
122
|
+
metadata: T.nilable(T::Hash[Symbol, T.nilable(String)]),
|
|
111
123
|
per_unit_cost_basis: String
|
|
112
124
|
}
|
|
113
125
|
)
|
|
@@ -43,6 +43,7 @@ module Orb
|
|
|
43
43
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
44
44
|
Orb::Price::UnitWithPercent::OrHash,
|
|
45
45
|
Orb::Price::MatrixWithAllocation::OrHash,
|
|
46
|
+
Orb::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
46
47
|
Orb::Price::TieredWithProration::OrHash,
|
|
47
48
|
Orb::Price::UnitWithProration::OrHash,
|
|
48
49
|
Orb::Price::GroupedAllocation::OrHash,
|
|
@@ -57,6 +58,8 @@ module Orb
|
|
|
57
58
|
Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
|
|
58
59
|
Orb::Price::CumulativeGroupedBulk::OrHash,
|
|
59
60
|
Orb::Price::CumulativeGroupedAllocation::OrHash,
|
|
61
|
+
Orb::Price::DailyCreditAllowance::OrHash,
|
|
62
|
+
Orb::Price::MeteredAllowance::OrHash,
|
|
60
63
|
Orb::Price::MinimumComposite::OrHash,
|
|
61
64
|
Orb::Price::Percent::OrHash,
|
|
62
65
|
Orb::Price::EventOutput::OrHash
|