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
|
@@ -189,11 +189,13 @@ module Orb
|
|
|
189
189
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
190
190
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
191
191
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
192
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
192
193
|
# | Finland | `eu_vat` | European VAT Number |
|
|
193
194
|
# | France | `eu_vat` | European VAT Number |
|
|
194
195
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
195
196
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
196
197
|
# | Germany | `eu_vat` | European VAT Number |
|
|
198
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
197
199
|
# | Greece | `eu_vat` | European VAT Number |
|
|
198
200
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
199
201
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -205,6 +207,7 @@ module Orb
|
|
|
205
207
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
206
208
|
# | Israel | `il_vat` | Israel VAT |
|
|
207
209
|
# | Italy | `eu_vat` | European VAT Number |
|
|
210
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
208
211
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
209
212
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
210
213
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -235,6 +238,7 @@ module Orb
|
|
|
235
238
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
236
239
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
237
240
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
241
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
238
242
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
239
243
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
240
244
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -256,6 +260,7 @@ module Orb
|
|
|
256
260
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
257
261
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
258
262
|
# | Spain | `eu_vat` | European VAT Number |
|
|
263
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
259
264
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
260
265
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
261
266
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -305,8 +310,8 @@ module Orb
|
|
|
305
310
|
sig { returns(T.nilable(Time)) }
|
|
306
311
|
attr_accessor :eligible_to_issue_at
|
|
307
312
|
|
|
308
|
-
# A URL for the customer-facing invoice portal. This URL expires
|
|
309
|
-
#
|
|
313
|
+
# A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
314
|
+
# link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
310
315
|
sig { returns(T.nilable(String)) }
|
|
311
316
|
attr_accessor :hosted_invoice_url
|
|
312
317
|
|
|
@@ -487,7 +492,8 @@ module Orb
|
|
|
487
492
|
T.any(
|
|
488
493
|
Orb::PercentageDiscount::OrHash,
|
|
489
494
|
Orb::AmountDiscount::OrHash,
|
|
490
|
-
Orb::TrialDiscount::OrHash
|
|
495
|
+
Orb::TrialDiscount::OrHash,
|
|
496
|
+
Orb::InvoiceLevelDiscount::TieredPercentage::OrHash
|
|
491
497
|
)
|
|
492
498
|
],
|
|
493
499
|
due_date: T.nilable(Time),
|
|
@@ -602,11 +608,13 @@ module Orb
|
|
|
602
608
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
603
609
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
604
610
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
611
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
605
612
|
# | Finland | `eu_vat` | European VAT Number |
|
|
606
613
|
# | France | `eu_vat` | European VAT Number |
|
|
607
614
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
608
615
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
609
616
|
# | Germany | `eu_vat` | European VAT Number |
|
|
617
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
610
618
|
# | Greece | `eu_vat` | European VAT Number |
|
|
611
619
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
612
620
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -618,6 +626,7 @@ module Orb
|
|
|
618
626
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
619
627
|
# | Israel | `il_vat` | Israel VAT |
|
|
620
628
|
# | Italy | `eu_vat` | European VAT Number |
|
|
629
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
621
630
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
622
631
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
623
632
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -648,6 +657,7 @@ module Orb
|
|
|
648
657
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
649
658
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
650
659
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
660
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
651
661
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
652
662
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
653
663
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -669,6 +679,7 @@ module Orb
|
|
|
669
679
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
670
680
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
671
681
|
# | Spain | `eu_vat` | European VAT Number |
|
|
682
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
672
683
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
673
684
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
674
685
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -703,8 +714,8 @@ module Orb
|
|
|
703
714
|
# will be eligible to be issued, otherwise it will be `null`. If `auto-issue` is
|
|
704
715
|
# true, the invoice will automatically begin issuing at this time.
|
|
705
716
|
eligible_to_issue_at:,
|
|
706
|
-
# A URL for the customer-facing invoice portal. This URL expires
|
|
707
|
-
#
|
|
717
|
+
# A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
718
|
+
# link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
708
719
|
hosted_invoice_url:,
|
|
709
720
|
# The scheduled date of the invoice
|
|
710
721
|
invoice_date:,
|
|
@@ -1371,6 +1382,7 @@ module Orb
|
|
|
1371
1382
|
Orb::MonetaryUsageDiscountAdjustment::OrHash,
|
|
1372
1383
|
Orb::MonetaryAmountDiscountAdjustment::OrHash,
|
|
1373
1384
|
Orb::MonetaryPercentageDiscountAdjustment::OrHash,
|
|
1385
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::OrHash,
|
|
1374
1386
|
Orb::MonetaryMinimumAdjustment::OrHash,
|
|
1375
1387
|
Orb::MonetaryMaximumAdjustment::OrHash
|
|
1376
1388
|
)
|
|
@@ -1398,6 +1410,7 @@ module Orb
|
|
|
1398
1410
|
Orb::Price::PackageWithAllocation::OrHash,
|
|
1399
1411
|
Orb::Price::UnitWithPercent::OrHash,
|
|
1400
1412
|
Orb::Price::MatrixWithAllocation::OrHash,
|
|
1413
|
+
Orb::Price::MatrixWithThresholdDiscounts::OrHash,
|
|
1401
1414
|
Orb::Price::TieredWithProration::OrHash,
|
|
1402
1415
|
Orb::Price::UnitWithProration::OrHash,
|
|
1403
1416
|
Orb::Price::GroupedAllocation::OrHash,
|
|
@@ -1412,6 +1425,8 @@ module Orb
|
|
|
1412
1425
|
Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
|
|
1413
1426
|
Orb::Price::CumulativeGroupedBulk::OrHash,
|
|
1414
1427
|
Orb::Price::CumulativeGroupedAllocation::OrHash,
|
|
1428
|
+
Orb::Price::DailyCreditAllowance::OrHash,
|
|
1429
|
+
Orb::Price::MeteredAllowance::OrHash,
|
|
1415
1430
|
Orb::Price::MinimumComposite::OrHash,
|
|
1416
1431
|
Orb::Price::Percent::OrHash,
|
|
1417
1432
|
Orb::Price::EventOutput::OrHash
|
|
@@ -1527,11 +1542,346 @@ module Orb
|
|
|
1527
1542
|
Orb::MonetaryUsageDiscountAdjustment,
|
|
1528
1543
|
Orb::MonetaryAmountDiscountAdjustment,
|
|
1529
1544
|
Orb::MonetaryPercentageDiscountAdjustment,
|
|
1545
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount,
|
|
1530
1546
|
Orb::MonetaryMinimumAdjustment,
|
|
1531
1547
|
Orb::MonetaryMaximumAdjustment
|
|
1532
1548
|
)
|
|
1533
1549
|
end
|
|
1534
1550
|
|
|
1551
|
+
class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
|
|
1552
|
+
OrHash =
|
|
1553
|
+
T.type_alias do
|
|
1554
|
+
T.any(
|
|
1555
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount,
|
|
1556
|
+
Orb::Internal::AnyHash
|
|
1557
|
+
)
|
|
1558
|
+
end
|
|
1559
|
+
|
|
1560
|
+
sig { returns(String) }
|
|
1561
|
+
attr_accessor :id
|
|
1562
|
+
|
|
1563
|
+
sig { returns(Symbol) }
|
|
1564
|
+
attr_accessor :adjustment_type
|
|
1565
|
+
|
|
1566
|
+
# The value applied by an adjustment.
|
|
1567
|
+
sig { returns(String) }
|
|
1568
|
+
attr_accessor :amount
|
|
1569
|
+
|
|
1570
|
+
# The price IDs that this adjustment applies to.
|
|
1571
|
+
sig { returns(T::Array[String]) }
|
|
1572
|
+
attr_accessor :applies_to_price_ids
|
|
1573
|
+
|
|
1574
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
1575
|
+
sig do
|
|
1576
|
+
returns(
|
|
1577
|
+
T::Array[
|
|
1578
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter
|
|
1579
|
+
]
|
|
1580
|
+
)
|
|
1581
|
+
end
|
|
1582
|
+
attr_accessor :filters
|
|
1583
|
+
|
|
1584
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
1585
|
+
# apply to only one price.
|
|
1586
|
+
sig { returns(T::Boolean) }
|
|
1587
|
+
attr_accessor :is_invoice_level
|
|
1588
|
+
|
|
1589
|
+
# The reason for the adjustment.
|
|
1590
|
+
sig { returns(T.nilable(String)) }
|
|
1591
|
+
attr_accessor :reason
|
|
1592
|
+
|
|
1593
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
1594
|
+
# of the replaced adjustment in plan version migrations.
|
|
1595
|
+
sig { returns(T.nilable(String)) }
|
|
1596
|
+
attr_accessor :replaces_adjustment_id
|
|
1597
|
+
|
|
1598
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
1599
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
1600
|
+
# adjustment covers in a given billing period.
|
|
1601
|
+
sig do
|
|
1602
|
+
returns(
|
|
1603
|
+
T::Array[
|
|
1604
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier
|
|
1605
|
+
]
|
|
1606
|
+
)
|
|
1607
|
+
end
|
|
1608
|
+
attr_accessor :tiers
|
|
1609
|
+
|
|
1610
|
+
sig do
|
|
1611
|
+
params(
|
|
1612
|
+
id: String,
|
|
1613
|
+
amount: String,
|
|
1614
|
+
applies_to_price_ids: T::Array[String],
|
|
1615
|
+
filters:
|
|
1616
|
+
T::Array[
|
|
1617
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::OrHash
|
|
1618
|
+
],
|
|
1619
|
+
is_invoice_level: T::Boolean,
|
|
1620
|
+
reason: T.nilable(String),
|
|
1621
|
+
replaces_adjustment_id: T.nilable(String),
|
|
1622
|
+
tiers:
|
|
1623
|
+
T::Array[
|
|
1624
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier::OrHash
|
|
1625
|
+
],
|
|
1626
|
+
adjustment_type: Symbol
|
|
1627
|
+
).returns(T.attached_class)
|
|
1628
|
+
end
|
|
1629
|
+
def self.new(
|
|
1630
|
+
id:,
|
|
1631
|
+
# The value applied by an adjustment.
|
|
1632
|
+
amount:,
|
|
1633
|
+
# The price IDs that this adjustment applies to.
|
|
1634
|
+
applies_to_price_ids:,
|
|
1635
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
1636
|
+
filters:,
|
|
1637
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
1638
|
+
# apply to only one price.
|
|
1639
|
+
is_invoice_level:,
|
|
1640
|
+
# The reason for the adjustment.
|
|
1641
|
+
reason:,
|
|
1642
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
1643
|
+
# of the replaced adjustment in plan version migrations.
|
|
1644
|
+
replaces_adjustment_id:,
|
|
1645
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
1646
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
1647
|
+
# adjustment covers in a given billing period.
|
|
1648
|
+
tiers:,
|
|
1649
|
+
adjustment_type: :tiered_percentage_discount
|
|
1650
|
+
)
|
|
1651
|
+
end
|
|
1652
|
+
|
|
1653
|
+
sig do
|
|
1654
|
+
override.returns(
|
|
1655
|
+
{
|
|
1656
|
+
id: String,
|
|
1657
|
+
adjustment_type: Symbol,
|
|
1658
|
+
amount: String,
|
|
1659
|
+
applies_to_price_ids: T::Array[String],
|
|
1660
|
+
filters:
|
|
1661
|
+
T::Array[
|
|
1662
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter
|
|
1663
|
+
],
|
|
1664
|
+
is_invoice_level: T::Boolean,
|
|
1665
|
+
reason: T.nilable(String),
|
|
1666
|
+
replaces_adjustment_id: T.nilable(String),
|
|
1667
|
+
tiers:
|
|
1668
|
+
T::Array[
|
|
1669
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier
|
|
1670
|
+
]
|
|
1671
|
+
}
|
|
1672
|
+
)
|
|
1673
|
+
end
|
|
1674
|
+
def to_hash
|
|
1675
|
+
end
|
|
1676
|
+
|
|
1677
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
1678
|
+
OrHash =
|
|
1679
|
+
T.type_alias do
|
|
1680
|
+
T.any(
|
|
1681
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter,
|
|
1682
|
+
Orb::Internal::AnyHash
|
|
1683
|
+
)
|
|
1684
|
+
end
|
|
1685
|
+
|
|
1686
|
+
# The property of the price to filter on.
|
|
1687
|
+
sig do
|
|
1688
|
+
returns(
|
|
1689
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1690
|
+
)
|
|
1691
|
+
end
|
|
1692
|
+
attr_accessor :field
|
|
1693
|
+
|
|
1694
|
+
# Should prices that match the filter be included or excluded.
|
|
1695
|
+
sig do
|
|
1696
|
+
returns(
|
|
1697
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
1698
|
+
)
|
|
1699
|
+
end
|
|
1700
|
+
attr_accessor :operator
|
|
1701
|
+
|
|
1702
|
+
# The IDs or values that match this filter.
|
|
1703
|
+
sig { returns(T::Array[String]) }
|
|
1704
|
+
attr_accessor :values
|
|
1705
|
+
|
|
1706
|
+
sig do
|
|
1707
|
+
params(
|
|
1708
|
+
field:
|
|
1709
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::OrSymbol,
|
|
1710
|
+
operator:
|
|
1711
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator::OrSymbol,
|
|
1712
|
+
values: T::Array[String]
|
|
1713
|
+
).returns(T.attached_class)
|
|
1714
|
+
end
|
|
1715
|
+
def self.new(
|
|
1716
|
+
# The property of the price to filter on.
|
|
1717
|
+
field:,
|
|
1718
|
+
# Should prices that match the filter be included or excluded.
|
|
1719
|
+
operator:,
|
|
1720
|
+
# The IDs or values that match this filter.
|
|
1721
|
+
values:
|
|
1722
|
+
)
|
|
1723
|
+
end
|
|
1724
|
+
|
|
1725
|
+
sig do
|
|
1726
|
+
override.returns(
|
|
1727
|
+
{
|
|
1728
|
+
field:
|
|
1729
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol,
|
|
1730
|
+
operator:
|
|
1731
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol,
|
|
1732
|
+
values: T::Array[String]
|
|
1733
|
+
}
|
|
1734
|
+
)
|
|
1735
|
+
end
|
|
1736
|
+
def to_hash
|
|
1737
|
+
end
|
|
1738
|
+
|
|
1739
|
+
# The property of the price to filter on.
|
|
1740
|
+
module Field
|
|
1741
|
+
extend Orb::Internal::Type::Enum
|
|
1742
|
+
|
|
1743
|
+
TaggedSymbol =
|
|
1744
|
+
T.type_alias do
|
|
1745
|
+
T.all(
|
|
1746
|
+
Symbol,
|
|
1747
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field
|
|
1748
|
+
)
|
|
1749
|
+
end
|
|
1750
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1751
|
+
|
|
1752
|
+
PRICE_ID =
|
|
1753
|
+
T.let(
|
|
1754
|
+
:price_id,
|
|
1755
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1756
|
+
)
|
|
1757
|
+
ITEM_ID =
|
|
1758
|
+
T.let(
|
|
1759
|
+
:item_id,
|
|
1760
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1761
|
+
)
|
|
1762
|
+
PRICE_TYPE =
|
|
1763
|
+
T.let(
|
|
1764
|
+
:price_type,
|
|
1765
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1766
|
+
)
|
|
1767
|
+
CURRENCY =
|
|
1768
|
+
T.let(
|
|
1769
|
+
:currency,
|
|
1770
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1771
|
+
)
|
|
1772
|
+
PRICING_UNIT_ID =
|
|
1773
|
+
T.let(
|
|
1774
|
+
:pricing_unit_id,
|
|
1775
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1776
|
+
)
|
|
1777
|
+
|
|
1778
|
+
sig do
|
|
1779
|
+
override.returns(
|
|
1780
|
+
T::Array[
|
|
1781
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field::TaggedSymbol
|
|
1782
|
+
]
|
|
1783
|
+
)
|
|
1784
|
+
end
|
|
1785
|
+
def self.values
|
|
1786
|
+
end
|
|
1787
|
+
end
|
|
1788
|
+
|
|
1789
|
+
# Should prices that match the filter be included or excluded.
|
|
1790
|
+
module Operator
|
|
1791
|
+
extend Orb::Internal::Type::Enum
|
|
1792
|
+
|
|
1793
|
+
TaggedSymbol =
|
|
1794
|
+
T.type_alias do
|
|
1795
|
+
T.all(
|
|
1796
|
+
Symbol,
|
|
1797
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator
|
|
1798
|
+
)
|
|
1799
|
+
end
|
|
1800
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
1801
|
+
|
|
1802
|
+
INCLUDES =
|
|
1803
|
+
T.let(
|
|
1804
|
+
:includes,
|
|
1805
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
1806
|
+
)
|
|
1807
|
+
EXCLUDES =
|
|
1808
|
+
T.let(
|
|
1809
|
+
:excludes,
|
|
1810
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
1811
|
+
)
|
|
1812
|
+
|
|
1813
|
+
sig do
|
|
1814
|
+
override.returns(
|
|
1815
|
+
T::Array[
|
|
1816
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator::TaggedSymbol
|
|
1817
|
+
]
|
|
1818
|
+
)
|
|
1819
|
+
end
|
|
1820
|
+
def self.values
|
|
1821
|
+
end
|
|
1822
|
+
end
|
|
1823
|
+
end
|
|
1824
|
+
|
|
1825
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1826
|
+
OrHash =
|
|
1827
|
+
T.type_alias do
|
|
1828
|
+
T.any(
|
|
1829
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::LineItem::Adjustment::TieredPercentageDiscount::Tier,
|
|
1830
|
+
Orb::Internal::AnyHash
|
|
1831
|
+
)
|
|
1832
|
+
end
|
|
1833
|
+
|
|
1834
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
1835
|
+
sig { returns(Float) }
|
|
1836
|
+
attr_accessor :lower_bound
|
|
1837
|
+
|
|
1838
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
1839
|
+
# tier.
|
|
1840
|
+
sig { returns(Float) }
|
|
1841
|
+
attr_accessor :percentage
|
|
1842
|
+
|
|
1843
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
1844
|
+
# open-ended tier.
|
|
1845
|
+
sig { returns(T.nilable(Float)) }
|
|
1846
|
+
attr_accessor :upper_bound
|
|
1847
|
+
|
|
1848
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
1849
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
1850
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
1851
|
+
# open-ended final tier.
|
|
1852
|
+
sig do
|
|
1853
|
+
params(
|
|
1854
|
+
lower_bound: Float,
|
|
1855
|
+
percentage: Float,
|
|
1856
|
+
upper_bound: T.nilable(Float)
|
|
1857
|
+
).returns(T.attached_class)
|
|
1858
|
+
end
|
|
1859
|
+
def self.new(
|
|
1860
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
1861
|
+
lower_bound:,
|
|
1862
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
1863
|
+
# tier.
|
|
1864
|
+
percentage:,
|
|
1865
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
1866
|
+
# open-ended tier.
|
|
1867
|
+
upper_bound: nil
|
|
1868
|
+
)
|
|
1869
|
+
end
|
|
1870
|
+
|
|
1871
|
+
sig do
|
|
1872
|
+
override.returns(
|
|
1873
|
+
{
|
|
1874
|
+
lower_bound: Float,
|
|
1875
|
+
percentage: Float,
|
|
1876
|
+
upper_bound: T.nilable(Float)
|
|
1877
|
+
}
|
|
1878
|
+
)
|
|
1879
|
+
end
|
|
1880
|
+
def to_hash
|
|
1881
|
+
end
|
|
1882
|
+
end
|
|
1883
|
+
end
|
|
1884
|
+
|
|
1535
1885
|
sig do
|
|
1536
1886
|
override.returns(
|
|
1537
1887
|
T::Array[
|
|
@@ -1681,6 +2031,11 @@ module Orb
|
|
|
1681
2031
|
:stripe,
|
|
1682
2032
|
Orb::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt::PaymentProvider::TaggedSymbol
|
|
1683
2033
|
)
|
|
2034
|
+
ADYEN =
|
|
2035
|
+
T.let(
|
|
2036
|
+
:adyen,
|
|
2037
|
+
Orb::ChangedSubscriptionResources::CreatedInvoice::PaymentAttempt::PaymentProvider::TaggedSymbol
|
|
2038
|
+
)
|
|
1684
2039
|
|
|
1685
2040
|
sig do
|
|
1686
2041
|
override.returns(
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# typed: strong
|
|
2
|
+
|
|
3
|
+
module Orb
|
|
4
|
+
module Models
|
|
5
|
+
module ConversionRateConfig
|
|
6
|
+
extend Orb::Internal::Type::Union
|
|
7
|
+
|
|
8
|
+
Variants =
|
|
9
|
+
T.type_alias do
|
|
10
|
+
T.any(Orb::UnitConversionRateConfig, Orb::TieredConversionRateConfig)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
sig { override.returns(T::Array[Orb::ConversionRateConfig::Variants]) }
|
|
14
|
+
def self.variants
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|