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
|
@@ -56,6 +56,13 @@ module Orb
|
|
|
56
56
|
# @return [String, nil]
|
|
57
57
|
optional :currency, String, nil?: true
|
|
58
58
|
|
|
59
|
+
# @!attribute default_payment_method_id
|
|
60
|
+
# The Orb ID of the payment method to set as this customer's default. Pass `null`
|
|
61
|
+
# to clear the customer's default payment method.
|
|
62
|
+
#
|
|
63
|
+
# @return [String, nil]
|
|
64
|
+
optional :default_payment_method_id, String, nil?: true
|
|
65
|
+
|
|
59
66
|
# @!attribute email
|
|
60
67
|
# A valid customer email, to be used for invoicing and notifications.
|
|
61
68
|
#
|
|
@@ -196,11 +203,13 @@ module Orb
|
|
|
196
203
|
# | Estonia | `eu_vat` | European VAT Number |
|
|
197
204
|
# | Ethiopia | `et_tin` | Ethiopia Tax Identification Number |
|
|
198
205
|
# | European Union | `eu_oss_vat` | European One Stop Shop VAT Number for non-Union scheme |
|
|
206
|
+
# | Faroe Islands | `fo_vat` | Faroe Islands VAT Number |
|
|
199
207
|
# | Finland | `eu_vat` | European VAT Number |
|
|
200
208
|
# | France | `eu_vat` | European VAT Number |
|
|
201
209
|
# | Georgia | `ge_vat` | Georgian VAT |
|
|
202
210
|
# | Germany | `de_stn` | German Tax Number (Steuernummer) |
|
|
203
211
|
# | Germany | `eu_vat` | European VAT Number |
|
|
212
|
+
# | Gibraltar | `gi_tin` | Gibraltar Tax Identification Number |
|
|
204
213
|
# | Greece | `eu_vat` | European VAT Number |
|
|
205
214
|
# | Guinea | `gn_nif` | Guinea Tax Identification Number (Número de Identificação Fiscal) |
|
|
206
215
|
# | Hong Kong | `hk_br` | Hong Kong BR Number |
|
|
@@ -212,6 +221,7 @@ module Orb
|
|
|
212
221
|
# | Ireland | `eu_vat` | European VAT Number |
|
|
213
222
|
# | Israel | `il_vat` | Israel VAT |
|
|
214
223
|
# | Italy | `eu_vat` | European VAT Number |
|
|
224
|
+
# | Italy | `it_cf` | Italian Codice Fiscale Number |
|
|
215
225
|
# | Japan | `jp_cn` | Japanese Corporate Number (_Hōjin Bangō_) |
|
|
216
226
|
# | Japan | `jp_rn` | Japanese Registered Foreign Businesses' Registration Number (_Tōroku Kokugai Jigyōsha no Tōroku Bangō_) |
|
|
217
227
|
# | Japan | `jp_trn` | Japanese Tax Registration Number (_Tōroku Bangō_) |
|
|
@@ -242,6 +252,7 @@ module Orb
|
|
|
242
252
|
# | Norway | `no_vat` | Norwegian VAT Number |
|
|
243
253
|
# | Norway | `no_voec` | Norwegian VAT on e-commerce Number |
|
|
244
254
|
# | Oman | `om_vat` | Omani VAT Number |
|
|
255
|
+
# | Paraguay | `py_ruc` | Paraguayan RUC Number |
|
|
245
256
|
# | Peru | `pe_ruc` | Peruvian RUC Number |
|
|
246
257
|
# | Philippines | `ph_tin` | Philippines Tax Identification Number |
|
|
247
258
|
# | Poland | `eu_vat` | European VAT Number |
|
|
@@ -263,6 +274,7 @@ module Orb
|
|
|
263
274
|
# | South Korea | `kr_brn` | Korean BRN |
|
|
264
275
|
# | Spain | `es_cif` | Spanish NIF Number (previously Spanish CIF Number) |
|
|
265
276
|
# | Spain | `eu_vat` | European VAT Number |
|
|
277
|
+
# | Sri Lanka | `lk_vat` | Sri Lanka VAT Number |
|
|
266
278
|
# | Suriname | `sr_fin` | Suriname FIN Number |
|
|
267
279
|
# | Sweden | `eu_vat` | European VAT Number |
|
|
268
280
|
# | Switzerland | `ch_uid` | Switzerland UID Number |
|
|
@@ -288,7 +300,7 @@ module Orb
|
|
|
288
300
|
# @return [Orb::Models::CustomerTaxID, nil]
|
|
289
301
|
optional :tax_id, -> { Orb::CustomerTaxID }, nil?: true
|
|
290
302
|
|
|
291
|
-
# @!method initialize(customer_id:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
|
|
303
|
+
# @!method initialize(customer_id:, accounting_sync_configuration: nil, additional_emails: nil, auto_collection: nil, auto_issuance: nil, billing_address: nil, currency: nil, default_payment_method_id: nil, email: nil, email_delivery: nil, external_customer_id: nil, hierarchy: nil, metadata: nil, name: nil, payment_configuration: nil, payment_provider: nil, payment_provider_id: nil, reporting_configuration: nil, shipping_address: nil, tax_configuration: nil, tax_id: nil, request_options: {})
|
|
292
304
|
# Some parameter documentations has been truncated, see
|
|
293
305
|
# {Orb::Models::CustomerUpdateParams} for more details.
|
|
294
306
|
#
|
|
@@ -306,6 +318,8 @@ module Orb
|
|
|
306
318
|
#
|
|
307
319
|
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
|
|
308
320
|
#
|
|
321
|
+
# @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
|
|
322
|
+
#
|
|
309
323
|
# @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
|
|
310
324
|
#
|
|
311
325
|
# @param email_delivery [Boolean, nil]
|
|
@@ -414,7 +428,7 @@ module Orb
|
|
|
414
428
|
STRIPE_CHARGE = :stripe_charge
|
|
415
429
|
STRIPE_INVOICE = :stripe_invoice
|
|
416
430
|
NETSUITE = :netsuite
|
|
417
|
-
|
|
431
|
+
ADYEN = :adyen
|
|
418
432
|
|
|
419
433
|
# @!method self.values
|
|
420
434
|
# @return [Array<Symbol>]
|
|
@@ -15,6 +15,16 @@ module Orb
|
|
|
15
15
|
# @return [Float]
|
|
16
16
|
required :balance, Float
|
|
17
17
|
|
|
18
|
+
# @!attribute credit_block_source
|
|
19
|
+
# How this credit block was created: `allocation` (a subscription's recurring
|
|
20
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up), or
|
|
21
|
+
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
22
|
+
# off another block).
|
|
23
|
+
#
|
|
24
|
+
# @return [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource]
|
|
25
|
+
required :credit_block_source,
|
|
26
|
+
enum: -> { Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource }
|
|
27
|
+
|
|
18
28
|
# @!attribute effective_date
|
|
19
29
|
#
|
|
20
30
|
# @return [Time, nil]
|
|
@@ -55,7 +65,16 @@ module Orb
|
|
|
55
65
|
# @return [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::Status]
|
|
56
66
|
required :status, enum: -> { Orb::Models::Customers::CreditListByExternalIDResponse::Status }
|
|
57
67
|
|
|
58
|
-
# @!
|
|
68
|
+
# @!attribute credit_allocation
|
|
69
|
+
# The credit allocation that funded a block. Extends the allocation resource
|
|
70
|
+
# serialized on prices with the catalog-item attribution of the funding price.
|
|
71
|
+
#
|
|
72
|
+
# @return [Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation, nil]
|
|
73
|
+
optional :credit_allocation,
|
|
74
|
+
-> { Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation },
|
|
75
|
+
nil?: true
|
|
76
|
+
|
|
77
|
+
# @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil)
|
|
59
78
|
# Some parameter documentations has been truncated, see
|
|
60
79
|
# {Orb::Models::Customers::CreditListByExternalIDResponse} for more details.
|
|
61
80
|
#
|
|
@@ -63,6 +82,8 @@ module Orb
|
|
|
63
82
|
#
|
|
64
83
|
# @param balance [Float]
|
|
65
84
|
#
|
|
85
|
+
# @param credit_block_source [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::CreditBlockSource] How this credit block was created: `allocation` (a subscription's recurring cred
|
|
86
|
+
#
|
|
66
87
|
# @param effective_date [Time, nil]
|
|
67
88
|
#
|
|
68
89
|
# @param expiry_date [Time, nil]
|
|
@@ -76,6 +97,25 @@ module Orb
|
|
|
76
97
|
# @param per_unit_cost_basis [String, nil]
|
|
77
98
|
#
|
|
78
99
|
# @param status [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::Status]
|
|
100
|
+
#
|
|
101
|
+
# @param credit_allocation [Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
|
|
102
|
+
|
|
103
|
+
# How this credit block was created: `allocation` (a subscription's recurring
|
|
104
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up), or
|
|
105
|
+
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
106
|
+
# off another block).
|
|
107
|
+
#
|
|
108
|
+
# @see Orb::Models::Customers::CreditListByExternalIDResponse#credit_block_source
|
|
109
|
+
module CreditBlockSource
|
|
110
|
+
extend Orb::Internal::Type::Enum
|
|
111
|
+
|
|
112
|
+
ALLOCATION = :allocation
|
|
113
|
+
TOP_UP = :top_up
|
|
114
|
+
MANUAL = :manual
|
|
115
|
+
|
|
116
|
+
# @!method self.values
|
|
117
|
+
# @return [Array<Symbol>]
|
|
118
|
+
end
|
|
79
119
|
|
|
80
120
|
class Filter < Orb::Internal::Type::BaseModel
|
|
81
121
|
# @!attribute field
|
|
@@ -141,6 +181,120 @@ module Orb
|
|
|
141
181
|
# @!method self.values
|
|
142
182
|
# @return [Array<Symbol>]
|
|
143
183
|
end
|
|
184
|
+
|
|
185
|
+
# @see Orb::Models::Customers::CreditListByExternalIDResponse#credit_allocation
|
|
186
|
+
class CreditAllocation < Orb::Internal::Type::BaseModel
|
|
187
|
+
# @!attribute allows_rollover
|
|
188
|
+
#
|
|
189
|
+
# @return [Boolean]
|
|
190
|
+
required :allows_rollover, Orb::Internal::Type::Boolean
|
|
191
|
+
|
|
192
|
+
# @!attribute currency
|
|
193
|
+
#
|
|
194
|
+
# @return [String]
|
|
195
|
+
required :currency, String
|
|
196
|
+
|
|
197
|
+
# @!attribute custom_expiration
|
|
198
|
+
#
|
|
199
|
+
# @return [Orb::Models::CustomExpiration, nil]
|
|
200
|
+
required :custom_expiration, -> { Orb::CustomExpiration }, nil?: true
|
|
201
|
+
|
|
202
|
+
# @!attribute item_id
|
|
203
|
+
# The ID of the catalog item this block was allocated from, derived from the
|
|
204
|
+
# allocation's price.
|
|
205
|
+
#
|
|
206
|
+
# @return [String]
|
|
207
|
+
required :item_id, String
|
|
208
|
+
|
|
209
|
+
# @!attribute filters
|
|
210
|
+
#
|
|
211
|
+
# @return [Array<Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter>, nil]
|
|
212
|
+
optional :filters,
|
|
213
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter] }
|
|
214
|
+
|
|
215
|
+
# @!attribute license_type_id
|
|
216
|
+
#
|
|
217
|
+
# @return [String, nil]
|
|
218
|
+
optional :license_type_id, String, nil?: true
|
|
219
|
+
|
|
220
|
+
# @!method initialize(allows_rollover:, currency:, custom_expiration:, item_id:, filters: nil, license_type_id: nil)
|
|
221
|
+
# Some parameter documentations has been truncated, see
|
|
222
|
+
# {Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation} for
|
|
223
|
+
# more details.
|
|
224
|
+
#
|
|
225
|
+
# The credit allocation that funded a block. Extends the allocation resource
|
|
226
|
+
# serialized on prices with the catalog-item attribution of the funding price.
|
|
227
|
+
#
|
|
228
|
+
# @param allows_rollover [Boolean]
|
|
229
|
+
#
|
|
230
|
+
# @param currency [String]
|
|
231
|
+
#
|
|
232
|
+
# @param custom_expiration [Orb::Models::CustomExpiration, nil]
|
|
233
|
+
#
|
|
234
|
+
# @param item_id [String] The ID of the catalog item this block was allocated from, derived from the alloc
|
|
235
|
+
#
|
|
236
|
+
# @param filters [Array<Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter>]
|
|
237
|
+
#
|
|
238
|
+
# @param license_type_id [String, nil]
|
|
239
|
+
|
|
240
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
241
|
+
# @!attribute field
|
|
242
|
+
# The property of the price to filter on.
|
|
243
|
+
#
|
|
244
|
+
# @return [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field]
|
|
245
|
+
required :field,
|
|
246
|
+
enum: -> { Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field }
|
|
247
|
+
|
|
248
|
+
# @!attribute operator
|
|
249
|
+
# Should prices that match the filter be included or excluded.
|
|
250
|
+
#
|
|
251
|
+
# @return [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator]
|
|
252
|
+
required :operator,
|
|
253
|
+
enum: -> { Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator }
|
|
254
|
+
|
|
255
|
+
# @!attribute values
|
|
256
|
+
# The IDs or values that match this filter.
|
|
257
|
+
#
|
|
258
|
+
# @return [Array<String>]
|
|
259
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
260
|
+
|
|
261
|
+
# @!method initialize(field:, operator:, values:)
|
|
262
|
+
# @param field [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Field] The property of the price to filter on.
|
|
263
|
+
#
|
|
264
|
+
# @param operator [Symbol, Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
265
|
+
#
|
|
266
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
267
|
+
|
|
268
|
+
# The property of the price to filter on.
|
|
269
|
+
#
|
|
270
|
+
# @see Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter#field
|
|
271
|
+
module Field
|
|
272
|
+
extend Orb::Internal::Type::Enum
|
|
273
|
+
|
|
274
|
+
PRICE_ID = :price_id
|
|
275
|
+
ITEM_ID = :item_id
|
|
276
|
+
PRICE_TYPE = :price_type
|
|
277
|
+
CURRENCY = :currency
|
|
278
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
279
|
+
|
|
280
|
+
# @!method self.values
|
|
281
|
+
# @return [Array<Symbol>]
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Should prices that match the filter be included or excluded.
|
|
285
|
+
#
|
|
286
|
+
# @see Orb::Models::Customers::CreditListByExternalIDResponse::CreditAllocation::Filter#operator
|
|
287
|
+
module Operator
|
|
288
|
+
extend Orb::Internal::Type::Enum
|
|
289
|
+
|
|
290
|
+
INCLUDES = :includes
|
|
291
|
+
EXCLUDES = :excludes
|
|
292
|
+
|
|
293
|
+
# @!method self.values
|
|
294
|
+
# @return [Array<Symbol>]
|
|
295
|
+
end
|
|
296
|
+
end
|
|
297
|
+
end
|
|
144
298
|
end
|
|
145
299
|
end
|
|
146
300
|
end
|
|
@@ -15,6 +15,15 @@ module Orb
|
|
|
15
15
|
# @return [Float]
|
|
16
16
|
required :balance, Float
|
|
17
17
|
|
|
18
|
+
# @!attribute credit_block_source
|
|
19
|
+
# How this credit block was created: `allocation` (a subscription's recurring
|
|
20
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up), or
|
|
21
|
+
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
22
|
+
# off another block).
|
|
23
|
+
#
|
|
24
|
+
# @return [Symbol, Orb::Models::Customers::CreditListResponse::CreditBlockSource]
|
|
25
|
+
required :credit_block_source, enum: -> { Orb::Models::Customers::CreditListResponse::CreditBlockSource }
|
|
26
|
+
|
|
18
27
|
# @!attribute effective_date
|
|
19
28
|
#
|
|
20
29
|
# @return [Time, nil]
|
|
@@ -54,7 +63,16 @@ module Orb
|
|
|
54
63
|
# @return [Symbol, Orb::Models::Customers::CreditListResponse::Status]
|
|
55
64
|
required :status, enum: -> { Orb::Models::Customers::CreditListResponse::Status }
|
|
56
65
|
|
|
57
|
-
# @!
|
|
66
|
+
# @!attribute credit_allocation
|
|
67
|
+
# The credit allocation that funded a block. Extends the allocation resource
|
|
68
|
+
# serialized on prices with the catalog-item attribution of the funding price.
|
|
69
|
+
#
|
|
70
|
+
# @return [Orb::Models::Customers::CreditListResponse::CreditAllocation, nil]
|
|
71
|
+
optional :credit_allocation,
|
|
72
|
+
-> { Orb::Models::Customers::CreditListResponse::CreditAllocation },
|
|
73
|
+
nil?: true
|
|
74
|
+
|
|
75
|
+
# @!method initialize(id:, balance:, credit_block_source:, effective_date:, expiry_date:, filters:, maximum_initial_balance:, metadata:, per_unit_cost_basis:, status:, credit_allocation: nil)
|
|
58
76
|
# Some parameter documentations has been truncated, see
|
|
59
77
|
# {Orb::Models::Customers::CreditListResponse} for more details.
|
|
60
78
|
#
|
|
@@ -62,6 +80,8 @@ module Orb
|
|
|
62
80
|
#
|
|
63
81
|
# @param balance [Float]
|
|
64
82
|
#
|
|
83
|
+
# @param credit_block_source [Symbol, Orb::Models::Customers::CreditListResponse::CreditBlockSource] How this credit block was created: `allocation` (a subscription's recurring cred
|
|
84
|
+
#
|
|
65
85
|
# @param effective_date [Time, nil]
|
|
66
86
|
#
|
|
67
87
|
# @param expiry_date [Time, nil]
|
|
@@ -75,6 +95,25 @@ module Orb
|
|
|
75
95
|
# @param per_unit_cost_basis [String, nil]
|
|
76
96
|
#
|
|
77
97
|
# @param status [Symbol, Orb::Models::Customers::CreditListResponse::Status]
|
|
98
|
+
#
|
|
99
|
+
# @param credit_allocation [Orb::Models::Customers::CreditListResponse::CreditAllocation, nil] The credit allocation that funded a block. Extends the allocation resource
|
|
100
|
+
|
|
101
|
+
# How this credit block was created: `allocation` (a subscription's recurring
|
|
102
|
+
# credit allocation), `top_up` (an automatic balance-threshold top-up), or
|
|
103
|
+
# `manual` (a manual credit ledger increment, including credits voided or expired
|
|
104
|
+
# off another block).
|
|
105
|
+
#
|
|
106
|
+
# @see Orb::Models::Customers::CreditListResponse#credit_block_source
|
|
107
|
+
module CreditBlockSource
|
|
108
|
+
extend Orb::Internal::Type::Enum
|
|
109
|
+
|
|
110
|
+
ALLOCATION = :allocation
|
|
111
|
+
TOP_UP = :top_up
|
|
112
|
+
MANUAL = :manual
|
|
113
|
+
|
|
114
|
+
# @!method self.values
|
|
115
|
+
# @return [Array<Symbol>]
|
|
116
|
+
end
|
|
78
117
|
|
|
79
118
|
class Filter < Orb::Internal::Type::BaseModel
|
|
80
119
|
# @!attribute field
|
|
@@ -140,6 +179,118 @@ module Orb
|
|
|
140
179
|
# @!method self.values
|
|
141
180
|
# @return [Array<Symbol>]
|
|
142
181
|
end
|
|
182
|
+
|
|
183
|
+
# @see Orb::Models::Customers::CreditListResponse#credit_allocation
|
|
184
|
+
class CreditAllocation < Orb::Internal::Type::BaseModel
|
|
185
|
+
# @!attribute allows_rollover
|
|
186
|
+
#
|
|
187
|
+
# @return [Boolean]
|
|
188
|
+
required :allows_rollover, Orb::Internal::Type::Boolean
|
|
189
|
+
|
|
190
|
+
# @!attribute currency
|
|
191
|
+
#
|
|
192
|
+
# @return [String]
|
|
193
|
+
required :currency, String
|
|
194
|
+
|
|
195
|
+
# @!attribute custom_expiration
|
|
196
|
+
#
|
|
197
|
+
# @return [Orb::Models::CustomExpiration, nil]
|
|
198
|
+
required :custom_expiration, -> { Orb::CustomExpiration }, nil?: true
|
|
199
|
+
|
|
200
|
+
# @!attribute item_id
|
|
201
|
+
# The ID of the catalog item this block was allocated from, derived from the
|
|
202
|
+
# allocation's price.
|
|
203
|
+
#
|
|
204
|
+
# @return [String]
|
|
205
|
+
required :item_id, String
|
|
206
|
+
|
|
207
|
+
# @!attribute filters
|
|
208
|
+
#
|
|
209
|
+
# @return [Array<Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter>, nil]
|
|
210
|
+
optional :filters,
|
|
211
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter] }
|
|
212
|
+
|
|
213
|
+
# @!attribute license_type_id
|
|
214
|
+
#
|
|
215
|
+
# @return [String, nil]
|
|
216
|
+
optional :license_type_id, String, nil?: true
|
|
217
|
+
|
|
218
|
+
# @!method initialize(allows_rollover:, currency:, custom_expiration:, item_id:, filters: nil, license_type_id: nil)
|
|
219
|
+
# Some parameter documentations has been truncated, see
|
|
220
|
+
# {Orb::Models::Customers::CreditListResponse::CreditAllocation} for more details.
|
|
221
|
+
#
|
|
222
|
+
# The credit allocation that funded a block. Extends the allocation resource
|
|
223
|
+
# serialized on prices with the catalog-item attribution of the funding price.
|
|
224
|
+
#
|
|
225
|
+
# @param allows_rollover [Boolean]
|
|
226
|
+
#
|
|
227
|
+
# @param currency [String]
|
|
228
|
+
#
|
|
229
|
+
# @param custom_expiration [Orb::Models::CustomExpiration, nil]
|
|
230
|
+
#
|
|
231
|
+
# @param item_id [String] The ID of the catalog item this block was allocated from, derived from the alloc
|
|
232
|
+
#
|
|
233
|
+
# @param filters [Array<Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter>]
|
|
234
|
+
#
|
|
235
|
+
# @param license_type_id [String, nil]
|
|
236
|
+
|
|
237
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
238
|
+
# @!attribute field
|
|
239
|
+
# The property of the price to filter on.
|
|
240
|
+
#
|
|
241
|
+
# @return [Symbol, Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter::Field]
|
|
242
|
+
required :field, enum: -> { Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter::Field }
|
|
243
|
+
|
|
244
|
+
# @!attribute operator
|
|
245
|
+
# Should prices that match the filter be included or excluded.
|
|
246
|
+
#
|
|
247
|
+
# @return [Symbol, Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter::Operator]
|
|
248
|
+
required :operator,
|
|
249
|
+
enum: -> { Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter::Operator }
|
|
250
|
+
|
|
251
|
+
# @!attribute values
|
|
252
|
+
# The IDs or values that match this filter.
|
|
253
|
+
#
|
|
254
|
+
# @return [Array<String>]
|
|
255
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
256
|
+
|
|
257
|
+
# @!method initialize(field:, operator:, values:)
|
|
258
|
+
# @param field [Symbol, Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter::Field] The property of the price to filter on.
|
|
259
|
+
#
|
|
260
|
+
# @param operator [Symbol, Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
261
|
+
#
|
|
262
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
263
|
+
|
|
264
|
+
# The property of the price to filter on.
|
|
265
|
+
#
|
|
266
|
+
# @see Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter#field
|
|
267
|
+
module Field
|
|
268
|
+
extend Orb::Internal::Type::Enum
|
|
269
|
+
|
|
270
|
+
PRICE_ID = :price_id
|
|
271
|
+
ITEM_ID = :item_id
|
|
272
|
+
PRICE_TYPE = :price_type
|
|
273
|
+
CURRENCY = :currency
|
|
274
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
275
|
+
|
|
276
|
+
# @!method self.values
|
|
277
|
+
# @return [Array<Symbol>]
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Should prices that match the filter be included or excluded.
|
|
281
|
+
#
|
|
282
|
+
# @see Orb::Models::Customers::CreditListResponse::CreditAllocation::Filter#operator
|
|
283
|
+
module Operator
|
|
284
|
+
extend Orb::Internal::Type::Enum
|
|
285
|
+
|
|
286
|
+
INCLUDES = :includes
|
|
287
|
+
EXCLUDES = :excludes
|
|
288
|
+
|
|
289
|
+
# @!method self.values
|
|
290
|
+
# @return [Array<Symbol>]
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
end
|
|
143
294
|
end
|
|
144
295
|
end
|
|
145
296
|
end
|
|
@@ -388,9 +388,9 @@ module Orb
|
|
|
388
388
|
required :entry_type, const: :expiration_change
|
|
389
389
|
|
|
390
390
|
# @!attribute target_expiry_date
|
|
391
|
-
# A
|
|
392
|
-
#
|
|
393
|
-
#
|
|
391
|
+
# A date (specified in YYYY-MM-DD format) used for expiration change, denoting
|
|
392
|
+
# when credits transferred (as part of a partial block expiration) should expire.
|
|
393
|
+
# This date must be on or after the effective date of the credit block.
|
|
394
394
|
#
|
|
395
395
|
# @return [Date]
|
|
396
396
|
required :target_expiry_date, Date
|
|
@@ -443,7 +443,7 @@ module Orb
|
|
|
443
443
|
# {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange}
|
|
444
444
|
# for more details.
|
|
445
445
|
#
|
|
446
|
-
# @param target_expiry_date [Date] A
|
|
446
|
+
# @param target_expiry_date [Date] A date (specified in YYYY-MM-DD format) used for expiration change, denoting whe
|
|
447
447
|
#
|
|
448
448
|
# @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre
|
|
449
449
|
#
|
|
@@ -388,9 +388,9 @@ module Orb
|
|
|
388
388
|
required :entry_type, const: :expiration_change
|
|
389
389
|
|
|
390
390
|
# @!attribute target_expiry_date
|
|
391
|
-
# A
|
|
392
|
-
#
|
|
393
|
-
#
|
|
391
|
+
# A date (specified in YYYY-MM-DD format) used for expiration change, denoting
|
|
392
|
+
# when credits transferred (as part of a partial block expiration) should expire.
|
|
393
|
+
# This date must be on or after the effective date of the credit block.
|
|
394
394
|
#
|
|
395
395
|
# @return [Date]
|
|
396
396
|
required :target_expiry_date, Date
|
|
@@ -443,7 +443,7 @@ module Orb
|
|
|
443
443
|
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange}
|
|
444
444
|
# for more details.
|
|
445
445
|
#
|
|
446
|
-
# @param target_expiry_date [Date] A
|
|
446
|
+
# @param target_expiry_date [Date] A date (specified in YYYY-MM-DD format) used for expiration change, denoting whe
|
|
447
447
|
#
|
|
448
448
|
# @param amount [Float, nil] The number of credits to effect. Note that this is required for increment, decre
|
|
449
449
|
#
|
|
@@ -49,7 +49,7 @@ module Orb
|
|
|
49
49
|
# {Orb::Models::DimensionalPriceGroup} for more details.
|
|
50
50
|
#
|
|
51
51
|
# A dimensional price group is used to partition the result of a billable metric
|
|
52
|
-
# by a set of dimensions. Prices in a price group must specify the
|
|
52
|
+
# by a set of dimensions. Prices in a price group must specify the partition used
|
|
53
53
|
# to derive their usage.
|
|
54
54
|
#
|
|
55
55
|
# @param id [String]
|
data/lib/orb/models/discount.rb
CHANGED
|
@@ -15,8 +15,152 @@ module Orb
|
|
|
15
15
|
|
|
16
16
|
variant :amount, -> { Orb::AmountDiscount }
|
|
17
17
|
|
|
18
|
+
variant :tiered_percentage, -> { Orb::Discount::TieredPercentage }
|
|
19
|
+
|
|
20
|
+
class TieredPercentage < Orb::Internal::Type::BaseModel
|
|
21
|
+
# @!attribute discount_type
|
|
22
|
+
#
|
|
23
|
+
# @return [Symbol, :tiered_percentage]
|
|
24
|
+
required :discount_type, const: :tiered_percentage
|
|
25
|
+
|
|
26
|
+
# @!attribute tiers
|
|
27
|
+
# Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
28
|
+
# bands of cumulative eligible spend, each discounted at its own percentage
|
|
29
|
+
# (progressive fill-a-tier).
|
|
30
|
+
#
|
|
31
|
+
# @return [Array<Orb::Models::Discount::TieredPercentage::Tier>]
|
|
32
|
+
required :tiers, -> { Orb::Internal::Type::ArrayOf[Orb::Discount::TieredPercentage::Tier] }
|
|
33
|
+
|
|
34
|
+
# @!attribute applies_to_price_ids
|
|
35
|
+
# List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
36
|
+
# this can be a subset of prices.
|
|
37
|
+
#
|
|
38
|
+
# @return [Array<String>, nil]
|
|
39
|
+
optional :applies_to_price_ids, Orb::Internal::Type::ArrayOf[String], nil?: true
|
|
40
|
+
|
|
41
|
+
# @!attribute filters
|
|
42
|
+
# The filters that determine which prices to apply this discount to.
|
|
43
|
+
#
|
|
44
|
+
# @return [Array<Orb::Models::Discount::TieredPercentage::Filter>, nil]
|
|
45
|
+
optional :filters,
|
|
46
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::Discount::TieredPercentage::Filter] },
|
|
47
|
+
nil?: true
|
|
48
|
+
|
|
49
|
+
# @!attribute reason
|
|
50
|
+
#
|
|
51
|
+
# @return [String, nil]
|
|
52
|
+
optional :reason, String, nil?: true
|
|
53
|
+
|
|
54
|
+
# @!method initialize(tiers:, applies_to_price_ids: nil, filters: nil, reason: nil, discount_type: :tiered_percentage)
|
|
55
|
+
# Some parameter documentations has been truncated, see
|
|
56
|
+
# {Orb::Models::Discount::TieredPercentage} for more details.
|
|
57
|
+
#
|
|
58
|
+
# @param tiers [Array<Orb::Models::Discount::TieredPercentage::Tier>] Only available if discount_type is `tiered_percentage`. The ordered, contiguous
|
|
59
|
+
#
|
|
60
|
+
# @param applies_to_price_ids [Array<String>, nil] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
|
61
|
+
#
|
|
62
|
+
# @param filters [Array<Orb::Models::Discount::TieredPercentage::Filter>, nil] The filters that determine which prices to apply this discount to.
|
|
63
|
+
#
|
|
64
|
+
# @param reason [String, nil]
|
|
65
|
+
#
|
|
66
|
+
# @param discount_type [Symbol, :tiered_percentage]
|
|
67
|
+
|
|
68
|
+
class Tier < Orb::Internal::Type::BaseModel
|
|
69
|
+
# @!attribute lower_bound
|
|
70
|
+
# Exclusive lower bound of cumulative spend for this tier.
|
|
71
|
+
#
|
|
72
|
+
# @return [Float]
|
|
73
|
+
required :lower_bound, Float
|
|
74
|
+
|
|
75
|
+
# @!attribute percentage
|
|
76
|
+
# The percentage (between 0 and 1) discounted from spend that falls within this
|
|
77
|
+
# tier.
|
|
78
|
+
#
|
|
79
|
+
# @return [Float]
|
|
80
|
+
required :percentage, Float
|
|
81
|
+
|
|
82
|
+
# @!attribute upper_bound
|
|
83
|
+
# Inclusive upper bound of cumulative spend for this tier; null for the final
|
|
84
|
+
# open-ended tier.
|
|
85
|
+
#
|
|
86
|
+
# @return [Float, nil]
|
|
87
|
+
optional :upper_bound, Float, nil?: true
|
|
88
|
+
|
|
89
|
+
# @!method initialize(lower_bound:, percentage:, upper_bound: nil)
|
|
90
|
+
# Some parameter documentations has been truncated, see
|
|
91
|
+
# {Orb::Models::Discount::TieredPercentage::Tier} for more details.
|
|
92
|
+
#
|
|
93
|
+
# One band of a tiered percentage discount. Bounds are denominated in the
|
|
94
|
+
# discount's currency. `lower_bound` is the exclusive start of the band and
|
|
95
|
+
# `upper_bound` is the inclusive end; `upper_bound` is null only for the
|
|
96
|
+
# open-ended final tier.
|
|
97
|
+
#
|
|
98
|
+
# @param lower_bound [Float] Exclusive lower bound of cumulative spend for this tier.
|
|
99
|
+
#
|
|
100
|
+
# @param percentage [Float] The percentage (between 0 and 1) discounted from spend that falls within this ti
|
|
101
|
+
#
|
|
102
|
+
# @param upper_bound [Float, nil] Inclusive upper bound of cumulative spend for this tier; null for the final open
|
|
103
|
+
end
|
|
104
|
+
|
|
105
|
+
class Filter < Orb::Internal::Type::BaseModel
|
|
106
|
+
# @!attribute field
|
|
107
|
+
# The property of the price to filter on.
|
|
108
|
+
#
|
|
109
|
+
# @return [Symbol, Orb::Models::Discount::TieredPercentage::Filter::Field]
|
|
110
|
+
required :field, enum: -> { Orb::Discount::TieredPercentage::Filter::Field }
|
|
111
|
+
|
|
112
|
+
# @!attribute operator
|
|
113
|
+
# Should prices that match the filter be included or excluded.
|
|
114
|
+
#
|
|
115
|
+
# @return [Symbol, Orb::Models::Discount::TieredPercentage::Filter::Operator]
|
|
116
|
+
required :operator, enum: -> { Orb::Discount::TieredPercentage::Filter::Operator }
|
|
117
|
+
|
|
118
|
+
# @!attribute values
|
|
119
|
+
# The IDs or values that match this filter.
|
|
120
|
+
#
|
|
121
|
+
# @return [Array<String>]
|
|
122
|
+
required :values, Orb::Internal::Type::ArrayOf[String]
|
|
123
|
+
|
|
124
|
+
# @!method initialize(field:, operator:, values:)
|
|
125
|
+
# @param field [Symbol, Orb::Models::Discount::TieredPercentage::Filter::Field] The property of the price to filter on.
|
|
126
|
+
#
|
|
127
|
+
# @param operator [Symbol, Orb::Models::Discount::TieredPercentage::Filter::Operator] Should prices that match the filter be included or excluded.
|
|
128
|
+
#
|
|
129
|
+
# @param values [Array<String>] The IDs or values that match this filter.
|
|
130
|
+
|
|
131
|
+
# The property of the price to filter on.
|
|
132
|
+
#
|
|
133
|
+
# @see Orb::Models::Discount::TieredPercentage::Filter#field
|
|
134
|
+
module Field
|
|
135
|
+
extend Orb::Internal::Type::Enum
|
|
136
|
+
|
|
137
|
+
PRICE_ID = :price_id
|
|
138
|
+
ITEM_ID = :item_id
|
|
139
|
+
PRICE_TYPE = :price_type
|
|
140
|
+
CURRENCY = :currency
|
|
141
|
+
PRICING_UNIT_ID = :pricing_unit_id
|
|
142
|
+
|
|
143
|
+
# @!method self.values
|
|
144
|
+
# @return [Array<Symbol>]
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
# Should prices that match the filter be included or excluded.
|
|
148
|
+
#
|
|
149
|
+
# @see Orb::Models::Discount::TieredPercentage::Filter#operator
|
|
150
|
+
module Operator
|
|
151
|
+
extend Orb::Internal::Type::Enum
|
|
152
|
+
|
|
153
|
+
INCLUDES = :includes
|
|
154
|
+
EXCLUDES = :excludes
|
|
155
|
+
|
|
156
|
+
# @!method self.values
|
|
157
|
+
# @return [Array<Symbol>]
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
18
162
|
# @!method self.variants
|
|
19
|
-
# @return [Array(Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount)]
|
|
163
|
+
# @return [Array(Orb::Models::PercentageDiscount, Orb::Models::TrialDiscount, Orb::Models::UsageDiscount, Orb::Models::AmountDiscount, Orb::Models::Discount::TieredPercentage)]
|
|
20
164
|
end
|
|
21
165
|
end
|
|
22
166
|
end
|