orb-billing 1.13.0 → 1.14.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 +43 -0
- data/README.md +1 -1
- data/lib/orb/client.rb +7 -0
- data/lib/orb/internal/util.rb +22 -7
- data/lib/orb/models/alert.rb +10 -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 +29 -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 +8 -1
- data/lib/orb/models/beta/external_plan_id_create_plan_version_params.rb +17769 -414
- 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 +17633 -406
- 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/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_retrieve_params.rb +7 -1
- data/lib/orb/models/credit_note_fetch_params.rb +7 -1
- data/lib/orb/models/customer.rb +13 -1
- data/lib/orb/models/customer_create_params.rb +12 -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_update_by_external_id_params.rb +25 -5
- data/lib/orb/models/customer_update_params.rb +25 -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_params.rb +8 -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_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/event_deprecate_params.rb +7 -1
- 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_delete_line_item_params.rb +7 -1
- data/lib/orb/models/invoice_fetch_params.rb +7 -1
- 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_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 +8 -1
- data/lib/orb/models/licenses/usage_get_usage_params.rb +8 -1
- data/lib/orb/models/metric_fetch_params.rb +7 -1
- data/lib/orb/models/metric_update_params.rb +8 -1
- data/lib/orb/models/plan_create_params.rb +8502 -1
- data/lib/orb/models/plan_fetch_params.rb +7 -1
- data/lib/orb/models/plan_update_params.rb +8 -1
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +7 -1
- data/lib/orb/models/plans/external_plan_id_update_params.rb +8 -1
- data/lib/orb/models/plans/migration_cancel_params.rb +7 -1
- data/lib/orb/models/plans/migration_list_params.rb +8 -1
- data/lib/orb/models/plans/migration_retrieve_params.rb +7 -1
- data/lib/orb/models/price.rb +248 -31
- data/lib/orb/models/price_create_params.rb +949 -1321
- data/lib/orb/models/price_evaluate_params.rb +8 -1
- data/lib/orb/models/price_fetch_params.rb +7 -1
- 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_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_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 +8 -1
- data/lib/orb/models/subscription_redeem_coupon_params.rb +8 -1
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +8 -1
- 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 +8 -1
- data/lib/orb/models/subscription_update_trial_params.rb +8 -1
- data/lib/orb/resources/alerts.rb +8 -1
- 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 +12 -67
- data/lib/orb/resources/customers.rb +6 -5
- data/lib/orb/resources/events/backfills.rb +3 -4
- data/lib/orb/resources/invoices.rb +12 -5
- data/lib/orb/resources/prices.rb +9 -100
- data/lib/orb/resources/subscriptions.rb +4 -4
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/client.rbi +6 -0
- data/rbi/orb/internal/util.rbi +8 -0
- data/rbi/orb/models/alert.rbi +10 -0
- 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 +26 -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 +6 -0
- data/rbi/orb/models/beta/external_plan_id_create_plan_version_params.rbi +30163 -889
- 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 +30126 -884
- 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/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_retrieve_params.rbi +13 -5
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -5
- data/rbi/orb/models/customer.rbi +22 -0
- data/rbi/orb/models/customer_create_params.rbi +17 -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_update_by_external_id_params.rbi +31 -4
- data/rbi/orb/models/customer_update_params.rbi +31 -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_params.rbi +6 -0
- 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_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/event_deprecate_params.rbi +13 -5
- 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_delete_line_item_params.rbi +10 -2
- data/rbi/orb/models/invoice_fetch_params.rbi +13 -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_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 +6 -0
- data/rbi/orb/models/licenses/usage_get_usage_params.rbi +6 -0
- data/rbi/orb/models/metric_fetch_params.rbi +13 -5
- data/rbi/orb/models/metric_update_params.rbi +6 -0
- data/rbi/orb/models/plan_create_params.rbi +14618 -0
- data/rbi/orb/models/plan_fetch_params.rbi +13 -5
- data/rbi/orb/models/plan_update_params.rbi +6 -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 +6 -0
- data/rbi/orb/models/plans/migration_cancel_params.rbi +10 -2
- data/rbi/orb/models/plans/migration_list_params.rbi +6 -0
- data/rbi/orb/models/plans/migration_retrieve_params.rbi +10 -2
- data/rbi/orb/models/price.rbi +186 -0
- data/rbi/orb/models/price_create_params.rbi +1778 -2590
- data/rbi/orb/models/price_evaluate_params.rbi +6 -0
- data/rbi/orb/models/price_fetch_params.rbi +13 -5
- 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_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_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 +6 -0
- data/rbi/orb/models/subscription_redeem_coupon_params.rbi +6 -0
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +6 -0
- 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 +6 -0
- data/rbi/orb/models/subscription_update_trial_params.rbi +6 -0
- data/rbi/orb/resources/alerts.rbi +8 -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 +22 -132
- data/rbi/orb/resources/customers.rbi +12 -7
- data/rbi/orb/resources/events/backfills.rbi +3 -4
- data/rbi/orb/resources/invoices.rbi +11 -3
- data/rbi/orb/resources/prices.rbi +35 -184
- data/rbi/orb/resources/subscriptions.rbi +4 -4
- data/sig/orb/client.rbs +3 -0
- data/sig/orb/internal/util.rbs +4 -0
- data/sig/orb/models/alert.rbs +5 -0
- 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 +16 -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 +5 -1
- data/sig/orb/models/beta/external_plan_id_create_plan_version_params.rbs +12092 -373
- 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 +12075 -370
- 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/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_retrieve_params.rbs +8 -3
- data/sig/orb/models/credit_note_fetch_params.rbs +11 -3
- data/sig/orb/models/customer.rbs +14 -2
- 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_update_by_external_id_params.rbs +17 -1
- data/sig/orb/models/customer_update_params.rbs +17 -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_params.rbs +5 -0
- 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/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_delete_line_item_params.rbs +6 -1
- data/sig/orb/models/invoice_fetch_params.rbs +12 -3
- 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_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 +5 -0
- data/sig/orb/models/licenses/usage_get_usage_params.rbs +5 -0
- data/sig/orb/models/metric_fetch_params.rbs +12 -3
- data/sig/orb/models/metric_update_params.rbs +5 -1
- data/sig/orb/models/plan_create_params.rbs +5850 -0
- data/sig/orb/models/plan_fetch_params.rbs +9 -3
- data/sig/orb/models/plan_update_params.rbs +9 -1
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +11 -3
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +9 -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 +155 -0
- data/sig/orb/models/price_create_params.rbs +616 -1011
- data/sig/orb/models/price_evaluate_params.rbs +5 -0
- 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_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_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 +5 -0
- data/sig/orb/models/subscription_redeem_coupon_params.rbs +5 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +5 -0
- 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 +5 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +5 -0
- data/sig/orb/resources/alerts.rbs +2 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -26
- data/sig/orb/resources/invoices.rbs +1 -0
- data/sig/orb/resources/prices.rbs +1 -48
- metadata +2 -2
|
@@ -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.
|
|
@@ -190,7 +187,9 @@ module Orb
|
|
|
190
187
|
# also generate a one-off invoice for the customer for the credits pre-purchase.
|
|
191
188
|
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
|
|
192
189
|
# on the invoice are calculated by multiplying the cost basis with the number of
|
|
193
|
-
# credit units added.
|
|
190
|
+
# credit units added. If you invoice or handle payment of credits outside of Orb
|
|
191
|
+
# (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
|
|
192
|
+
# `true` to prevent duplicate invoicing effects.
|
|
194
193
|
#
|
|
195
194
|
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
|
|
196
195
|
# and `invoice_settings` must be included
|
|
@@ -256,36 +255,10 @@ module Orb
|
|
|
256
255
|
# that was originally decremented from, and `amount` indicates how many credits to
|
|
257
256
|
# return to the customer, up to the block's initial balance.
|
|
258
257
|
#
|
|
259
|
-
# @overload create_entry(customer_id,
|
|
258
|
+
# @overload create_entry(customer_id, body:, request_options: {})
|
|
260
259
|
#
|
|
261
260
|
# @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
|
-
#
|
|
261
|
+
# @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
262
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
290
263
|
#
|
|
291
264
|
# @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 +269,12 @@ module Orb
|
|
|
296
269
|
@client.request(
|
|
297
270
|
method: :post,
|
|
298
271
|
path: ["customers/%1$s/credits/ledger_entry", customer_id],
|
|
299
|
-
body: parsed,
|
|
272
|
+
body: parsed[:body],
|
|
300
273
|
model: Orb::Models::Customers::Credits::LedgerCreateEntryResponse,
|
|
301
274
|
options: options
|
|
302
275
|
)
|
|
303
276
|
end
|
|
304
277
|
|
|
305
|
-
# Some parameter documentations has been truncated, see
|
|
306
|
-
# {Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDParams} for more
|
|
307
|
-
# details.
|
|
308
|
-
#
|
|
309
278
|
# This endpoint allows you to create a new ledger entry for a specified customer's
|
|
310
279
|
# balance. This can be used to increment balance, deduct credits, and change the
|
|
311
280
|
# expiry date of existing credits.
|
|
@@ -356,7 +325,9 @@ module Orb
|
|
|
356
325
|
# also generate a one-off invoice for the customer for the credits pre-purchase.
|
|
357
326
|
# Note that you _must_ provide the `per_unit_cost_basis`, since the total charges
|
|
358
327
|
# on the invoice are calculated by multiplying the cost basis with the number of
|
|
359
|
-
# credit units added.
|
|
328
|
+
# credit units added. If you invoice or handle payment of credits outside of Orb
|
|
329
|
+
# (i.e. marketplace customers), set `mark_as_paid` in the `invoice_settings` to
|
|
330
|
+
# `true` to prevent duplicate invoicing effects.
|
|
360
331
|
#
|
|
361
332
|
# - if `per_unit_cost_basis` is greater than zero, an invoice will be generated
|
|
362
333
|
# and `invoice_settings` must be included
|
|
@@ -422,36 +393,10 @@ module Orb
|
|
|
422
393
|
# that was originally decremented from, and `amount` indicates how many credits to
|
|
423
394
|
# return to the customer, up to the block's initial balance.
|
|
424
395
|
#
|
|
425
|
-
# @overload create_entry_by_external_id(external_customer_id,
|
|
396
|
+
# @overload create_entry_by_external_id(external_customer_id, body:, request_options: {})
|
|
426
397
|
#
|
|
427
398
|
# @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
|
-
#
|
|
399
|
+
# @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
400
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
456
401
|
#
|
|
457
402
|
# @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 +407,7 @@ module Orb
|
|
|
462
407
|
@client.request(
|
|
463
408
|
method: :post,
|
|
464
409
|
path: ["customers/external_customer_id/%1$s/credits/ledger_entry", external_customer_id],
|
|
465
|
-
body: parsed,
|
|
410
|
+
body: parsed[:body],
|
|
466
411
|
model: Orb::Models::Customers::Credits::LedgerCreateEntryByExternalIDResponse,
|
|
467
412
|
options: options
|
|
468
413
|
)
|
|
@@ -147,9 +147,10 @@ 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
155
|
# @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
156
|
#
|
|
@@ -165,7 +166,7 @@ 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
|
|
169
170
|
#
|
|
170
171
|
# @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
|
|
171
172
|
#
|
|
@@ -406,7 +407,7 @@ module Orb
|
|
|
406
407
|
#
|
|
407
408
|
# @param billing_address [Orb::Models::AddressInput, nil]
|
|
408
409
|
#
|
|
409
|
-
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance.
|
|
410
|
+
# @param currency [String, nil] An ISO 4217 currency string used for the customer's invoices and balance. This c
|
|
410
411
|
#
|
|
411
412
|
# @param email [String, nil] A valid customer email, to be used for invoicing and notifications.
|
|
412
413
|
#
|
|
@@ -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
|
#
|
|
@@ -431,23 +431,30 @@ module Orb
|
|
|
431
431
|
)
|
|
432
432
|
end
|
|
433
433
|
|
|
434
|
-
# This endpoint collects payment for an invoice
|
|
435
|
-
# payment method.
|
|
434
|
+
# This endpoint collects payment for an invoice. By default, it uses the
|
|
435
|
+
# customer's default payment method. Optionally, a shared payment token (SPT) can
|
|
436
|
+
# be provided to pay using agent-granted credentials instead. This action can only
|
|
437
|
+
# be taken on invoices with status "issued".
|
|
436
438
|
#
|
|
437
|
-
# @overload pay(invoice_id, request_options: {})
|
|
439
|
+
# @overload pay(invoice_id, shared_payment_token_id:, request_options: {})
|
|
438
440
|
#
|
|
439
441
|
# @param invoice_id [String]
|
|
442
|
+
#
|
|
443
|
+
# @param shared_payment_token_id [String] The ID of a shared payment token granted by an agent to use for this payment.
|
|
444
|
+
#
|
|
440
445
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
441
446
|
#
|
|
442
447
|
# @return [Orb::Models::Invoice]
|
|
443
448
|
#
|
|
444
449
|
# @see Orb::Models::InvoicePayParams
|
|
445
|
-
def pay(invoice_id, params
|
|
450
|
+
def pay(invoice_id, params)
|
|
451
|
+
parsed, options = Orb::InvoicePayParams.dump_request(params)
|
|
446
452
|
@client.request(
|
|
447
453
|
method: :post,
|
|
448
454
|
path: ["invoices/%1$s/pay", invoice_id],
|
|
455
|
+
body: parsed,
|
|
449
456
|
model: Orb::Invoice,
|
|
450
|
-
options:
|
|
457
|
+
options: options
|
|
451
458
|
)
|
|
452
459
|
end
|
|
453
460
|
|
data/lib/orb/resources/prices.rb
CHANGED
|
@@ -26,9 +26,6 @@ module Orb
|
|
|
26
26
|
# @return [Orb::Resources::Prices::ExternalPriceID]
|
|
27
27
|
attr_reader :external_price_id
|
|
28
28
|
|
|
29
|
-
# Some parameter documentations has been truncated, see
|
|
30
|
-
# {Orb::Models::PriceCreateParams} for more details.
|
|
31
|
-
#
|
|
32
29
|
# This endpoint is used to create a [price](/product-catalog/price-configuration).
|
|
33
30
|
# A price created using this endpoint is always an add-on, meaning that it's not
|
|
34
31
|
# associated with a specific plan and can instead be individually added to
|
|
@@ -40,103 +37,9 @@ module Orb
|
|
|
40
37
|
# See the [Price resource](/product-catalog/price-configuration) for the
|
|
41
38
|
# specification of different price model configurations possible in this endpoint.
|
|
42
39
|
#
|
|
43
|
-
# @overload create(
|
|
44
|
-
#
|
|
45
|
-
# @param cadence [Symbol, Orb::Models::PriceCreateParams::Cadence] The cadence to bill for this price on.
|
|
46
|
-
#
|
|
47
|
-
# @param currency [String] An ISO 4217 currency string for which this price is billed in.
|
|
48
|
-
#
|
|
49
|
-
# @param item_id [String] The id of the item the price will be associated with.
|
|
50
|
-
#
|
|
51
|
-
# @param model_type [Symbol, Orb::Models::PriceCreateParams::ModelType] The pricing model type
|
|
52
|
-
#
|
|
53
|
-
# @param name [String] The name of the price.
|
|
54
|
-
#
|
|
55
|
-
# @param unit_config [Orb::Models::UnitConfig] Configuration for unit pricing
|
|
56
|
-
#
|
|
57
|
-
# @param tiered_config [Orb::Models::TieredConfig] Configuration for tiered pricing
|
|
58
|
-
#
|
|
59
|
-
# @param bulk_config [Orb::Models::BulkConfig] Configuration for bulk pricing
|
|
60
|
-
#
|
|
61
|
-
# @param bulk_with_filters_config [Orb::Models::PriceCreateParams::BulkWithFiltersConfig] Configuration for bulk_with_filters pricing
|
|
62
|
-
#
|
|
63
|
-
# @param package_config [Orb::Models::PackageConfig] Configuration for package pricing
|
|
64
|
-
#
|
|
65
|
-
# @param matrix_config [Orb::Models::MatrixConfig] Configuration for matrix pricing
|
|
66
|
-
#
|
|
67
|
-
# @param threshold_total_amount_config [Orb::Models::PriceCreateParams::ThresholdTotalAmountConfig] Configuration for threshold_total_amount pricing
|
|
68
|
-
#
|
|
69
|
-
# @param tiered_package_config [Orb::Models::PriceCreateParams::TieredPackageConfig] Configuration for tiered_package pricing
|
|
70
|
-
#
|
|
71
|
-
# @param tiered_with_minimum_config [Orb::Models::PriceCreateParams::TieredWithMinimumConfig] Configuration for tiered_with_minimum pricing
|
|
72
|
-
#
|
|
73
|
-
# @param grouped_tiered_config [Orb::Models::PriceCreateParams::GroupedTieredConfig] Configuration for grouped_tiered pricing
|
|
74
|
-
#
|
|
75
|
-
# @param tiered_package_with_minimum_config [Orb::Models::PriceCreateParams::TieredPackageWithMinimumConfig] Configuration for tiered_package_with_minimum pricing
|
|
76
|
-
#
|
|
77
|
-
# @param package_with_allocation_config [Orb::Models::PriceCreateParams::PackageWithAllocationConfig] Configuration for package_with_allocation pricing
|
|
78
|
-
#
|
|
79
|
-
# @param unit_with_percent_config [Orb::Models::PriceCreateParams::UnitWithPercentConfig] Configuration for unit_with_percent pricing
|
|
80
|
-
#
|
|
81
|
-
# @param matrix_with_allocation_config [Orb::Models::MatrixWithAllocationConfig] Configuration for matrix_with_allocation pricing
|
|
82
|
-
#
|
|
83
|
-
# @param tiered_with_proration_config [Orb::Models::PriceCreateParams::TieredWithProrationConfig] Configuration for tiered_with_proration pricing
|
|
84
|
-
#
|
|
85
|
-
# @param unit_with_proration_config [Orb::Models::PriceCreateParams::UnitWithProrationConfig] Configuration for unit_with_proration pricing
|
|
86
|
-
#
|
|
87
|
-
# @param grouped_allocation_config [Orb::Models::PriceCreateParams::GroupedAllocationConfig] Configuration for grouped_allocation pricing
|
|
88
|
-
#
|
|
89
|
-
# @param bulk_with_proration_config [Orb::Models::PriceCreateParams::BulkWithProrationConfig] Configuration for bulk_with_proration pricing
|
|
90
|
-
#
|
|
91
|
-
# @param grouped_with_prorated_minimum_config [Orb::Models::PriceCreateParams::GroupedWithProratedMinimumConfig] Configuration for grouped_with_prorated_minimum pricing
|
|
92
|
-
#
|
|
93
|
-
# @param grouped_with_metered_minimum_config [Orb::Models::PriceCreateParams::GroupedWithMeteredMinimumConfig] Configuration for grouped_with_metered_minimum pricing
|
|
94
|
-
#
|
|
95
|
-
# @param grouped_with_min_max_thresholds_config [Orb::Models::PriceCreateParams::GroupedWithMinMaxThresholdsConfig] Configuration for grouped_with_min_max_thresholds pricing
|
|
40
|
+
# @overload create(body:, request_options: {})
|
|
96
41
|
#
|
|
97
|
-
# @param
|
|
98
|
-
#
|
|
99
|
-
# @param grouped_tiered_package_config [Orb::Models::PriceCreateParams::GroupedTieredPackageConfig] Configuration for grouped_tiered_package pricing
|
|
100
|
-
#
|
|
101
|
-
# @param max_group_tiered_package_config [Orb::Models::PriceCreateParams::MaxGroupTieredPackageConfig] Configuration for max_group_tiered_package pricing
|
|
102
|
-
#
|
|
103
|
-
# @param scalable_matrix_with_unit_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithUnitPricingConfig] Configuration for scalable_matrix_with_unit_pricing pricing
|
|
104
|
-
#
|
|
105
|
-
# @param scalable_matrix_with_tiered_pricing_config [Orb::Models::PriceCreateParams::ScalableMatrixWithTieredPricingConfig] Configuration for scalable_matrix_with_tiered_pricing pricing
|
|
106
|
-
#
|
|
107
|
-
# @param cumulative_grouped_bulk_config [Orb::Models::PriceCreateParams::CumulativeGroupedBulkConfig] Configuration for cumulative_grouped_bulk pricing
|
|
108
|
-
#
|
|
109
|
-
# @param cumulative_grouped_allocation_config [Orb::Models::PriceCreateParams::CumulativeGroupedAllocationConfig] Configuration for cumulative_grouped_allocation pricing
|
|
110
|
-
#
|
|
111
|
-
# @param minimum_composite_config [Orb::Models::PriceCreateParams::MinimumCompositeConfig] Configuration for minimum_composite pricing
|
|
112
|
-
#
|
|
113
|
-
# @param percent_config [Orb::Models::PriceCreateParams::PercentConfig] Configuration for percent pricing
|
|
114
|
-
#
|
|
115
|
-
# @param event_output_config [Orb::Models::PriceCreateParams::EventOutputConfig] Configuration for event_output pricing
|
|
116
|
-
#
|
|
117
|
-
# @param billable_metric_id [String, nil] The id of the billable metric for the price. Only needed if the price is usage-b
|
|
118
|
-
#
|
|
119
|
-
# @param billed_in_advance [Boolean, nil] If the Price represents a fixed cost, the price will be billed in-advance if thi
|
|
120
|
-
#
|
|
121
|
-
# @param billing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] For custom cadence: specifies the duration of the billing period in days or mont
|
|
122
|
-
#
|
|
123
|
-
# @param conversion_rate [Float, nil] The per unit conversion rate of the price currency to the invoicing currency.
|
|
124
|
-
#
|
|
125
|
-
# @param conversion_rate_config [Orb::Models::UnitConversionRateConfig, Orb::Models::TieredConversionRateConfig, nil] The configuration for the rate of the price currency to the invoicing currency.
|
|
126
|
-
#
|
|
127
|
-
# @param dimensional_price_configuration [Orb::Models::NewDimensionalPriceConfiguration, nil] For dimensional price: specifies a price group and dimension values
|
|
128
|
-
#
|
|
129
|
-
# @param external_price_id [String, nil] An alias for the price.
|
|
130
|
-
#
|
|
131
|
-
# @param fixed_price_quantity [Float, nil] If the Price represents a fixed cost, this represents the quantity of units appl
|
|
132
|
-
#
|
|
133
|
-
# @param invoice_grouping_key [String, nil] The property used to group this price on an invoice
|
|
134
|
-
#
|
|
135
|
-
# @param invoicing_cycle_configuration [Orb::Models::NewBillingCycleConfiguration, nil] Within each billing cycle, specifies the cadence at which invoices are produced.
|
|
136
|
-
#
|
|
137
|
-
# @param license_type_id [String, nil] The ID of the license type to associate with this price.
|
|
138
|
-
#
|
|
139
|
-
# @param metadata [Hash{Symbol=>String, nil}, nil] User-specified key/value pairs for the resource. Individual keys can be removed
|
|
42
|
+
# @param body [Orb::Models::NewFloatingUnitPrice, Orb::Models::NewFloatingTieredPrice, Orb::Models::NewFloatingBulkPrice, Orb::Models::PriceCreateParams::Body::BulkWithFilters, Orb::Models::NewFloatingPackagePrice, Orb::Models::NewFloatingMatrixPrice, Orb::Models::NewFloatingThresholdTotalAmountPrice, Orb::Models::NewFloatingTieredPackagePrice, Orb::Models::NewFloatingTieredWithMinimumPrice, Orb::Models::NewFloatingGroupedTieredPrice, Orb::Models::NewFloatingTieredPackageWithMinimumPrice, Orb::Models::NewFloatingPackageWithAllocationPrice, Orb::Models::NewFloatingUnitWithPercentPrice, Orb::Models::NewFloatingMatrixWithAllocationPrice, Orb::Models::NewFloatingTieredWithProrationPrice, Orb::Models::NewFloatingUnitWithProrationPrice, Orb::Models::NewFloatingGroupedAllocationPrice, Orb::Models::NewFloatingBulkWithProrationPrice, Orb::Models::NewFloatingGroupedWithProratedMinimumPrice, Orb::Models::NewFloatingGroupedWithMeteredMinimumPrice, Orb::Models::PriceCreateParams::Body::GroupedWithMinMaxThresholds, Orb::Models::NewFloatingMatrixWithDisplayNamePrice, Orb::Models::NewFloatingGroupedTieredPackagePrice, Orb::Models::NewFloatingMaxGroupTieredPackagePrice, Orb::Models::NewFloatingScalableMatrixWithUnitPricingPrice, Orb::Models::NewFloatingScalableMatrixWithTieredPricingPrice, Orb::Models::NewFloatingCumulativeGroupedBulkPrice, Orb::Models::PriceCreateParams::Body::CumulativeGroupedAllocation, Orb::Models::NewFloatingMinimumCompositePrice, Orb::Models::PriceCreateParams::Body::Percent, Orb::Models::PriceCreateParams::Body::EventOutput] New floating price request body params.
|
|
140
43
|
#
|
|
141
44
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
142
45
|
#
|
|
@@ -145,7 +48,13 @@ module Orb
|
|
|
145
48
|
# @see Orb::Models::PriceCreateParams
|
|
146
49
|
def create(params)
|
|
147
50
|
parsed, options = Orb::PriceCreateParams.dump_request(params)
|
|
148
|
-
@client.request(
|
|
51
|
+
@client.request(
|
|
52
|
+
method: :post,
|
|
53
|
+
path: "prices",
|
|
54
|
+
body: parsed[:body],
|
|
55
|
+
model: Orb::Price,
|
|
56
|
+
options: options
|
|
57
|
+
)
|
|
149
58
|
end
|
|
150
59
|
|
|
151
60
|
# Some parameter documentations has been truncated, see
|
|
@@ -568,10 +568,10 @@ module Orb
|
|
|
568
568
|
# metric, in usage units rather than a currency).
|
|
569
569
|
#
|
|
570
570
|
# The semantics of this endpoint exactly mirror those of
|
|
571
|
-
# [fetching a customer's costs](fetch-customer-costs). Use
|
|
572
|
-
# your analysis of costs to a specific subscription for the
|
|
573
|
-
# de-aggregate costs when a customer's subscription has started
|
|
574
|
-
# same day).
|
|
571
|
+
# [fetching a customer's costs](/api-reference/customer/fetch-customer-costs). Use
|
|
572
|
+
# this endpoint to limit your analysis of costs to a specific subscription for the
|
|
573
|
+
# customer (e.g. to de-aggregate costs when a customer's subscription has started
|
|
574
|
+
# and stopped on the same day).
|
|
575
575
|
#
|
|
576
576
|
# @overload fetch_costs(subscription_id, currency: nil, timeframe_end: nil, timeframe_start: nil, view_mode: nil, request_options: {})
|
|
577
577
|
#
|
data/lib/orb/version.rb
CHANGED
data/rbi/orb/client.rbi
CHANGED
|
@@ -13,6 +13,9 @@ module Orb
|
|
|
13
13
|
sig { returns(String) }
|
|
14
14
|
attr_reader :api_key
|
|
15
15
|
|
|
16
|
+
sig { returns(T.nilable(String)) }
|
|
17
|
+
attr_reader :webhook_secret
|
|
18
|
+
|
|
16
19
|
sig { returns(Orb::Resources::TopLevel) }
|
|
17
20
|
attr_reader :top_level
|
|
18
21
|
|
|
@@ -151,6 +154,7 @@ module Orb
|
|
|
151
154
|
sig do
|
|
152
155
|
params(
|
|
153
156
|
api_key: T.nilable(String),
|
|
157
|
+
webhook_secret: T.nilable(String),
|
|
154
158
|
base_url: T.nilable(String),
|
|
155
159
|
max_retries: Integer,
|
|
156
160
|
timeout: Float,
|
|
@@ -162,6 +166,8 @@ module Orb
|
|
|
162
166
|
def self.new(
|
|
163
167
|
# Defaults to `ENV["ORB_API_KEY"]`
|
|
164
168
|
api_key: ENV["ORB_API_KEY"],
|
|
169
|
+
# Defaults to `ENV["ORB_WEBHOOK_SECRET"]`
|
|
170
|
+
webhook_secret: ENV["ORB_WEBHOOK_SECRET"],
|
|
165
171
|
# Override the default base URL for the API, e.g.,
|
|
166
172
|
# `"https://api.example.com/v2/"`. Defaults to `ENV["ORB_BASE_URL"]`
|
|
167
173
|
base_url: ENV["ORB_BASE_URL"],
|
data/rbi/orb/internal/util.rbi
CHANGED
|
@@ -144,12 +144,20 @@ module Orb
|
|
|
144
144
|
end
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
+
# https://www.rfc-editor.org/rfc/rfc3986.html#section-3.3
|
|
148
|
+
RFC_3986_NOT_PCHARS = T.let(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/, Regexp)
|
|
149
|
+
|
|
147
150
|
class << self
|
|
148
151
|
# @api private
|
|
149
152
|
sig { params(uri: URI::Generic).returns(String) }
|
|
150
153
|
def uri_origin(uri)
|
|
151
154
|
end
|
|
152
155
|
|
|
156
|
+
# @api private
|
|
157
|
+
sig { params(path: T.any(String, Integer)).returns(String) }
|
|
158
|
+
def encode_path(path)
|
|
159
|
+
end
|
|
160
|
+
|
|
153
161
|
# @api private
|
|
154
162
|
sig { params(path: T.any(String, T::Array[String])).returns(String) }
|
|
155
163
|
def interpolate_path(path)
|
data/rbi/orb/models/alert.rbi
CHANGED
|
@@ -65,6 +65,11 @@ module Orb
|
|
|
65
65
|
sig { returns(T.nilable(T::Array[Orb::Alert::BalanceAlertStatus])) }
|
|
66
66
|
attr_accessor :balance_alert_status
|
|
67
67
|
|
|
68
|
+
# The property keys to group cost alerts by. Only present for cost alerts with
|
|
69
|
+
# grouping enabled.
|
|
70
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
71
|
+
attr_accessor :grouping_keys
|
|
72
|
+
|
|
68
73
|
# Minified license type for alert serialization.
|
|
69
74
|
sig { returns(T.nilable(Orb::Alert::LicenseType)) }
|
|
70
75
|
attr_reader :license_type
|
|
@@ -93,6 +98,7 @@ module Orb
|
|
|
93
98
|
type: Orb::Alert::Type::OrSymbol,
|
|
94
99
|
balance_alert_status:
|
|
95
100
|
T.nilable(T::Array[Orb::Alert::BalanceAlertStatus::OrHash]),
|
|
101
|
+
grouping_keys: T.nilable(T::Array[String]),
|
|
96
102
|
license_type: T.nilable(Orb::Alert::LicenseType::OrHash)
|
|
97
103
|
).returns(T.attached_class)
|
|
98
104
|
end
|
|
@@ -121,6 +127,9 @@ module Orb
|
|
|
121
127
|
# The current status of the alert. This field is only present for credit balance
|
|
122
128
|
# alerts.
|
|
123
129
|
balance_alert_status: nil,
|
|
130
|
+
# The property keys to group cost alerts by. Only present for cost alerts with
|
|
131
|
+
# grouping enabled.
|
|
132
|
+
grouping_keys: nil,
|
|
124
133
|
# Minified license type for alert serialization.
|
|
125
134
|
license_type: nil
|
|
126
135
|
)
|
|
@@ -141,6 +150,7 @@ module Orb
|
|
|
141
150
|
type: Orb::Alert::Type::TaggedSymbol,
|
|
142
151
|
balance_alert_status:
|
|
143
152
|
T.nilable(T::Array[Orb::Alert::BalanceAlertStatus]),
|
|
153
|
+
grouping_keys: T.nilable(T::Array[String]),
|
|
144
154
|
license_type: T.nilable(Orb::Alert::LicenseType)
|
|
145
155
|
}
|
|
146
156
|
)
|
|
@@ -11,6 +11,9 @@ module Orb
|
|
|
11
11
|
T.any(Orb::AlertCreateForCustomerParams, Orb::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :customer_id
|
|
16
|
+
|
|
14
17
|
# The case sensitive currency or custom pricing unit to use for this alert.
|
|
15
18
|
sig { returns(String) }
|
|
16
19
|
attr_accessor :currency
|
|
@@ -25,6 +28,7 @@ module Orb
|
|
|
25
28
|
|
|
26
29
|
sig do
|
|
27
30
|
params(
|
|
31
|
+
customer_id: String,
|
|
28
32
|
currency: String,
|
|
29
33
|
type: Orb::AlertCreateForCustomerParams::Type::OrSymbol,
|
|
30
34
|
thresholds: T.nilable(T::Array[Orb::Threshold::OrHash]),
|
|
@@ -32,6 +36,7 @@ module Orb
|
|
|
32
36
|
).returns(T.attached_class)
|
|
33
37
|
end
|
|
34
38
|
def self.new(
|
|
39
|
+
customer_id:,
|
|
35
40
|
# The case sensitive currency or custom pricing unit to use for this alert.
|
|
36
41
|
currency:,
|
|
37
42
|
# The type of alert to create. This must be a valid alert type.
|
|
@@ -45,6 +50,7 @@ module Orb
|
|
|
45
50
|
sig do
|
|
46
51
|
override.returns(
|
|
47
52
|
{
|
|
53
|
+
customer_id: String,
|
|
48
54
|
currency: String,
|
|
49
55
|
type: Orb::AlertCreateForCustomerParams::Type::OrSymbol,
|
|
50
56
|
thresholds: T.nilable(T::Array[Orb::Threshold]),
|
|
@@ -14,6 +14,9 @@ module Orb
|
|
|
14
14
|
)
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
+
sig { returns(String) }
|
|
18
|
+
attr_accessor :external_customer_id
|
|
19
|
+
|
|
17
20
|
# The case sensitive currency or custom pricing unit to use for this alert.
|
|
18
21
|
sig { returns(String) }
|
|
19
22
|
attr_accessor :currency
|
|
@@ -28,6 +31,7 @@ module Orb
|
|
|
28
31
|
|
|
29
32
|
sig do
|
|
30
33
|
params(
|
|
34
|
+
external_customer_id: String,
|
|
31
35
|
currency: String,
|
|
32
36
|
type: Orb::AlertCreateForExternalCustomerParams::Type::OrSymbol,
|
|
33
37
|
thresholds: T.nilable(T::Array[Orb::Threshold::OrHash]),
|
|
@@ -35,6 +39,7 @@ module Orb
|
|
|
35
39
|
).returns(T.attached_class)
|
|
36
40
|
end
|
|
37
41
|
def self.new(
|
|
42
|
+
external_customer_id:,
|
|
38
43
|
# The case sensitive currency or custom pricing unit to use for this alert.
|
|
39
44
|
currency:,
|
|
40
45
|
# The type of alert to create. This must be a valid alert type.
|
|
@@ -48,6 +53,7 @@ module Orb
|
|
|
48
53
|
sig do
|
|
49
54
|
override.returns(
|
|
50
55
|
{
|
|
56
|
+
external_customer_id: String,
|
|
51
57
|
currency: String,
|
|
52
58
|
type: Orb::AlertCreateForExternalCustomerParams::Type::OrSymbol,
|
|
53
59
|
thresholds: T.nilable(T::Array[Orb::Threshold]),
|
|
@@ -11,6 +11,9 @@ module Orb
|
|
|
11
11
|
T.any(Orb::AlertCreateForSubscriptionParams, Orb::Internal::AnyHash)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
+
sig { returns(String) }
|
|
15
|
+
attr_accessor :subscription_id
|
|
16
|
+
|
|
14
17
|
# The thresholds that define the values at which the alert will be triggered.
|
|
15
18
|
sig { returns(T::Array[Orb::Threshold]) }
|
|
16
19
|
attr_accessor :thresholds
|
|
@@ -19,25 +22,45 @@ module Orb
|
|
|
19
22
|
sig { returns(Orb::AlertCreateForSubscriptionParams::Type::OrSymbol) }
|
|
20
23
|
attr_accessor :type
|
|
21
24
|
|
|
25
|
+
# The property keys to group cost alerts by. Only applicable for cost_exceeded
|
|
26
|
+
# alerts.
|
|
27
|
+
sig { returns(T.nilable(T::Array[String])) }
|
|
28
|
+
attr_accessor :grouping_keys
|
|
29
|
+
|
|
22
30
|
# The metric to track usage for.
|
|
23
31
|
sig { returns(T.nilable(String)) }
|
|
24
32
|
attr_accessor :metric_id
|
|
25
33
|
|
|
34
|
+
# The pricing unit to use for grouped cost alerts. Required when grouping_keys is
|
|
35
|
+
# set.
|
|
36
|
+
sig { returns(T.nilable(String)) }
|
|
37
|
+
attr_accessor :pricing_unit_id
|
|
38
|
+
|
|
26
39
|
sig do
|
|
27
40
|
params(
|
|
41
|
+
subscription_id: String,
|
|
28
42
|
thresholds: T::Array[Orb::Threshold::OrHash],
|
|
29
43
|
type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol,
|
|
44
|
+
grouping_keys: T.nilable(T::Array[String]),
|
|
30
45
|
metric_id: T.nilable(String),
|
|
46
|
+
pricing_unit_id: T.nilable(String),
|
|
31
47
|
request_options: Orb::RequestOptions::OrHash
|
|
32
48
|
).returns(T.attached_class)
|
|
33
49
|
end
|
|
34
50
|
def self.new(
|
|
51
|
+
subscription_id:,
|
|
35
52
|
# The thresholds that define the values at which the alert will be triggered.
|
|
36
53
|
thresholds:,
|
|
37
54
|
# The type of alert to create. This must be a valid alert type.
|
|
38
55
|
type:,
|
|
56
|
+
# The property keys to group cost alerts by. Only applicable for cost_exceeded
|
|
57
|
+
# alerts.
|
|
58
|
+
grouping_keys: nil,
|
|
39
59
|
# The metric to track usage for.
|
|
40
60
|
metric_id: nil,
|
|
61
|
+
# The pricing unit to use for grouped cost alerts. Required when grouping_keys is
|
|
62
|
+
# set.
|
|
63
|
+
pricing_unit_id: nil,
|
|
41
64
|
request_options: {}
|
|
42
65
|
)
|
|
43
66
|
end
|
|
@@ -45,9 +68,12 @@ module Orb
|
|
|
45
68
|
sig do
|
|
46
69
|
override.returns(
|
|
47
70
|
{
|
|
71
|
+
subscription_id: String,
|
|
48
72
|
thresholds: T::Array[Orb::Threshold],
|
|
49
73
|
type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol,
|
|
74
|
+
grouping_keys: T.nilable(T::Array[String]),
|
|
50
75
|
metric_id: T.nilable(String),
|
|
76
|
+
pricing_unit_id: T.nilable(String),
|
|
51
77
|
request_options: Orb::RequestOptions
|
|
52
78
|
}
|
|
53
79
|
)
|
|
@@ -9,17 +9,22 @@ module Orb
|
|
|
9
9
|
OrHash =
|
|
10
10
|
T.type_alias { T.any(Orb::AlertDisableParams, Orb::Internal::AnyHash) }
|
|
11
11
|
|
|
12
|
+
sig { returns(String) }
|
|
13
|
+
attr_accessor :alert_configuration_id
|
|
14
|
+
|
|
12
15
|
# Used to update the status of a plan alert scoped to this subscription_id
|
|
13
16
|
sig { returns(T.nilable(String)) }
|
|
14
17
|
attr_accessor :subscription_id
|
|
15
18
|
|
|
16
19
|
sig do
|
|
17
20
|
params(
|
|
21
|
+
alert_configuration_id: String,
|
|
18
22
|
subscription_id: T.nilable(String),
|
|
19
23
|
request_options: Orb::RequestOptions::OrHash
|
|
20
24
|
).returns(T.attached_class)
|
|
21
25
|
end
|
|
22
26
|
def self.new(
|
|
27
|
+
alert_configuration_id:,
|
|
23
28
|
# Used to update the status of a plan alert scoped to this subscription_id
|
|
24
29
|
subscription_id: nil,
|
|
25
30
|
request_options: {}
|
|
@@ -29,6 +34,7 @@ module Orb
|
|
|
29
34
|
sig do
|
|
30
35
|
override.returns(
|
|
31
36
|
{
|
|
37
|
+
alert_configuration_id: String,
|
|
32
38
|
subscription_id: T.nilable(String),
|
|
33
39
|
request_options: Orb::RequestOptions
|
|
34
40
|
}
|