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
|
@@ -114,11 +114,13 @@ module Orb
|
|
|
114
114
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
115
115
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
116
116
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
117
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
117
118
|
# | Finland | `eu_vat` | European VAT Number |
|
|
118
119
|
# | France | `eu_vat` | European VAT Number |
|
|
119
120
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
120
121
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
121
122
|
# | Germany | `eu_vat` | European VAT Number |
|
|
123
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
122
124
|
# | Greece | `eu_vat` | European VAT Number |
|
|
123
125
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
124
126
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -130,6 +132,7 @@ module Orb
|
|
|
130
132
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
131
133
|
# | Israel | `il_vat` | Israel VAT |
|
|
132
134
|
# | Italy | `eu_vat` | European VAT Number |
|
|
135
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
133
136
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
134
137
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
135
138
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -160,6 +163,7 @@ module Orb
|
|
|
160
163
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
161
164
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
162
165
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
166
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
163
167
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
164
168
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
165
169
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -181,6 +185,7 @@ module Orb
|
|
|
181
185
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
182
186
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
183
187
|
# | Spain | `eu_vat` | European VAT Number |
|
|
188
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
184
189
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
185
190
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
186
191
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -218,7 +223,7 @@ module Orb
|
|
|
218
223
|
|
|
219
224
|
# @!attribute discounts
|
|
220
225
|
#
|
|
221
|
-
# @return [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount>]
|
|
226
|
+
# @return [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>]
|
|
222
227
|
required :discounts, -> { Orb::Internal::Type::ArrayOf[union: Orb::InvoiceLevelDiscount] }
|
|
223
228
|
|
|
224
229
|
# @!attribute due_date
|
|
@@ -237,8 +242,8 @@ module Orb
|
|
|
237
242
|
required :eligible_to_issue_at, Time, nil?: true
|
|
238
243
|
|
|
239
244
|
# @!attribute hosted_invoice_url
|
|
240
|
-
# A URL for the customer-facing invoice portal. This URL expires
|
|
241
|
-
#
|
|
245
|
+
# A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
246
|
+
# link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
242
247
|
#
|
|
243
248
|
# @return [String, nil]
|
|
244
249
|
required :hosted_invoice_url, String, nil?: true
|
|
@@ -435,13 +440,13 @@ module Orb
|
|
|
435
440
|
#
|
|
436
441
|
# @param discount [Object] This field is deprecated in favor of `discounts`. If a `discounts` list is provi
|
|
437
442
|
#
|
|
438
|
-
# @param discounts [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount>]
|
|
443
|
+
# @param discounts [Array<Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage>]
|
|
439
444
|
#
|
|
440
445
|
# @param due_date [Time, nil] When the invoice payment is due. The due date is null if the invoice is not yet
|
|
441
446
|
#
|
|
442
447
|
# @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w
|
|
443
448
|
#
|
|
444
|
-
# @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires
|
|
449
|
+
# @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
445
450
|
#
|
|
446
451
|
# @param invoice_number [String] Automatically generated invoice number to help track and reconcile invoices. Inv
|
|
447
452
|
#
|
|
@@ -746,7 +751,7 @@ module Orb
|
|
|
746
751
|
# invoice calculations (ie. usage discounts -> amount discounts -> percentage
|
|
747
752
|
# discounts -> minimums -> maximums).
|
|
748
753
|
#
|
|
749
|
-
# @return [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>]
|
|
754
|
+
# @return [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>]
|
|
750
755
|
required :adjustments,
|
|
751
756
|
-> { Orb::Internal::Type::ArrayOf[union: Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment] }
|
|
752
757
|
|
|
@@ -807,7 +812,7 @@ module Orb
|
|
|
807
812
|
# For more on the types of prices, see
|
|
808
813
|
# [the core concepts documentation](/core-concepts#plan-and-price)
|
|
809
814
|
#
|
|
810
|
-
# @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput]
|
|
815
|
+
# @return [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput]
|
|
811
816
|
required :price, union: -> { Orb::Price }
|
|
812
817
|
|
|
813
818
|
# @!attribute quantity
|
|
@@ -857,7 +862,7 @@ module Orb
|
|
|
857
862
|
#
|
|
858
863
|
# @param adjusted_subtotal [String] The line amount after any adjustments and before overage conversion, credits and
|
|
859
864
|
#
|
|
860
|
-
# @param adjustments [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] All adjustments applied to the line item in the order they were applied based on
|
|
865
|
+
# @param adjustments [Array<Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment>] All adjustments applied to the line item in the order they were applied based on
|
|
861
866
|
#
|
|
862
867
|
# @param amount [String] The final amount for a line item after all adjustments and pre paid credits have
|
|
863
868
|
#
|
|
@@ -873,7 +878,7 @@ module Orb
|
|
|
873
878
|
#
|
|
874
879
|
# @param partially_invoiced_amount [String] Any amount applied from a partial invoice
|
|
875
880
|
#
|
|
876
|
-
# @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu
|
|
881
|
+
# @param price [Orb::Models::Price::Unit, Orb::Models::Price::Tiered, Orb::Models::Price::Bulk, Orb::Models::Price::BulkWithFilters, Orb::Models::Price::Package, Orb::Models::Price::Matrix, Orb::Models::Price::ThresholdTotalAmount, Orb::Models::Price::TieredPackage, Orb::Models::Price::TieredWithMinimum, Orb::Models::Price::GroupedTiered, Orb::Models::Price::TieredPackageWithMinimum, Orb::Models::Price::PackageWithAllocation, Orb::Models::Price::UnitWithPercent, Orb::Models::Price::MatrixWithAllocation, Orb::Models::Price::MatrixWithThresholdDiscounts, Orb::Models::Price::TieredWithProration, Orb::Models::Price::UnitWithProration, Orb::Models::Price::GroupedAllocation, Orb::Models::Price::BulkWithProration, Orb::Models::Price::GroupedWithProratedMinimum, Orb::Models::Price::GroupedWithMeteredMinimum, Orb::Models::Price::GroupedWithMinMaxThresholds, Orb::Models::Price::MatrixWithDisplayName, Orb::Models::Price::GroupedTieredPackage, Orb::Models::Price::MaxGroupTieredPackage, Orb::Models::Price::ScalableMatrixWithUnitPricing, Orb::Models::Price::ScalableMatrixWithTieredPricing, Orb::Models::Price::CumulativeGroupedBulk, Orb::Models::Price::CumulativeGroupedAllocation, Orb::Models::Price::DailyCreditAllowance, Orb::Models::Price::MeteredAllowance, Orb::Models::Price::MinimumComposite, Orb::Models::Price::Percent, Orb::Models::Price::EventOutput] The Price resource represents a price that can be billed on a subscription, resu
|
|
877
882
|
#
|
|
878
883
|
# @param quantity [Float] Either the fixed fee quantity or the usage during the service period.
|
|
879
884
|
#
|
|
@@ -898,12 +903,196 @@ module Orb
|
|
|
898
903
|
|
|
899
904
|
variant :percentage_discount, -> { Orb::MonetaryPercentageDiscountAdjustment }
|
|
900
905
|
|
|
906
|
+
variant :tiered_percentage_discount,
|
|
907
|
+
-> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount }
|
|
908
|
+
|
|
901
909
|
variant :minimum, -> { Orb::MonetaryMinimumAdjustment }
|
|
902
910
|
|
|
903
911
|
variant :maximum, -> { Orb::MonetaryMaximumAdjustment }
|
|
904
912
|
|
|
913
|
+
class TieredPercentageDiscount < Orb::Internal::Type::BaseModel
|
|
914
|
+
# @!attribute id
|
|
915
|
+
#
|
|
916
|
+
# @return [String]
|
|
917
|
+
required :id, String
|
|
918
|
+
|
|
919
|
+
# @!attribute adjustment_type
|
|
920
|
+
#
|
|
921
|
+
# @return [Symbol, :tiered_percentage_discount]
|
|
922
|
+
required :adjustment_type, const: :tiered_percentage_discount
|
|
923
|
+
|
|
924
|
+
# @!attribute amount
|
|
925
|
+
# The value applied by an adjustment.
|
|
926
|
+
#
|
|
927
|
+
# @return [String]
|
|
928
|
+
required :amount, String
|
|
929
|
+
|
|
930
|
+
# @!attribute applies_to_price_ids
|
|
931
|
+
# @deprecated
|
|
932
|
+
#
|
|
933
|
+
# The price IDs that this adjustment applies to.
|
|
934
|
+
#
|
|
935
|
+
# @return [Array<String>]
|
|
936
|
+
required :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String]
|
|
937
|
+
|
|
938
|
+
# @!attribute filters
|
|
939
|
+
# The filters that determine which prices to apply this adjustment to.
|
|
940
|
+
#
|
|
941
|
+
# @return [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter>]
|
|
942
|
+
required :filters,
|
|
943
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter] }
|
|
944
|
+
|
|
945
|
+
# @!attribute is_invoice_level
|
|
946
|
+
# True for adjustments that apply to an entire invoice, false for adjustments that
|
|
947
|
+
# apply to only one price.
|
|
948
|
+
#
|
|
949
|
+
# @return [Boolean]
|
|
950
|
+
required :is_invoice_level, Orb::Internal::Type::Boolean
|
|
951
|
+
|
|
952
|
+
# @!attribute reason
|
|
953
|
+
# The reason for the adjustment.
|
|
954
|
+
#
|
|
955
|
+
# @return [String, nil]
|
|
956
|
+
required :reason, String, nil?: true
|
|
957
|
+
|
|
958
|
+
# @!attribute replaces_adjustment_id
|
|
959
|
+
# The adjustment id this adjustment replaces. This adjustment will take the place
|
|
960
|
+
# of the replaced adjustment in plan version migrations.
|
|
961
|
+
#
|
|
962
|
+
# @return [String, nil]
|
|
963
|
+
required :replaces_adjustment_id, String, nil?: true
|
|
964
|
+
|
|
965
|
+
# @!attribute tiers
|
|
966
|
+
# The ordered, contiguous bands of cumulative eligible spend, each discounted at
|
|
967
|
+
# its own percentage (progressive fill-a-tier), applied to the prices this
|
|
968
|
+
# adjustment covers in a given billing period.
|
|
969
|
+
#
|
|
970
|
+
# @return [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Tier>]
|
|
971
|
+
required :tiers,
|
|
972
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Tier] }
|
|
973
|
+
|
|
974
|
+
# @!method initialize(id:, amount:, applies_to_price_ids:, filters:, is_invoice_level:, reason:, replaces_adjustment_id:, tiers:, adjustment_type: :tiered_percentage_discount)
|
|
975
|
+
# Some parameter documentations has been truncated, see
|
|
976
|
+
# {Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount}
|
|
977
|
+
# for more details.
|
|
978
|
+
#
|
|
979
|
+
# @param id [String]
|
|
980
|
+
#
|
|
981
|
+
# @param amount [String] The value applied by an adjustment.
|
|
982
|
+
#
|
|
983
|
+
# @param applies_to_price_ids [Array<String>] The price IDs that this adjustment applies to.
|
|
984
|
+
#
|
|
985
|
+
# @param filters [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter>] The filters that determine which prices to apply this adjustment to.
|
|
986
|
+
#
|
|
987
|
+
# @param is_invoice_level [Boolean] True for adjustments that apply to an entire invoice, false for adjustments that
|
|
988
|
+
#
|
|
989
|
+
# @param reason [String, nil] The reason for the adjustment.
|
|
990
|
+
#
|
|
991
|
+
# @param replaces_adjustment_id [String, nil] The adjustment id this adjustment replaces. This adjustment will take the place
|
|
992
|
+
#
|
|
993
|
+
# @param tiers [Array<Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Tier>] The ordered, contiguous bands of cumulative eligible spend, each discounted at i
|
|
994
|
+
#
|
|
995
|
+
# @param adjustment_type [Symbol, :tiered_percentage_discount]
|
|
996
|
+
|
|
997
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
998
|
+
# @!attribute field
|
|
999
|
+
# The property of the price to filter on.
|
|
1000
|
+
#
|
|
1001
|
+
# @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field]
|
|
1002
|
+
required :field,
|
|
1003
|
+
enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field }
|
|
1004
|
+
|
|
1005
|
+
# @!attribute operator
|
|
1006
|
+
# Should prices that match the filter be included or excluded.
|
|
1007
|
+
#
|
|
1008
|
+
# @return [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator]
|
|
1009
|
+
required :operator,
|
|
1010
|
+
enum: -> { Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator }
|
|
1011
|
+
|
|
1012
|
+
# @!attribute values
|
|
1013
|
+
# The IDs or values that match this filter.
|
|
1014
|
+
#
|
|
1015
|
+
# @return [Array<String>]
|
|
1016
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
1017
|
+
|
|
1018
|
+
# @!method initialize(field:, operator:, values:)
|
|
1019
|
+
# @param field [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter::Field] The property of the price to filter on.
|
|
1020
|
+
#
|
|
1021
|
+
# @param operator [Symbol, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
1022
|
+
#
|
|
1023
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
1024
|
+
|
|
1025
|
+
# The property of the price to filter on.
|
|
1026
|
+
#
|
|
1027
|
+
# @see Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter#field
|
|
1028
|
+
module Field
|
|
1029
|
+
extend Orb::Internal::Type::Enum
|
|
1030
|
+
|
|
1031
|
+
PRICE_ID = :price_id
|
|
1032
|
+
ITEM_ID = :item_id
|
|
1033
|
+
PRICE_TYPE = :price_type
|
|
1034
|
+
CURRENCY = :currency
|
|
1035
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
1036
|
+
|
|
1037
|
+
# @!method self.values
|
|
1038
|
+
# @return [Array<Symbol>]
|
|
1039
|
+
end
|
|
1040
|
+
|
|
1041
|
+
# Should prices that match the filter be included or excluded.
|
|
1042
|
+
#
|
|
1043
|
+
# @see Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Filter#operator
|
|
1044
|
+
module Operator
|
|
1045
|
+
extend Orb::Internal::Type::Enum
|
|
1046
|
+
|
|
1047
|
+
INCLUDES = :includes
|
|
1048
|
+
EXCLUDES = :excludes
|
|
1049
|
+
|
|
1050
|
+
# @!method self.values
|
|
1051
|
+
# @return [Array<Symbol>]
|
|
1052
|
+
end
|
|
1053
|
+
end
|
|
1054
|
+
|
|
1055
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
1056
|
+
# @!attribute lower_bound
|
|
1057
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
1058
|
+
#
|
|
1059
|
+
# @return [Float]
|
|
1060
|
+
required :lower_bound, Float
|
|
1061
|
+
|
|
1062
|
+
# @!attribute percentage
|
|
1063
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
1064
|
+
# tier.
|
|
1065
|
+
#
|
|
1066
|
+
# @return [Float]
|
|
1067
|
+
required :percentage, Float
|
|
1068
|
+
|
|
1069
|
+
# @!attribute upper_bound
|
|
1070
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
1071
|
+
# open-ended tier.
|
|
1072
|
+
#
|
|
1073
|
+
# @return [Float, nil]
|
|
1074
|
+
optional :upper_bound, Float, nil?: true
|
|
1075
|
+
|
|
1076
|
+
# @!method initialize(lower_bound:, percentage:, upper_bound: nil)
|
|
1077
|
+
# Some parameter documentations has been truncated, see
|
|
1078
|
+
# {Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount::Tier}
|
|
1079
|
+
# for more details.
|
|
1080
|
+
#
|
|
1081
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
1082
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
1083
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
1084
|
+
# open-ended final tier.
|
|
1085
|
+
#
|
|
1086
|
+
# @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
|
|
1087
|
+
#
|
|
1088
|
+
# @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
|
|
1089
|
+
#
|
|
1090
|
+
# @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
|
|
1091
|
+
end
|
|
1092
|
+
end
|
|
1093
|
+
|
|
905
1094
|
# @!method self.variants
|
|
906
|
-
# @return [Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)]
|
|
1095
|
+
# @return [Array(Orb::Models::MonetaryUsageDiscountAdjustment, Orb::Models::MonetaryAmountDiscountAdjustment, Orb::Models::MonetaryPercentageDiscountAdjustment, Orb::Models::InvoiceFetchUpcomingResponse::LineItem::Adjustment::TieredPercentageDiscount, Orb::Models::MonetaryMinimumAdjustment, Orb::Models::MonetaryMaximumAdjustment)]
|
|
907
1096
|
end
|
|
908
1097
|
|
|
909
1098
|
module SubLineItem
|
|
@@ -993,6 +1182,7 @@ module Orb
|
|
|
993
1182
|
extend Orb::Internal::Type::Enum
|
|
994
1183
|
|
|
995
1184
|
STRIPE = :stripe
|
|
1185
|
+
ADYEN = :adyen
|
|
996
1186
|
|
|
997
1187
|
# @!method self.values
|
|
998
1188
|
# @return [Array<Symbol>]
|
|
@@ -114,11 +114,13 @@ module Orb
|
|
|
114
114
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
115
115
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
116
116
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
117
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
117
118
|
# | Finland | `eu_vat` | European VAT Number |
|
|
118
119
|
# | France | `eu_vat` | European VAT Number |
|
|
119
120
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
120
121
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
121
122
|
# | Germany | `eu_vat` | European VAT Number |
|
|
123
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
122
124
|
# | Greece | `eu_vat` | European VAT Number |
|
|
123
125
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
124
126
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -130,6 +132,7 @@ module Orb
|
|
|
130
132
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
131
133
|
# | Israel | `il_vat` | Israel VAT |
|
|
132
134
|
# | Italy | `eu_vat` | European VAT Number |
|
|
135
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
133
136
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
134
137
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
135
138
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -160,6 +163,7 @@ module Orb
|
|
|
160
163
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
161
164
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
162
165
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
166
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
163
167
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
164
168
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
165
169
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -181,6 +185,7 @@ module Orb
|
|
|
181
185
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
182
186
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
183
187
|
# | Spain | `eu_vat` | European VAT Number |
|
|
188
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
184
189
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
185
190
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
186
191
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -222,8 +227,8 @@ module Orb
|
|
|
222
227
|
required :eligible_to_issue_at, Time, nil?: true
|
|
223
228
|
|
|
224
229
|
# @!attribute hosted_invoice_url
|
|
225
|
-
# A URL for the customer-facing invoice portal. This URL expires
|
|
226
|
-
#
|
|
230
|
+
# A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
231
|
+
# link is generated, or 30 days after the invoice's due date — whichever is later.
|
|
227
232
|
#
|
|
228
233
|
# @return [String, nil]
|
|
229
234
|
required :hosted_invoice_url, String, nil?: true
|
|
@@ -391,7 +396,7 @@ module Orb
|
|
|
391
396
|
#
|
|
392
397
|
# @param eligible_to_issue_at [Time, nil] If the invoice has a status of `draft`, this will be the time that the invoice w
|
|
393
398
|
#
|
|
394
|
-
# @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires
|
|
399
|
+
# @param hosted_invoice_url [String, nil] A URL for the customer-facing invoice portal. This URL expires 60 days after the
|
|
395
400
|
#
|
|
396
401
|
# @param invoice_date [Time] The scheduled date of the invoice
|
|
397
402
|
#
|
|
@@ -736,6 +741,7 @@ module Orb
|
|
|
736
741
|
extend Orb::Internal::Type::Enum
|
|
737
742
|
|
|
738
743
|
STRIPE = :stripe
|
|
744
|
+
ADYEN = :adyen
|
|
739
745
|
|
|
740
746
|
# @!method self.values
|
|
741
747
|
# @return [Array<Symbol>]
|
|
@@ -13,8 +13,152 @@ module Orb
|
|
|
13
13
|
|
|
14
14
|
variant :trial, -> { Orb::TrialDiscount }
|
|
15
15
|
|
|
16
|
+
variant :tiered_percentage, -> { Orb::InvoiceLevelDiscount::TieredPercentage }
|
|
17
|
+
|
|
18
|
+
class TieredPercentage < Orb::Internal::Type::BaseModel
|
|
19
|
+
# @!attribute discount_type
|
|
20
|
+
#
|
|
21
|
+
# @return [Symbol, :tiered_percentage]
|
|
22
|
+
required :discount_type, const: :tiered_percentage
|
|
23
|
+
|
|
24
|
+
# @!attribute tiers
|
|
25
|
+
# Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
26
|
+
# bands of cumulative eligible spend, each discounted at its own percentage
|
|
27
|
+
# (progressive fill-a-tier).
|
|
28
|
+
#
|
|
29
|
+
# @return [Array<Orb::Models::InvoiceLevelDiscount::TieredPercentage::Tier>]
|
|
30
|
+
required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::InvoiceLevelDiscount::TieredPercentage::Tier] }
|
|
31
|
+
|
|
32
|
+
# @!attribute applies_to_price_ids
|
|
33
|
+
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
34
|
+
# this can be a subset of prices.
|
|
35
|
+
#
|
|
36
|
+
# @return [Array<String>, nil]
|
|
37
|
+
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
38
|
+
|
|
39
|
+
# @!attribute filters
|
|
40
|
+
# The filters that determine which prices to apply this discount to.
|
|
41
|
+
#
|
|
42
|
+
# @return [Array<Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter>, nil]
|
|
43
|
+
optional :filters,
|
|
44
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::InvoiceLevelDiscount::TieredPercentage::Filter] },
|
|
45
|
+
nil?: true
|
|
46
|
+
|
|
47
|
+
# @!attribute reason
|
|
48
|
+
#
|
|
49
|
+
# @return [String, nil]
|
|
50
|
+
optional :reason, String, nil?: true
|
|
51
|
+
|
|
52
|
+
# @!method initialize(tiers:, applies_to_price_ids: nil, filters: nil, reason: nil, discount_type: :tiered_percentage)
|
|
53
|
+
# Some parameter documentations has been truncated, see
|
|
54
|
+
# {Orb::Models::InvoiceLevelDiscount::TieredPercentage} for more details.
|
|
55
|
+
#
|
|
56
|
+
# @param tiers [Array<Orb::Models::InvoiceLevelDiscount::TieredPercentage::Tier>] Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
57
|
+
#
|
|
58
|
+
# @param applies_to_price_ids [Array<String>, nil] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
59
|
+
#
|
|
60
|
+
# @param filters [Array<Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter>, nil] The filters that determine which prices to apply this discount to.
|
|
61
|
+
#
|
|
62
|
+
# @param reason [String, nil]
|
|
63
|
+
#
|
|
64
|
+
# @param discount_type [Symbol, :tiered_percentage]
|
|
65
|
+
|
|
66
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
67
|
+
# @!attribute lower_bound
|
|
68
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
69
|
+
#
|
|
70
|
+
# @return [Float]
|
|
71
|
+
required :lower_bound, Float
|
|
72
|
+
|
|
73
|
+
# @!attribute percentage
|
|
74
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
75
|
+
# tier.
|
|
76
|
+
#
|
|
77
|
+
# @return [Float]
|
|
78
|
+
required :percentage, Float
|
|
79
|
+
|
|
80
|
+
# @!attribute upper_bound
|
|
81
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
82
|
+
# open-ended tier.
|
|
83
|
+
#
|
|
84
|
+
# @return [Float, nil]
|
|
85
|
+
optional :upper_bound, Float, nil?: true
|
|
86
|
+
|
|
87
|
+
# @!method initialize(lower_bound:, percentage:, upper_bound: nil)
|
|
88
|
+
# Some parameter documentations has been truncated, see
|
|
89
|
+
# {Orb::Models::InvoiceLevelDiscount::TieredPercentage::Tier} for more details.
|
|
90
|
+
#
|
|
91
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
92
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
93
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
94
|
+
# open-ended final tier.
|
|
95
|
+
#
|
|
96
|
+
# @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
|
|
97
|
+
#
|
|
98
|
+
# @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
|
|
99
|
+
#
|
|
100
|
+
# @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
104
|
+
# @!attribute field
|
|
105
|
+
# The property of the price to filter on.
|
|
106
|
+
#
|
|
107
|
+
# @return [Symbol, Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter::Field]
|
|
108
|
+
required :field, enum: -> { Orb::InvoiceLevelDiscount::TieredPercentage::Filter::Field }
|
|
109
|
+
|
|
110
|
+
# @!attribute operator
|
|
111
|
+
# Should prices that match the filter be included or excluded.
|
|
112
|
+
#
|
|
113
|
+
# @return [Symbol, Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter::Operator]
|
|
114
|
+
required :operator, enum: -> { Orb::InvoiceLevelDiscount::TieredPercentage::Filter::Operator }
|
|
115
|
+
|
|
116
|
+
# @!attribute values
|
|
117
|
+
# The IDs or values that match this filter.
|
|
118
|
+
#
|
|
119
|
+
# @return [Array<String>]
|
|
120
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
121
|
+
|
|
122
|
+
# @!method initialize(field:, operator:, values:)
|
|
123
|
+
# @param field [Symbol, Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter::Field] The property of the price to filter on.
|
|
124
|
+
#
|
|
125
|
+
# @param operator [Symbol, Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
126
|
+
#
|
|
127
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
128
|
+
|
|
129
|
+
# The property of the price to filter on.
|
|
130
|
+
#
|
|
131
|
+
# @see Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter#field
|
|
132
|
+
module Field
|
|
133
|
+
extend Orb::Internal::Type::Enum
|
|
134
|
+
|
|
135
|
+
PRICE_ID = :price_id
|
|
136
|
+
ITEM_ID = :item_id
|
|
137
|
+
PRICE_TYPE = :price_type
|
|
138
|
+
CURRENCY = :currency
|
|
139
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
140
|
+
|
|
141
|
+
# @!method self.values
|
|
142
|
+
# @return [Array<Symbol>]
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
# Should prices that match the filter be included or excluded.
|
|
146
|
+
#
|
|
147
|
+
# @see Orb::Models::InvoiceLevelDiscount::TieredPercentage::Filter#operator
|
|
148
|
+
module Operator
|
|
149
|
+
extend Orb::Internal::Type::Enum
|
|
150
|
+
|
|
151
|
+
INCLUDES = :includes
|
|
152
|
+
EXCLUDES = :excludes
|
|
153
|
+
|
|
154
|
+
# @!method self.values
|
|
155
|
+
# @return [Array<Symbol>]
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
|
|
16
160
|
# @!method self.variants
|
|
17
|
-
# @return [Array(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount)]
|
|
161
|
+
# @return [Array(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount, Orb::Models::TrialDiscount, Orb::Models::InvoiceLevelDiscount::TieredPercentage)]
|
|
18
162
|
end
|
|
19
163
|
end
|
|
20
164
|
end
|