orb-billing 1.13.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 +55 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +21 -0
- data/lib/orb/internal/transport/base_client.rb +5 -0
- data/lib/orb/internal/type/union.rb +13 -27
- data/lib/orb/internal/util.rb +22 -7
- 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 +114 -1
- data/lib/orb/models/alert_create_for_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_external_customer_params.rb +8 -1
- data/lib/orb/models/alert_create_for_subscription_params.rb +142 -1
- data/lib/orb/models/alert_disable_params.rb +8 -1
- data/lib/orb/models/alert_enable_params.rb +8 -1
- data/lib/orb/models/alert_retrieve_params.rb +7 -1
- data/lib/orb/models/alert_update_params.rb +120 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +3296 -631
- data/lib/orb/models/beta/external_plan_id_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta/external_plan_id_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/beta_create_plan_version_params.rb +3263 -622
- data/lib/orb/models/beta_fetch_plan_version_params.rb +7 -1
- data/lib/orb/models/beta_set_default_plan_version_params.rb +8 -1
- data/lib/orb/models/changed_subscription_resources.rb +200 -10
- data/lib/orb/models/conversion_rate_config.rb +18 -0
- data/lib/orb/models/coupon_archive_params.rb +7 -1
- data/lib/orb/models/coupon_fetch_params.rb +7 -1
- data/lib/orb/models/coupons/subscription_list_params.rb +8 -1
- data/lib/orb/models/credit_block_delete_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_params.rb +7 -1
- data/lib/orb/models/credit_block_list_invoices_response.rb +155 -1
- data/lib/orb/models/credit_block_retrieve_params.rb +7 -1
- data/lib/orb/models/credit_block_retrieve_response.rb +150 -1
- data/lib/orb/models/credit_note_fetch_params.rb +7 -1
- data/lib/orb/models/customer.rb +122 -3
- data/lib/orb/models/customer_create_params.rb +17 -1
- data/lib/orb/models/customer_delete_params.rb +7 -1
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +7 -1
- data/lib/orb/models/customer_fetch_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +7 -1
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +7 -1
- data/lib/orb/models/customer_tax_id.rb +15 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +39 -5
- data/lib/orb/models/customer_update_params.rb +39 -5
- data/lib/orb/models/customers/balance_transaction_create_params.rb +8 -1
- data/lib/orb/models/customers/balance_transaction_list_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/cost_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +155 -1
- data/lib/orb/models/customers/credit_list_params.rb +8 -1
- data/lib/orb/models/customers/credit_list_response.rb +152 -1
- data/lib/orb/models/customers/credits/decrement_ledger_entry.rb +5 -1
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +582 -315
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +580 -313
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +7 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +8 -1
- data/lib/orb/models/customers/credits/top_up_list_params.rb +8 -1
- data/lib/orb/models/dimensional_price_group.rb +1 -1
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_group_update_params.rb +8 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +7 -1
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rb +8 -1
- data/lib/orb/models/discount.rb +145 -1
- data/lib/orb/models/event_deprecate_params.rb +7 -1
- data/lib/orb/models/event_ingest_params.rb +5 -2
- data/lib/orb/models/event_update_params.rb +8 -1
- data/lib/orb/models/events/backfill_close_params.rb +7 -1
- data/lib/orb/models/events/backfill_fetch_params.rb +7 -1
- data/lib/orb/models/events/backfill_revert_params.rb +7 -1
- data/lib/orb/models/invoice.rb +198 -10
- data/lib/orb/models/invoice_create_params.rb +6 -5
- data/lib/orb/models/invoice_delete_line_item_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +200 -10
- data/lib/orb/models/invoice_issue_params.rb +8 -1
- data/lib/orb/models/invoice_issue_summary_params.rb +8 -1
- 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/invoice_mark_paid_params.rb +8 -1
- data/lib/orb/models/invoice_pay_params.rb +16 -1
- data/lib/orb/models/invoice_update_params.rb +8 -1
- data/lib/orb/models/invoice_void_params.rb +7 -1
- data/lib/orb/models/item_archive_params.rb +7 -1
- data/lib/orb/models/item_fetch_params.rb +7 -1
- data/lib/orb/models/item_update_params.rb +8 -1
- data/lib/orb/models/license_deactivate_params.rb +8 -1
- data/lib/orb/models/license_retrieve_by_external_id_params.rb +8 -1
- data/lib/orb/models/license_retrieve_params.rb +7 -1
- data/lib/orb/models/license_type_retrieve_params.rb +7 -1
- data/lib/orb/models/licenses/external_license_get_usage_params.rb +11 -4
- data/lib/orb/models/licenses/usage_get_all_usage_params.rb +3 -3
- data/lib/orb/models/licenses/usage_get_usage_params.rb +11 -4
- data/lib/orb/models/metric_fetch_params.rb +7 -1
- data/lib/orb/models/metric_update_params.rb +8 -1
- 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 +1478 -158
- data/lib/orb/models/plan_fetch_params.rb +7 -1
- data/lib/orb/models/plan_update_params.rb +16 -1
- data/lib/orb/models/plan_version.rb +186 -5
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +16 -1
- data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
- data/lib/orb/models/plans/migration_cancel_response.rb +22 -4
- data/lib/orb/models/plans/migration_list_params.rb +8 -1
- data/lib/orb/models/plans/migration_list_response.rb +22 -4
- data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
- data/lib/orb/models/plans/migration_retrieve_response.rb +22 -4
- data/lib/orb/models/price.rb +2807 -1244
- data/lib/orb/models/price_create_params.rb +1800 -1355
- data/lib/orb/models/price_evaluate_multiple_params.rb +889 -54
- data/lib/orb/models/price_evaluate_params.rb +8 -1
- data/lib/orb/models/price_evaluate_preview_events_params.rb +881 -46
- data/lib/orb/models/price_fetch_params.rb +7 -1
- data/lib/orb/models/price_interval.rb +2 -2
- data/lib/orb/models/price_update_params.rb +8 -1
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +7 -1
- data/lib/orb/models/prices/external_price_id_update_params.rb +8 -1
- data/lib/orb/models/subscription.rb +168 -4
- data/lib/orb/models/subscription_cancel_params.rb +8 -1
- data/lib/orb/models/subscription_change_apply_params.rb +8 -1
- data/lib/orb/models/subscription_change_cancel_params.rb +7 -1
- data/lib/orb/models/subscription_change_retrieve_params.rb +7 -1
- data/lib/orb/models/subscription_create_params.rb +2818 -674
- data/lib/orb/models/subscription_fetch_costs_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_params.rb +7 -1
- data/lib/orb/models/subscription_fetch_schedule_params.rb +8 -1
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -1
- data/lib/orb/models/subscription_price_intervals_params.rb +1103 -55
- data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +2839 -685
- data/lib/orb/models/subscription_trigger_phase_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +7 -1
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +8 -1
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +7 -1
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -1
- data/lib/orb/models/subscription_update_params.rb +19 -1
- data/lib/orb/models/subscription_update_trial_params.rb +8 -1
- data/lib/orb/models.rb +2 -0
- data/lib/orb/resources/alerts.rb +20 -2
- data/lib/orb/resources/coupons.rb +1 -2
- data/lib/orb/resources/credit_blocks.rb +11 -8
- data/lib/orb/resources/customers/credits/ledger.rb +40 -81
- data/lib/orb/resources/customers.rb +12 -7
- data/lib/orb/resources/events/backfills.rb +3 -4
- data/lib/orb/resources/events.rb +7 -34
- data/lib/orb/resources/invoices.rb +18 -7
- 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 +13 -104
- data/lib/orb/resources/subscriptions.rb +24 -7
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/internal/util.rbi +8 -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 +182 -3
- data/rbi/orb/models/alert_create_for_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +6 -0
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +285 -0
- data/rbi/orb/models/alert_disable_params.rbi +6 -0
- data/rbi/orb/models/alert_enable_params.rbi +6 -0
- data/rbi/orb/models/alert_retrieve_params.rbi +13 -5
- data/rbi/orb/models/alert_update_params.rbi +214 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +5873 -1161
- data/rbi/orb/models/beta/external_plan_id_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta/external_plan_id_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/beta_create_plan_version_params.rbi +5877 -1165
- data/rbi/orb/models/beta_fetch_plan_version_params.rbi +10 -2
- data/rbi/orb/models/beta_set_default_plan_version_params.rbi +10 -1
- data/rbi/orb/models/changed_subscription_resources.rbi +360 -5
- data/rbi/orb/models/conversion_rate_config.rbi +18 -0
- data/rbi/orb/models/coupon_archive_params.rbi +13 -5
- data/rbi/orb/models/coupon_fetch_params.rbi +13 -5
- data/rbi/orb/models/coupons/subscription_list_params.rbi +6 -0
- data/rbi/orb/models/credit_block_delete_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_params.rbi +13 -5
- data/rbi/orb/models/credit_block_list_invoices_response.rbi +346 -3
- data/rbi/orb/models/credit_block_retrieve_params.rbi +13 -5
- data/rbi/orb/models/credit_block_retrieve_response.rbi +344 -3
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer.rbi +202 -0
- data/rbi/orb/models/customer_create_params.rbi +27 -0
- data/rbi/orb/models/customer_delete_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -5
- data/rbi/orb/models/customer_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +13 -5
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +13 -5
- data/rbi/orb/models/customer_tax_id.rbi +15 -1
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +51 -4
- data/rbi/orb/models/customer_update_params.rbi +51 -4
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +6 -0
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/cost_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +346 -3
- data/rbi/orb/models/customers/credit_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credit_list_response.rbi +347 -3
- data/rbi/orb/models/customers/credits/decrement_ledger_entry.rbi +4 -0
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +861 -478
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +6 -1
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +10 -2
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_group.rbi +1 -1
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_group_update_params.rbi +6 -0
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +16 -5
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbi +6 -0
- data/rbi/orb/models/discount.rbi +269 -1
- data/rbi/orb/models/event_deprecate_params.rbi +13 -5
- data/rbi/orb/models/event_ingest_params.rbi +4 -2
- data/rbi/orb/models/event_update_params.rbi +6 -0
- data/rbi/orb/models/events/backfill_close_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -5
- data/rbi/orb/models/events/backfill_revert_params.rbi +13 -5
- data/rbi/orb/models/invoice.rbi +360 -5
- data/rbi/orb/models/invoice_create_params.rbi +12 -7
- data/rbi/orb/models/invoice_delete_line_item_params.rbi +10 -2
- data/rbi/orb/models/invoice_fetch_params.rbi +13 -5
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +360 -5
- data/rbi/orb/models/invoice_issue_params.rbi +10 -1
- data/rbi/orb/models/invoice_issue_summary_params.rbi +10 -1
- 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/invoice_mark_paid_params.rbi +6 -0
- data/rbi/orb/models/invoice_pay_params.rbi +27 -5
- data/rbi/orb/models/invoice_update_params.rbi +6 -0
- data/rbi/orb/models/invoice_void_params.rbi +13 -5
- data/rbi/orb/models/item_archive_params.rbi +13 -5
- data/rbi/orb/models/item_fetch_params.rbi +13 -5
- data/rbi/orb/models/item_update_params.rbi +6 -0
- data/rbi/orb/models/license_deactivate_params.rbi +10 -1
- data/rbi/orb/models/license_retrieve_by_external_id_params.rbi +6 -0
- data/rbi/orb/models/license_retrieve_params.rbi +13 -5
- data/rbi/orb/models/license_type_retrieve_params.rbi +13 -5
- data/rbi/orb/models/licenses/external_license_get_usage_params.rbi +9 -3
- data/rbi/orb/models/licenses/usage_get_all_usage_params.rbi +3 -3
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +9 -3
- data/rbi/orb/models/metric_fetch_params.rbi +13 -5
- data/rbi/orb/models/metric_update_params.rbi +6 -0
- 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 +2566 -209
- data/rbi/orb/models/plan_fetch_params.rbi +13 -5
- data/rbi/orb/models/plan_update_params.rbi +14 -0
- data/rbi/orb/models/plan_version.rbi +339 -0
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +14 -0
- data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_cancel_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_list_response.rbi +22 -1
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_retrieve_response.rbi +22 -1
- data/rbi/orb/models/price.rbi +4733 -2280
- data/rbi/orb/models/price_create_params.rbi +3022 -2408
- data/rbi/orb/models/price_evaluate_multiple_params.rbi +1540 -114
- data/rbi/orb/models/price_evaluate_params.rbi +6 -0
- data/rbi/orb/models/price_evaluate_preview_events_params.rbi +1540 -114
- data/rbi/orb/models/price_fetch_params.rbi +13 -5
- data/rbi/orb/models/price_interval.rbi +3 -0
- data/rbi/orb/models/price_update_params.rbi +6 -0
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +13 -5
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +6 -0
- data/rbi/orb/models/subscription.rbi +324 -2
- data/rbi/orb/models/subscription_cancel_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_apply_params.rbi +6 -0
- data/rbi/orb/models/subscription_change_cancel_params.rbi +16 -5
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +16 -5
- data/rbi/orb/models/subscription_create_params.rbi +4998 -1186
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_params.rbi +13 -5
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +6 -0
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +6 -0
- data/rbi/orb/models/subscription_price_intervals_params.rbi +2133 -264
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +5001 -1183
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +6 -0
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +13 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +10 -1
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +13 -5
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +6 -0
- data/rbi/orb/models/subscription_update_params.rbi +20 -0
- data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
- data/rbi/orb/models.rbi +2 -0
- data/rbi/orb/resources/alerts.rbi +43 -0
- data/rbi/orb/resources/coupons.rbi +1 -2
- data/rbi/orb/resources/credit_blocks.rbi +10 -7
- data/rbi/orb/resources/customers/credits/ledger.rbi +50 -146
- data/rbi/orb/resources/customers.rbi +35 -7
- data/rbi/orb/resources/events/backfills.rbi +3 -4
- data/rbi/orb/resources/events.rbi +8 -35
- data/rbi/orb/resources/invoices.rbi +20 -6
- 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 +38 -184
- data/rbi/orb/resources/subscriptions.rbi +33 -4
- data/sig/orb/client.rbs +3 -0
- data/sig/orb/internal/util.rbs +4 -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 +90 -3
- data/sig/orb/models/alert_create_for_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +5 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +98 -1
- data/sig/orb/models/alert_disable_params.rbs +6 -1
- data/sig/orb/models/alert_enable_params.rbs +6 -1
- data/sig/orb/models/alert_retrieve_params.rbs +9 -3
- data/sig/orb/models/alert_update_params.rbs +90 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +2318 -397
- data/sig/orb/models/beta/external_plan_id_fetch_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta/external_plan_id_set_default_plan_version_params.rbs +6 -1
- data/sig/orb/models/beta_create_plan_version_params.rbs +2300 -389
- data/sig/orb/models/beta_fetch_plan_version_params.rbs +10 -2
- data/sig/orb/models/beta_set_default_plan_version_params.rbs +10 -2
- data/sig/orb/models/changed_subscription_resources.rbs +140 -1
- data/sig/orb/models/conversion_rate_config.rbs +12 -0
- data/sig/orb/models/coupon_archive_params.rbs +12 -3
- data/sig/orb/models/coupon_fetch_params.rbs +12 -3
- data/sig/orb/models/coupons/subscription_list_params.rbs +5 -1
- data/sig/orb/models/credit_block_delete_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_params.rbs +8 -3
- data/sig/orb/models/credit_block_list_invoices_response.rbs +124 -3
- data/sig/orb/models/credit_block_retrieve_params.rbs +8 -3
- data/sig/orb/models/credit_block_retrieve_response.rbs +124 -3
- data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
- data/sig/orb/models/customer.rbs +79 -1
- data/sig/orb/models/customer_create_params.rbs +12 -1
- data/sig/orb/models/customer_delete_params.rbs +12 -3
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +11 -3
- data/sig/orb/models/customer_fetch_params.rbs +12 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +11 -3
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +11 -3
- data/sig/orb/models/customer_tax_id.rbs +20 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +22 -1
- data/sig/orb/models/customer_update_params.rbs +22 -1
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +5 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/cost_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +124 -3
- data/sig/orb/models/customers/credit_list_params.rbs +5 -0
- data/sig/orb/models/customers/credit_list_response.rbs +124 -3
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +345 -157
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +6 -1
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +5 -1
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +5 -1
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_group_update_params.rbs +5 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +12 -3
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_update_params.rbs +5 -0
- data/sig/orb/models/discount.rbs +114 -0
- data/sig/orb/models/event_deprecate_params.rbs +9 -3
- data/sig/orb/models/event_update_params.rbs +5 -0
- data/sig/orb/models/events/backfill_close_params.rbs +11 -3
- data/sig/orb/models/events/backfill_fetch_params.rbs +11 -3
- data/sig/orb/models/events/backfill_revert_params.rbs +11 -3
- data/sig/orb/models/invoice.rbs +140 -1
- data/sig/orb/models/invoice_delete_line_item_params.rbs +6 -1
- data/sig/orb/models/invoice_fetch_params.rbs +12 -3
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +140 -1
- data/sig/orb/models/invoice_issue_params.rbs +6 -1
- data/sig/orb/models/invoice_issue_summary_params.rbs +6 -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/invoice_mark_paid_params.rbs +10 -1
- data/sig/orb/models/invoice_pay_params.rbs +17 -3
- data/sig/orb/models/invoice_update_params.rbs +5 -0
- data/sig/orb/models/invoice_void_params.rbs +12 -3
- data/sig/orb/models/item_archive_params.rbs +9 -3
- data/sig/orb/models/item_fetch_params.rbs +9 -3
- data/sig/orb/models/item_update_params.rbs +5 -0
- data/sig/orb/models/license_deactivate_params.rbs +10 -2
- data/sig/orb/models/license_retrieve_by_external_id_params.rbs +9 -1
- data/sig/orb/models/license_retrieve_params.rbs +11 -3
- data/sig/orb/models/license_type_retrieve_params.rbs +11 -3
- data/sig/orb/models/licenses/external_license_get_usage_params.rbs +9 -4
- data/sig/orb/models/licenses/usage_get_all_usage_params.rbs +4 -4
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +9 -4
- data/sig/orb/models/metric_fetch_params.rbs +12 -3
- data/sig/orb/models/metric_update_params.rbs +5 -1
- 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 +1030 -72
- data/sig/orb/models/plan_fetch_params.rbs +9 -3
- data/sig/orb/models/plan_update_params.rbs +14 -1
- data/sig/orb/models/plan_version.rbs +134 -0
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +14 -1
- data/sig/orb/models/plans/migration_cancel_params.rbs +6 -1
- data/sig/orb/models/plans/migration_list_params.rbs +5 -1
- data/sig/orb/models/plans/migration_retrieve_params.rbs +6 -1
- data/sig/orb/models/price.rbs +2361 -1156
- data/sig/orb/models/price_create_params.rbs +1124 -931
- data/sig/orb/models/price_evaluate_multiple_params.rbs +626 -23
- data/sig/orb/models/price_evaluate_params.rbs +5 -0
- data/sig/orb/models/price_evaluate_preview_events_params.rbs +626 -23
- data/sig/orb/models/price_fetch_params.rbs +9 -3
- data/sig/orb/models/price_update_params.rbs +5 -1
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +11 -3
- data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -1
- data/sig/orb/models/subscription.rbs +124 -0
- data/sig/orb/models/subscription_cancel_params.rbs +5 -0
- data/sig/orb/models/subscription_change_apply_params.rbs +5 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +12 -3
- data/sig/orb/models/subscription_change_retrieve_params.rbs +12 -3
- data/sig/orb/models/subscription_create_params.rbs +2009 -430
- data/sig/orb/models/subscription_fetch_costs_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_params.rbs +11 -3
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +5 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +5 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +800 -23
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2014 -430
- data/sig/orb/models/subscription_trigger_phase_params.rbs +9 -1
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +11 -3
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +10 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +11 -3
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +5 -0
- data/sig/orb/models/subscription_update_params.rbs +10 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
- data/sig/orb/models.rbs +2 -0
- data/sig/orb/resources/alerts.rbs +6 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
- data/sig/orb/resources/customers.rbs +2 -0
- data/sig/orb/resources/invoices.rbs +1 -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/prices.rbs +1 -48
- data/sig/orb/resources/subscriptions.rbs +3 -0
- metadata +6 -7
|
@@ -7,6 +7,11 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute allow_invoice_credit_or_void
|
|
11
16
|
# If false, this request will fail if it would void an issued invoice or create a
|
|
12
17
|
# credit note. Consider using this as a safety mechanism if you do not expect
|
|
@@ -22,10 +27,12 @@ module Orb
|
|
|
22
27
|
# @return [Date, nil]
|
|
23
28
|
optional :effective_date, Date, nil?: true
|
|
24
29
|
|
|
25
|
-
# @!method initialize(allow_invoice_credit_or_void: nil, effective_date: nil, request_options: {})
|
|
30
|
+
# @!method initialize(subscription_id:, allow_invoice_credit_or_void: nil, effective_date: nil, request_options: {})
|
|
26
31
|
# Some parameter documentations has been truncated, see
|
|
27
32
|
# {Orb::Models::SubscriptionTriggerPhaseParams} for more details.
|
|
28
33
|
#
|
|
34
|
+
# @param subscription_id [String]
|
|
35
|
+
#
|
|
29
36
|
# @param allow_invoice_credit_or_void [Boolean, nil] If false, this request will fail if it would void an issued invoice or create a
|
|
30
37
|
#
|
|
31
38
|
# @param effective_date [Date, nil] The date on which the phase change should take effect. If not provided, defaults
|
|
@@ -7,7 +7,13 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(subscription_id:, request_options: {})
|
|
16
|
+
# @param subscription_id [String]
|
|
11
17
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,13 +7,20 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute price_id
|
|
11
16
|
# Price for which the updates should be cleared. Must be a fixed fee.
|
|
12
17
|
#
|
|
13
18
|
# @return [String]
|
|
14
19
|
required :price_id, String
|
|
15
20
|
|
|
16
|
-
# @!method initialize(price_id:, request_options: {})
|
|
21
|
+
# @!method initialize(subscription_id:, price_id:, request_options: {})
|
|
22
|
+
# @param subscription_id [String]
|
|
23
|
+
#
|
|
17
24
|
# @param price_id [String] Price for which the updates should be cleared. Must be a fixed fee.
|
|
18
25
|
#
|
|
19
26
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
@@ -7,7 +7,13 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
-
# @!
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
15
|
+
# @!method initialize(subscription_id:, request_options: {})
|
|
16
|
+
# @param subscription_id [String]
|
|
11
17
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
|
12
18
|
end
|
|
13
19
|
end
|
|
@@ -7,6 +7,11 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute price_id
|
|
11
16
|
# Price for which the quantity should be updated. Must be a fixed fee.
|
|
12
17
|
#
|
|
@@ -42,10 +47,12 @@ module Orb
|
|
|
42
47
|
# @return [Date, nil]
|
|
43
48
|
optional :effective_date, Date, nil?: true
|
|
44
49
|
|
|
45
|
-
# @!method initialize(price_id:, quantity:, allow_invoice_credit_or_void: nil, change_option: nil, effective_date: nil, request_options: {})
|
|
50
|
+
# @!method initialize(subscription_id:, price_id:, quantity:, allow_invoice_credit_or_void: nil, change_option: nil, effective_date: nil, request_options: {})
|
|
46
51
|
# Some parameter documentations has been truncated, see
|
|
47
52
|
# {Orb::Models::SubscriptionUpdateFixedFeeQuantityParams} for more details.
|
|
48
53
|
#
|
|
54
|
+
# @param subscription_id [String]
|
|
55
|
+
#
|
|
49
56
|
# @param price_id [String] Price for which the quantity should be updated. Must be a fixed fee.
|
|
50
57
|
#
|
|
51
58
|
# @param quantity [Float]
|
|
@@ -7,6 +7,11 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute auto_collection
|
|
11
16
|
# Determines whether issued invoices for this subscription will automatically be
|
|
12
17
|
# charged with the saved payment method on the due date. This property defaults to
|
|
@@ -15,6 +20,15 @@ module Orb
|
|
|
15
20
|
# @return [Boolean, nil]
|
|
16
21
|
optional :auto_collection, Orb::Internal::Type::Boolean, nil?: true
|
|
17
22
|
|
|
23
|
+
# @!attribute auto_issuance
|
|
24
|
+
# Used to determine if invoices for this subscription will be automatically
|
|
25
|
+
# issued. If true, invoices will be automatically issued. If false, invoices will
|
|
26
|
+
# require manual approval. If `null` is specified, this defaults to the behavior
|
|
27
|
+
# configured for this customer.
|
|
28
|
+
#
|
|
29
|
+
# @return [Boolean, nil]
|
|
30
|
+
optional :auto_issuance, Orb::Internal::Type::Boolean, nil?: true
|
|
31
|
+
|
|
18
32
|
# @!attribute default_invoice_memo
|
|
19
33
|
# Determines the default memo on this subscription's invoices. Note that if this
|
|
20
34
|
# is not provided, it is determined by the plan configuration.
|
|
@@ -47,12 +61,16 @@ module Orb
|
|
|
47
61
|
# @return [Integer, nil]
|
|
48
62
|
optional :net_terms, Integer, nil?: true
|
|
49
63
|
|
|
50
|
-
# @!method initialize(auto_collection: nil, default_invoice_memo: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, request_options: {})
|
|
64
|
+
# @!method initialize(subscription_id:, auto_collection: nil, auto_issuance: nil, default_invoice_memo: nil, invoicing_threshold: nil, metadata: nil, net_terms: nil, request_options: {})
|
|
51
65
|
# Some parameter documentations has been truncated, see
|
|
52
66
|
# {Orb::Models::SubscriptionUpdateParams} for more details.
|
|
53
67
|
#
|
|
68
|
+
# @param subscription_id [String]
|
|
69
|
+
#
|
|
54
70
|
# @param auto_collection [Boolean, nil] Determines whether issued invoices for this subscription will automatically be c
|
|
55
71
|
#
|
|
72
|
+
# @param auto_issuance [Boolean, nil] Used to determine if invoices for this subscription will be automatically issued
|
|
73
|
+
#
|
|
56
74
|
# @param default_invoice_memo [String, nil] Determines the default memo on this subscription's invoices. Note that if this i
|
|
57
75
|
#
|
|
58
76
|
# @param invoicing_threshold [String, nil] When this subscription's accrued usage reaches this threshold, an invoice will b
|
|
@@ -7,6 +7,11 @@ module Orb
|
|
|
7
7
|
extend Orb::Internal::Type::RequestParameters::Converter
|
|
8
8
|
include Orb::Internal::Type::RequestParameters
|
|
9
9
|
|
|
10
|
+
# @!attribute subscription_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :subscription_id, String
|
|
14
|
+
|
|
10
15
|
# @!attribute trial_end_date
|
|
11
16
|
# The new date that the trial should end, or the literal string `immediate` to end
|
|
12
17
|
# the trial immediately.
|
|
@@ -21,10 +26,12 @@ module Orb
|
|
|
21
26
|
# @return [Boolean, nil]
|
|
22
27
|
optional :shift, Orb::Internal::Type::Boolean
|
|
23
28
|
|
|
24
|
-
# @!method initialize(trial_end_date:, shift: nil, request_options: {})
|
|
29
|
+
# @!method initialize(subscription_id:, trial_end_date:, shift: nil, request_options: {})
|
|
25
30
|
# Some parameter documentations has been truncated, see
|
|
26
31
|
# {Orb::Models::SubscriptionUpdateTrialParams} for more details.
|
|
27
32
|
#
|
|
33
|
+
# @param subscription_id [String]
|
|
34
|
+
#
|
|
28
35
|
# @param trial_end_date [Time, Symbol, Orb::Models::SubscriptionUpdateTrialParams::TrialEndDate] The new date that the trial should end, or the literal string `immediate` to end
|
|
29
36
|
#
|
|
30
37
|
# @param shift [Boolean] If true, shifts subsequent price and adjustment intervals (preserving their dura
|
data/lib/orb/models.rb
CHANGED
|
@@ -97,6 +97,8 @@ module Orb
|
|
|
97
97
|
|
|
98
98
|
ChangedSubscriptionResources = Orb::Models::ChangedSubscriptionResources
|
|
99
99
|
|
|
100
|
+
ConversionRateConfig = Orb::Models::ConversionRateConfig
|
|
101
|
+
|
|
100
102
|
ConversionRateTier = Orb::Models::ConversionRateTier
|
|
101
103
|
|
|
102
104
|
ConversionRateTieredConfig = Orb::Models::ConversionRateTieredConfig
|
data/lib/orb/resources/alerts.rb
CHANGED
|
@@ -27,14 +27,21 @@ module Orb
|
|
|
27
27
|
)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
# Some parameter documentations has been truncated, see
|
|
31
|
+
# {Orb::Models::AlertUpdateParams} for more details.
|
|
32
|
+
#
|
|
30
33
|
# This endpoint updates the thresholds of an alert.
|
|
31
34
|
#
|
|
32
|
-
# @overload update(alert_configuration_id, thresholds:, request_options: {})
|
|
35
|
+
# @overload update(alert_configuration_id, thresholds:, price_filters: nil, threshold_overrides: nil, request_options: {})
|
|
33
36
|
#
|
|
34
37
|
# @param alert_configuration_id [String]
|
|
35
38
|
#
|
|
36
39
|
# @param thresholds [Array<Orb::Models::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
|
37
40
|
#
|
|
41
|
+
# @param price_filters [Array<Orb::Models::AlertUpdateParams::PriceFilter>, nil] Replaces the price filters on a grouped cost alert; an empty list clears them. O
|
|
42
|
+
#
|
|
43
|
+
# @param threshold_overrides [Array<Orb::Models::AlertUpdateParams::ThresholdOverride>, nil] Replaces the per-group threshold overrides on a grouped cost alert; an empty lis
|
|
44
|
+
#
|
|
38
45
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
39
46
|
#
|
|
40
47
|
# @return [Orb::Models::Alert]
|
|
@@ -179,6 +186,9 @@ module Orb
|
|
|
179
186
|
)
|
|
180
187
|
end
|
|
181
188
|
|
|
189
|
+
# Some parameter documentations has been truncated, see
|
|
190
|
+
# {Orb::Models::AlertCreateForSubscriptionParams} for more details.
|
|
191
|
+
#
|
|
182
192
|
# This endpoint is used to create alerts at the subscription level.
|
|
183
193
|
#
|
|
184
194
|
# Subscription level alerts can be one of two types: `usage_exceeded` or
|
|
@@ -191,7 +201,7 @@ module Orb
|
|
|
191
201
|
# per metric that is a part of the subscription. Alerts are triggered based on
|
|
192
202
|
# usage or cost conditions met during the current billing cycle.
|
|
193
203
|
#
|
|
194
|
-
# @overload create_for_subscription(subscription_id, thresholds:, type:, metric_id: nil, request_options: {})
|
|
204
|
+
# @overload create_for_subscription(subscription_id, thresholds:, type:, currency: nil, grouping_keys: nil, metric_id: nil, price_filters: nil, threshold_overrides: nil, request_options: {})
|
|
195
205
|
#
|
|
196
206
|
# @param subscription_id [String]
|
|
197
207
|
#
|
|
@@ -199,8 +209,16 @@ module Orb
|
|
|
199
209
|
#
|
|
200
210
|
# @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type.
|
|
201
211
|
#
|
|
212
|
+
# @param currency [String, nil] The case sensitive currency or custom pricing unit to use for grouped cost alert
|
|
213
|
+
#
|
|
214
|
+
# @param grouping_keys [Array<String>, nil] The property keys to group cost alerts by. Only applicable for cost_exceeded ale
|
|
215
|
+
#
|
|
202
216
|
# @param metric_id [String, nil] The metric to track usage for.
|
|
203
217
|
#
|
|
218
|
+
# @param price_filters [Array<Orb::Models::AlertCreateForSubscriptionParams::PriceFilter>, nil] Filters to scope which prices are included in grouped cost alert evaluation. Sup
|
|
219
|
+
#
|
|
220
|
+
# @param threshold_overrides [Array<Orb::Models::AlertCreateForSubscriptionParams::ThresholdOverride>, nil] Per-group threshold overrides. Each override maps a specific combination of grou
|
|
221
|
+
#
|
|
204
222
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
205
223
|
#
|
|
206
224
|
# @return [Orb::Models::Alert]
|
|
@@ -49,8 +49,7 @@ module Orb
|
|
|
49
49
|
#
|
|
50
50
|
# The list of coupons is ordered starting from the most recently created coupon.
|
|
51
51
|
# The response also includes `pagination_metadata`, which lets the caller retrieve
|
|
52
|
-
# the next page of results if they exist.
|
|
53
|
-
# found in the Pagination-metadata schema.
|
|
52
|
+
# the next page of results if they exist.
|
|
54
53
|
#
|
|
55
54
|
# @overload list(cursor: nil, limit: nil, redemption_code: nil, show_archived: nil, request_options: {})
|
|
56
55
|
#
|
|
@@ -59,14 +59,17 @@ module Orb
|
|
|
59
59
|
|
|
60
60
|
# This endpoint returns the credit block and its associated purchasing invoices.
|
|
61
61
|
#
|
|
62
|
-
# If a credit block was purchased (as opposed to being manually added
|
|
63
|
-
#
|
|
64
|
-
#
|
|
65
|
-
#
|
|
66
|
-
#
|
|
67
|
-
#
|
|
68
|
-
#
|
|
69
|
-
#
|
|
62
|
+
# If a credit block was purchased (as opposed to being manually added), this
|
|
63
|
+
# endpoint returns the invoices that were created to charge the customer for the
|
|
64
|
+
# credit block. For credit blocks with payment schedules spanning multiple periods
|
|
65
|
+
# (e.g., monthly payments over 12 months), multiple invoices will be returned.
|
|
66
|
+
#
|
|
67
|
+
# For credit blocks created by subscription allocation prices, this endpoint
|
|
68
|
+
# returns the subscription invoice containing the allocation line item that
|
|
69
|
+
# created the block.
|
|
70
|
+
#
|
|
71
|
+
# If the credit block was not purchased (e.g., manual increment), an empty
|
|
72
|
+
# invoices list is returned.
|
|
70
73
|
#
|
|
71
74
|
# **Note: This endpoint is currently experimental and its interface may change in
|
|
72
75
|
# future releases. Please contact support before building production integrations
|
|
@@ -137,9 +137,6 @@ module Orb
|
|
|
137
137
|
)
|
|
138
138
|
end
|
|
139
139
|
|
|
140
|
-
# Some parameter documentations has been truncated, see
|
|
141
|
-
# {Orb::Models::Customers::Credits::LedgerCreateEntryParams} for more details.
|
|
142
|
-
#
|
|
143
140
|
# This endpoint allows you to create a new ledger entry for a specified customer's
|
|
144
141
|
# balance. This can be used to increment balance, deduct credits, and change the
|
|
145
142
|
# expiry date of existing credits.
|
|
@@ -180,8 +177,9 @@ module Orb
|
|
|
180
177
|
# }
|
|
181
178
|
# ```
|
|
182
179
|
#
|
|
183
|
-
# Note that
|
|
184
|
-
#
|
|
180
|
+
# Note that an `increment` entry always creates a new credit block (defined by the
|
|
181
|
+
# optional `effective_date` and `expiry_date`); it never modifies an existing
|
|
182
|
+
# block.
|
|
185
183
|
#
|
|
186
184
|
# ### Invoicing for credits
|
|
187
185
|
#
|
|
@@ -190,7 +188,9 @@ module Orb
|
|
|
190
188
|
# also generate a one-off invoice for the customer for the credits pre-purchase.
|
|
191
189
|
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
|
|
192
190
|
# on the invoice are calculated by multiplying the cost basis with the number of
|
|
193
|
-
# credit units added.
|
|
191
|
+
# credit units added. If you invoice or handle payment of credits outside of Orb
|
|
192
|
+
# (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
|
|
193
|
+
# `true` to prevent duplicate invoicing effects.
|
|
194
194
|
#
|
|
195
195
|
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
|
|
196
196
|
# and `invoice_settings` must be included
|
|
@@ -200,11 +200,17 @@ module Orb
|
|
|
200
200
|
# ## Deducting Credits
|
|
201
201
|
#
|
|
202
202
|
# Orb allows you to deduct credits from a customer by creating an entry of type
|
|
203
|
-
# `decrement`.
|
|
204
|
-
#
|
|
205
|
-
#
|
|
206
|
-
#
|
|
207
|
-
#
|
|
203
|
+
# `decrement`. A `decrement` entry records credits as usage and immediately
|
|
204
|
+
# recognizes revenue at the block's `per_unit_cost_basis`.
|
|
205
|
+
#
|
|
206
|
+
# For most credit removals, use `void` (no revenue impact) or `expiration_change`
|
|
207
|
+
# (revenue recognized on expiration) instead. Only use `decrement` when credits
|
|
208
|
+
# were genuinely consumed outside of normal event ingestion.
|
|
209
|
+
#
|
|
210
|
+
# Orb matches the algorithm for automatic deductions for determining which credit
|
|
211
|
+
# blocks to decrement from. In the case that the deduction leads to multiple
|
|
212
|
+
# ledger entries, the response from this endpoint will be the final deduction. Orb
|
|
213
|
+
# also optionally allows specifying a description to assist with auditing.
|
|
208
214
|
#
|
|
209
215
|
# The following snippet illustrates a sample request body to decrement credits.
|
|
210
216
|
#
|
|
@@ -256,36 +262,10 @@ module Orb
|
|
|
256
262
|
# that was originally decremented from, and `amount` indicates how many credits to
|
|
257
263
|
# return to the customer, up to the block's initial balance.
|
|
258
264
|
#
|
|
259
|
-
# @overload create_entry(customer_id,
|
|
265
|
+
# @overload create_entry(customer_id, body:, request_options: {})
|
|
260
266
|
#
|
|
261
267
|
# @param customer_id [String]
|
|
262
|
-
#
|
|
263
|
-
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
264
|
-
#
|
|
265
|
-
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::EntryType]
|
|
266
|
-
#
|
|
267
|
-
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
|
268
|
-
#
|
|
269
|
-
# @param block_id [String] The ID of the block to reverse a decrement from.
|
|
270
|
-
#
|
|
271
|
-
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
272
|
-
#
|
|
273
|
-
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
274
|
-
#
|
|
275
|
-
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
|
276
|
-
#
|
|
277
|
-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
|
278
|
-
#
|
|
279
|
-
# @param filters [Array<Orb::Models::Customers::Credits::LedgerCreateEntryParams::Filter>, nil] Optional filter to specify which items this credit block applies to. If not spec
|
|
280
|
-
#
|
|
281
|
-
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
|
282
|
-
#
|
|
283
|
-
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
284
|
-
#
|
|
285
|
-
# @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
|
|
286
|
-
#
|
|
287
|
-
# @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
|
|
288
|
-
#
|
|
268
|
+
# @param body [Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryParams::Body::Amendment]
|
|
289
269
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
290
270
|
#
|
|
291
271
|
# @return [Orb::Models::Customers::Credits::IncrementLedgerEntry, Orb::Models::Customers::Credits::DecrementLedgerEntry, Orb::Models::Customers::Credits::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::VoidLedgerEntry, Orb::Models::Customers::Credits::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::AmendmentLedgerEntry]
|
|
@@ -296,16 +276,12 @@ module Orb
|
|
|
296
276
|
@client.request(
|
|
297
277
|
method: :post,
|
|
298
278
|
path: ["customers/%1$s/credits/ledger_entry", customer_id],
|
|
299
|
-
body: parsed,
|
|
279
|
+
body: parsed[:body],
|
|
300
280
|
model: Orb::Models::Customers::Credits::LedgerCreateEntryResponse,
|
|
301
281
|
options: options
|
|
302
282
|
)
|
|
303
283
|
end
|
|
304
284
|
|
|
305
|
-
# Some parameter documentations has been truncated, see
|
|
306
|
-
# {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more
|
|
307
|
-
# details.
|
|
308
|
-
#
|
|
309
285
|
# This endpoint allows you to create a new ledger entry for a specified customer's
|
|
310
286
|
# balance. This can be used to increment balance, deduct credits, and change the
|
|
311
287
|
# expiry date of existing credits.
|
|
@@ -346,8 +322,9 @@ module Orb
|
|
|
346
322
|
# }
|
|
347
323
|
# ```
|
|
348
324
|
#
|
|
349
|
-
# Note that
|
|
350
|
-
#
|
|
325
|
+
# Note that an `increment` entry always creates a new credit block (defined by the
|
|
326
|
+
# optional `effective_date` and `expiry_date`); it never modifies an existing
|
|
327
|
+
# block.
|
|
351
328
|
#
|
|
352
329
|
# ### Invoicing for credits
|
|
353
330
|
#
|
|
@@ -356,7 +333,9 @@ module Orb
|
|
|
356
333
|
# also generate a one-off invoice for the customer for the credits pre-purchase.
|
|
357
334
|
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
|
|
358
335
|
# on the invoice are calculated by multiplying the cost basis with the number of
|
|
359
|
-
# credit units added.
|
|
336
|
+
# credit units added. If you invoice or handle payment of credits outside of Orb
|
|
337
|
+
# (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
|
|
338
|
+
# `true` to prevent duplicate invoicing effects.
|
|
360
339
|
#
|
|
361
340
|
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
|
|
362
341
|
# and `invoice_settings` must be included
|
|
@@ -366,11 +345,17 @@ module Orb
|
|
|
366
345
|
# ## Deducting Credits
|
|
367
346
|
#
|
|
368
347
|
# Orb allows you to deduct credits from a customer by creating an entry of type
|
|
369
|
-
# `decrement`.
|
|
370
|
-
#
|
|
371
|
-
#
|
|
372
|
-
#
|
|
373
|
-
#
|
|
348
|
+
# `decrement`. A `decrement` entry records credits as usage and immediately
|
|
349
|
+
# recognizes revenue at the block's `per_unit_cost_basis`.
|
|
350
|
+
#
|
|
351
|
+
# For most credit removals, use `void` (no revenue impact) or `expiration_change`
|
|
352
|
+
# (revenue recognized on expiration) instead. Only use `decrement` when credits
|
|
353
|
+
# were genuinely consumed outside of normal event ingestion.
|
|
354
|
+
#
|
|
355
|
+
# Orb matches the algorithm for automatic deductions for determining which credit
|
|
356
|
+
# blocks to decrement from. In the case that the deduction leads to multiple
|
|
357
|
+
# ledger entries, the response from this endpoint will be the final deduction. Orb
|
|
358
|
+
# also optionally allows specifying a description to assist with auditing.
|
|
374
359
|
#
|
|
375
360
|
# The following snippet illustrates a sample request body to decrement credits.
|
|
376
361
|
#
|
|
@@ -422,36 +407,10 @@ module Orb
|
|
|
422
407
|
# that was originally decremented from, and `amount` indicates how many credits to
|
|
423
408
|
# return to the customer, up to the block's initial balance.
|
|
424
409
|
#
|
|
425
|
-
# @overload create_entry_by_external_id(external_customer_id,
|
|
410
|
+
# @overload create_entry_by_external_id(external_customer_id, body:, request_options: {})
|
|
426
411
|
#
|
|
427
412
|
# @param external_customer_id [String]
|
|
428
|
-
#
|
|
429
|
-
# @param amount [Float] The number of credits to effect. Note that this is required for increment, decre
|
|
430
|
-
#
|
|
431
|
-
# @param entry_type [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::EntryType]
|
|
432
|
-
#
|
|
433
|
-
# @param target_expiry_date [Date] A future date (specified in YYYY-MM-DD format) used for expiration change, denot
|
|
434
|
-
#
|
|
435
|
-
# @param block_id [String] The ID of the block to reverse a decrement from.
|
|
436
|
-
#
|
|
437
|
-
# @param currency [String, nil] The currency or custom pricing unit to use for this ledger entry. If this is a r
|
|
438
|
-
#
|
|
439
|
-
# @param description [String, nil] Optional metadata that can be specified when adding ledger results via the API.
|
|
440
|
-
#
|
|
441
|
-
# @param effective_date [Time, nil] An ISO 8601 format date that denotes when this credit balance should become avai
|
|
442
|
-
#
|
|
443
|
-
# @param expiry_date [Time, nil] An ISO 8601 format date that identifies the origination credit block to expire
|
|
444
|
-
#
|
|
445
|
-
# @param filters [Array<Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Filter>, nil] Optional filter to specify which items this credit block applies to. If not spec
|
|
446
|
-
#
|
|
447
|
-
# @param invoice_settings [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::InvoiceSettings, nil] Passing `invoice_settings` automatically generates an invoice for the newly adde
|
|
448
|
-
#
|
|
449
|
-
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
450
|
-
#
|
|
451
|
-
# @param per_unit_cost_basis [String, nil] Can only be specified when entry_type=increment. How much, in the customer's cur
|
|
452
|
-
#
|
|
453
|
-
# @param void_reason [Symbol, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::VoidReason, nil] Can only be specified when `entry_type=void`. The reason for the void.
|
|
454
|
-
#
|
|
413
|
+
# @param body [Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Increment, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Decrement, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::ExpirationChange, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Void, Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams::Body::Amendment]
|
|
455
414
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
456
415
|
#
|
|
457
416
|
# @return [Orb::Models::Customers::Credits::IncrementLedgerEntry, Orb::Models::Customers::Credits::DecrementLedgerEntry, Orb::Models::Customers::Credits::ExpirationChangeLedgerEntry, Orb::Models::Customers::Credits::CreditBlockExpiryLedgerEntry, Orb::Models::Customers::Credits::VoidLedgerEntry, Orb::Models::Customers::Credits::VoidInitiatedLedgerEntry, Orb::Models::Customers::Credits::AmendmentLedgerEntry]
|
|
@@ -462,7 +421,7 @@ module Orb
|
|
|
462
421
|
@client.request(
|
|
463
422
|
method: :post,
|
|
464
423
|
path: ["customers/external_customer_id/%1$s/credits/ledger_entry", external_customer_id],
|
|
465
|
-
body: parsed,
|
|
424
|
+
body: parsed[:body],
|
|
466
425
|
model: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse,
|
|
467
426
|
options: options
|
|
468
427
|
)
|
|
@@ -147,11 +147,12 @@ module Orb
|
|
|
147
147
|
#
|
|
148
148
|
# This endpoint can be used to update the `payment_provider`,
|
|
149
149
|
# `payment_provider_id`, `name`, `email`, `email_delivery`, `tax_id`,
|
|
150
|
-
# `auto_collection`, `metadata`, `shipping_address`, `billing_address`,
|
|
151
|
-
# `additional_emails` of an existing customer.
|
|
152
|
-
#
|
|
150
|
+
# `auto_collection`, `metadata`, `shipping_address`, `billing_address`,
|
|
151
|
+
# `additional_emails`, and `currency` of an existing customer. `currency` can only
|
|
152
|
+
# be set if it has not already been set on the customer. Other fields on a
|
|
153
|
+
# customer are currently immutable.
|
|
153
154
|
#
|
|
154
|
-
# @overload update(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: {})
|
|
155
|
+
# @overload update(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: {})
|
|
155
156
|
#
|
|
156
157
|
# @param customer_id [String]
|
|
157
158
|
#
|
|
@@ -165,7 +166,9 @@ module Orb
|
|
|
165
166
|
#
|
|
166
167
|
# @param billing_address [Orb::Models::AddressInput, nil]
|
|
167
168
|
#
|
|
168
|
-
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance.
|
|
169
|
+
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
|
|
170
|
+
#
|
|
171
|
+
# @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
|
|
169
172
|
#
|
|
170
173
|
# @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
|
|
171
174
|
#
|
|
@@ -392,7 +395,7 @@ module Orb
|
|
|
392
395
|
# resource and semantics of this endpoint exactly mirror
|
|
393
396
|
# [Update Customer](update-customer).
|
|
394
397
|
#
|
|
395
|
-
# @overload update_by_external_id(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: {})
|
|
398
|
+
# @overload update_by_external_id(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: {})
|
|
396
399
|
#
|
|
397
400
|
# @param id [String]
|
|
398
401
|
#
|
|
@@ -406,7 +409,9 @@ module Orb
|
|
|
406
409
|
#
|
|
407
410
|
# @param billing_address [Orb::Models::AddressInput, nil]
|
|
408
411
|
#
|
|
409
|
-
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance.
|
|
412
|
+
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
|
|
413
|
+
#
|
|
414
|
+
# @param default_payment_method_id [String, nil] The Orb ID of the payment method to set as this customer's default. Pass `null`
|
|
410
415
|
#
|
|
411
416
|
# @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
|
|
412
417
|
#
|
|
@@ -15,8 +15,8 @@ module Orb
|
|
|
15
15
|
# 3 steps:
|
|
16
16
|
#
|
|
17
17
|
# 1. Create the backfill, specifying its parameters.
|
|
18
|
-
# 2. [Ingest](ingest) usage events, referencing the
|
|
19
|
-
# `backfill_id`).
|
|
18
|
+
# 2. [Ingest](/api-reference/event/ingest-events) usage events, referencing the
|
|
19
|
+
# backfill (query parameter `backfill_id`).
|
|
20
20
|
# 3. [Close](close-backfill) the backfill, propagating the update in past usage
|
|
21
21
|
# throughout Orb.
|
|
22
22
|
#
|
|
@@ -91,8 +91,7 @@ module Orb
|
|
|
91
91
|
# The list of backfills is ordered starting from the most recently created
|
|
92
92
|
# backfill. The response also includes
|
|
93
93
|
# [`pagination_metadata`](/api-reference/pagination), which lets the caller
|
|
94
|
-
# retrieve the next page of results if they exist.
|
|
95
|
-
# pagination can be found in the [Pagination-metadata schema](pagination).
|
|
94
|
+
# retrieve the next page of results if they exist.
|
|
96
95
|
#
|
|
97
96
|
# @overload list(cursor: nil, limit: nil, request_options: {})
|
|
98
97
|
#
|
data/lib/orb/resources/events.rb
CHANGED
|
@@ -273,8 +273,8 @@ module Orb
|
|
|
273
273
|
# billed for in the corresponding billing period.
|
|
274
274
|
#
|
|
275
275
|
# In general, Orb does not expect events with future dated timestamps. In cases
|
|
276
|
-
# where the timestamp is
|
|
277
|
-
#
|
|
276
|
+
# where the timestamp is 5 minutes ahead of the current time, the event will not
|
|
277
|
+
# be accepted as a valid event, and will throw validation errors.
|
|
278
278
|
#
|
|
279
279
|
# ## Event validation
|
|
280
280
|
#
|
|
@@ -289,9 +289,9 @@ module Orb
|
|
|
289
289
|
# - If the `external_customer_id` is specified, the customer in Orb does not need
|
|
290
290
|
# to exist. Events will be attributed to any future customers with the
|
|
291
291
|
# `external_customer_id` on subscription creation.
|
|
292
|
-
# - `timestamp` must conform to ISO 8601 and represent a timestamp at most
|
|
293
|
-
# in the future. This timestamp should be sent in UTC timezone (no
|
|
294
|
-
# offset).
|
|
292
|
+
# - `timestamp` must conform to ISO 8601 and represent a timestamp at most 5
|
|
293
|
+
# minutes in the future. This timestamp should be sent in UTC timezone (no
|
|
294
|
+
# timezone offset).
|
|
295
295
|
#
|
|
296
296
|
# ## Idempotency and retry semantics
|
|
297
297
|
#
|
|
@@ -328,34 +328,7 @@ module Orb
|
|
|
328
328
|
# request payload size, but please give us a heads up if you’re changing either of
|
|
329
329
|
# these factors by an order of magnitude from initial setup.
|
|
330
330
|
#
|
|
331
|
-
#
|
|
332
|
-
#
|
|
333
|
-
# The ingestion API supports a debug mode, which returns additional verbose output
|
|
334
|
-
# to indicate which event idempotency keys were newly ingested or duplicates from
|
|
335
|
-
# previous requests. To enable this mode, mark `debug=true` as a query parameter.
|
|
336
|
-
#
|
|
337
|
-
# If `debug=true` is not specified, the response will only contain
|
|
338
|
-
# `validation_failed`. Orb will still honor the idempotency guarantees set
|
|
339
|
-
# [here](/events-and-metrics/event-ingestion#event-volume-and-concurrency) in all
|
|
340
|
-
# cases.
|
|
341
|
-
#
|
|
342
|
-
# We strongly recommend that you only use debug mode as part of testing your
|
|
343
|
-
# initial Orb integration. Once you're ready to switch to production, disable
|
|
344
|
-
# debug mode to take advantage of improved performance and maximal throughput.
|
|
345
|
-
#
|
|
346
|
-
# #### Example: ingestion response with `debug=true`
|
|
347
|
-
#
|
|
348
|
-
# ```json
|
|
349
|
-
# {
|
|
350
|
-
# "debug": {
|
|
351
|
-
# "duplicate": [],
|
|
352
|
-
# "ingested": ["B7E83HDMfJPAunXW", "SJs5DQJ3TnwSqEZE", "8SivfDsNKwCeAXim"]
|
|
353
|
-
# },
|
|
354
|
-
# "validation_failed": []
|
|
355
|
-
# }
|
|
356
|
-
# ```
|
|
357
|
-
#
|
|
358
|
-
# #### Example: ingestion response with `debug=false`
|
|
331
|
+
# #### Example: ingestion response
|
|
359
332
|
#
|
|
360
333
|
# ```json
|
|
361
334
|
# {
|
|
@@ -369,7 +342,7 @@ module Orb
|
|
|
369
342
|
#
|
|
370
343
|
# @param backfill_id [String, nil] Query param: If this ingestion request is part of a backfill, this parameter tie
|
|
371
344
|
#
|
|
372
|
-
# @param debug [Boolean] Query param: Flag to enable additional debug information in
|
|
345
|
+
# @param debug [Boolean] Query param: Pending Deprecation: Flag to enable additional debug information in
|
|
373
346
|
#
|
|
374
347
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
375
348
|
#
|