orb-billing 0.5.1 → 0.5.3
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 +26 -0
- data/README.md +4 -4
- data/SECURITY.md +2 -2
- data/lib/orb/internal/type/array_of.rb +8 -0
- data/lib/orb/internal/type/base_model.rb +7 -0
- data/lib/orb/internal/type/boolean.rb +8 -0
- data/lib/orb/internal/type/enum.rb +12 -0
- data/lib/orb/internal/type/file_input.rb +7 -0
- data/lib/orb/internal/type/hash_of.rb +8 -0
- data/lib/orb/internal/type/union.rb +12 -0
- data/lib/orb/internal/type/unknown.rb +8 -0
- data/lib/orb/internal/util.rb +45 -0
- data/lib/orb/internal.rb +3 -0
- data/lib/orb/models/alert.rb +23 -23
- data/lib/orb/models/alert_create_for_customer_params.rb +5 -5
- data/lib/orb/models/alert_create_for_external_customer_params.rb +5 -5
- data/lib/orb/models/alert_create_for_subscription_params.rb +5 -5
- data/lib/orb/models/alert_update_params.rb +3 -3
- data/lib/orb/models/amount_discount.rb +5 -5
- data/lib/orb/models/billable_metric.rb +7 -7
- data/lib/orb/models/coupon.rb +6 -10
- data/lib/orb/models/coupon_create_params.rb +3 -9
- data/lib/orb/models/credit_note.rb +33 -33
- data/lib/orb/models/credit_note_create_params.rb +4 -4
- data/lib/orb/models/customer.rb +39 -39
- data/lib/orb/models/customer_create_params.rb +26 -35
- data/lib/orb/models/customer_update_by_external_id_params.rb +26 -35
- data/lib/orb/models/customer_update_params.rb +26 -35
- data/lib/orb/models/customers/balance_transaction_create_params.rb +2 -2
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +2 -2
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +2 -2
- data/lib/orb/models/customers/cost_list_params.rb +2 -2
- data/lib/orb/models/customers/cost_list_response.rb +2 -2
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +7 -7
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +0 -14
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +8 -8
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +0 -14
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +4 -4
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +0 -14
- data/lib/orb/models/customers/credits/ledger_list_params.rb +4 -4
- data/lib/orb/models/customers/credits/ledger_list_response.rb +0 -14
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +6 -6
- data/lib/orb/models/customers/credits/top_up_create_params.rb +6 -5
- data/lib/orb/models/dimensional_price_group.rb +1 -1
- data/lib/orb/models/dimensional_price_groups.rb +4 -4
- data/lib/orb/models/discount.rb +1 -7
- data/lib/orb/models/evaluate_price_group.rb +0 -4
- data/lib/orb/models/event_ingest_params.rb +3 -3
- data/lib/orb/models/events/event_volumes.rb +2 -2
- data/lib/orb/models/invoice.rb +114 -135
- data/lib/orb/models/invoice_create_params.rb +10 -10
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +6 -28
- data/lib/orb/models/invoice_level_discount.rb +1 -5
- data/lib/orb/models/invoice_line_item_create_response.rb +4 -26
- data/lib/orb/models/invoice_list_params.rb +4 -4
- data/lib/orb/models/item.rb +5 -5
- data/lib/orb/models/item_update_params.rb +5 -5
- data/lib/orb/models/percentage_discount.rb +5 -5
- data/lib/orb/models/plan.rb +58 -70
- data/lib/orb/models/plan_create_params.rb +448 -476
- data/lib/orb/models/plan_list_params.rb +2 -2
- data/lib/orb/models/price.rb +1204 -1239
- data/lib/orb/models/price_create_params.rb +50 -50
- data/lib/orb/models/price_evaluate_response.rb +2 -2
- data/lib/orb/models/subscription.rb +58 -78
- data/lib/orb/models/subscription_cancel_params.rb +2 -2
- data/lib/orb/models/subscription_cancel_response.rb +14 -36
- data/lib/orb/models/subscription_change_apply_response.rb +14 -36
- data/lib/orb/models/subscription_change_cancel_response.rb +14 -36
- data/lib/orb/models/subscription_change_retrieve_response.rb +14 -36
- data/lib/orb/models/subscription_create_params.rb +1002 -1075
- data/lib/orb/models/subscription_create_response.rb +14 -36
- data/lib/orb/models/subscription_fetch_costs_params.rb +2 -2
- data/lib/orb/models/subscription_fetch_costs_response.rb +2 -2
- data/lib/orb/models/subscription_fetch_usage_params.rb +4 -4
- data/lib/orb/models/subscription_list_params.rb +2 -2
- data/lib/orb/models/subscription_price_intervals_params.rb +596 -674
- data/lib/orb/models/subscription_price_intervals_response.rb +14 -36
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +973 -1059
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +14 -36
- data/lib/orb/models/subscription_trigger_phase_response.rb +14 -36
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +14 -36
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +14 -36
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +14 -36
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +2 -2
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +14 -36
- data/lib/orb/models/subscription_update_trial_params.rb +3 -3
- data/lib/orb/models/subscription_update_trial_response.rb +14 -36
- data/lib/orb/models/subscription_usage.rb +26 -35
- data/lib/orb/models/subscriptions.rb +4 -4
- data/lib/orb/models/trial_discount.rb +5 -5
- data/lib/orb/models/usage_discount.rb +5 -5
- data/lib/orb/models.rb +30 -16
- data/lib/orb/resources/alerts.rb +15 -15
- data/lib/orb/resources/coupons/subscriptions.rb +1 -1
- data/lib/orb/resources/coupons.rb +5 -5
- data/lib/orb/resources/credit_notes.rb +5 -5
- data/lib/orb/resources/customers/balance_transactions.rb +1 -1
- data/lib/orb/resources/customers/costs.rb +2 -2
- data/lib/orb/resources/customers/credits/ledger.rb +10 -10
- data/lib/orb/resources/customers/credits/top_ups.rb +4 -4
- data/lib/orb/resources/customers.rb +30 -30
- data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +1 -1
- data/lib/orb/resources/dimensional_price_groups.rb +3 -3
- data/lib/orb/resources/events/volume.rb +1 -1
- data/lib/orb/resources/events.rb +1 -1
- data/lib/orb/resources/invoices.rb +12 -12
- data/lib/orb/resources/items.rb +5 -5
- data/lib/orb/resources/metrics.rb +4 -4
- data/lib/orb/resources/plans/external_plan_id.rb +2 -2
- data/lib/orb/resources/plans.rb +7 -7
- data/lib/orb/resources/prices/external_price_id.rb +2 -2
- data/lib/orb/resources/prices.rb +17 -17
- data/lib/orb/resources/subscriptions.rb +32 -32
- data/lib/orb/version.rb +1 -1
- data/rbi/orb/internal/type/array_of.rbi +6 -0
- data/rbi/orb/internal/type/base_model.rbi +5 -0
- data/rbi/orb/internal/type/boolean.rbi +6 -0
- data/rbi/orb/internal/type/enum.rbi +5 -0
- data/rbi/orb/internal/type/file_input.rbi +5 -0
- data/rbi/orb/internal/type/hash_of.rbi +6 -0
- data/rbi/orb/internal/type/union.rbi +5 -0
- data/rbi/orb/internal/type/unknown.rbi +6 -0
- data/rbi/orb/internal/util.rbi +30 -0
- data/rbi/orb/internal.rbi +3 -0
- data/rbi/orb/models/coupon.rbi +2 -2
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +2 -65
- data/rbi/orb/models/customers/cost_list_response.rbi +2 -65
- data/rbi/orb/models/evaluate_price_group.rbi +7 -3
- data/rbi/orb/models/invoice.rbi +10 -149
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +10 -133
- data/rbi/orb/models/invoice_line_item_create_response.rbi +8 -114
- data/rbi/orb/models/plan.rbi +8 -134
- data/rbi/orb/models/price.rbi +56 -588
- data/rbi/orb/models/subscription.rbi +6 -99
- data/rbi/orb/models/subscription_cancel_response.rbi +6 -89
- data/rbi/orb/models/subscription_change_apply_response.rbi +6 -89
- data/rbi/orb/models/subscription_change_cancel_response.rbi +6 -89
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +6 -89
- data/rbi/orb/models/subscription_create_response.rbi +6 -89
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +2 -65
- data/rbi/orb/models/subscription_price_intervals_response.rbi +6 -89
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +6 -89
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +6 -89
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +6 -89
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +6 -89
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +6 -89
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +6 -89
- data/rbi/orb/models/subscription_update_trial_response.rbi +6 -89
- data/rbi/orb/resources/customers/credits/ledger.rbi +4 -36
- data/rbi/orb/resources/prices/external_price_id.rbi +2 -64
- data/rbi/orb/resources/prices.rbi +4 -130
- data/rbi/orb/resources/subscriptions.rbi +1 -6
- data/sig/orb/internal/page.rbs +2 -0
- data/sig/orb/internal/type/array_of.rbs +3 -0
- data/sig/orb/internal/type/base_model.rbs +2 -0
- data/sig/orb/internal/type/boolean.rbs +3 -0
- data/sig/orb/internal/type/enum.rbs +2 -0
- data/sig/orb/internal/type/file_input.rbs +2 -0
- data/sig/orb/internal/type/hash_of.rbs +3 -0
- data/sig/orb/internal/type/union.rbs +2 -0
- data/sig/orb/internal/type/unknown.rbs +3 -0
- data/sig/orb/internal/util.rbs +12 -0
- data/sig/orb/internal.rbs +2 -0
- data/sig/orb/models/alert.rbs +32 -4
- data/sig/orb/models/alert_create_for_customer_params.rbs +9 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +9 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +9 -0
- data/sig/orb/models/alert_disable_params.rbs +5 -0
- data/sig/orb/models/alert_enable_params.rbs +5 -0
- data/sig/orb/models/alert_list_params.rbs +13 -0
- data/sig/orb/models/alert_retrieve_params.rbs +2 -0
- data/sig/orb/models/alert_update_params.rbs +7 -0
- data/sig/orb/models/amount_discount.rbs +11 -4
- data/sig/orb/models/billable_metric.rbs +13 -4
- data/sig/orb/models/coupon.rbs +14 -4
- data/sig/orb/models/coupon_archive_params.rbs +2 -0
- data/sig/orb/models/coupon_create_params.rbs +15 -0
- data/sig/orb/models/coupon_fetch_params.rbs +2 -0
- data/sig/orb/models/coupon_list_params.rbs +8 -0
- data/sig/orb/models/coupons/subscription_list_params.rbs +6 -0
- data/sig/orb/models/credit_note.rbs +88 -20
- data/sig/orb/models/credit_note_create_params.rbs +9 -0
- data/sig/orb/models/credit_note_fetch_params.rbs +2 -0
- data/sig/orb/models/credit_note_list_params.rbs +10 -0
- data/sig/orb/models/customer.rbs +86 -16
- data/sig/orb/models/customer_create_params.rbs +79 -8
- data/sig/orb/models/customer_delete_params.rbs +2 -0
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +2 -0
- data/sig/orb/models/customer_fetch_params.rbs +2 -0
- data/sig/orb/models/customer_list_params.rbs +10 -0
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +2 -0
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +2 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +78 -8
- data/sig/orb/models/customer_update_params.rbs +78 -8
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +7 -0
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +17 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +10 -0
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +17 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +8 -0
- data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +20 -0
- data/sig/orb/models/customers/cost_list_params.rbs +8 -0
- data/sig/orb/models/customers/cost_list_response.rbs +20 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +8 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +10 -0
- data/sig/orb/models/customers/credit_list_params.rbs +8 -0
- data/sig/orb/models/customers/credit_list_response.rbs +10 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +23 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +177 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +23 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +177 -0
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +14 -0
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +177 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +14 -0
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +177 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +19 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +18 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +19 -0
- data/sig/orb/models/customers/credits/top_up_create_response.rbs +18 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +5 -0
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +6 -0
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +18 -0
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +6 -0
- data/sig/orb/models/customers/credits/top_up_list_response.rbs +18 -0
- data/sig/orb/models/dimensional_price_group.rbs +9 -0
- data/sig/orb/models/dimensional_price_group_create_params.rbs +9 -0
- data/sig/orb/models/dimensional_price_group_list_params.rbs +6 -0
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +2 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +2 -0
- data/sig/orb/models/dimensional_price_groups.rbs +5 -0
- data/sig/orb/models/evaluate_price_group.rbs +10 -4
- data/sig/orb/models/event_deprecate_params.rbs +2 -0
- data/sig/orb/models/event_deprecate_response.rbs +2 -0
- data/sig/orb/models/event_ingest_params.rbs +16 -0
- data/sig/orb/models/event_ingest_response.rbs +15 -0
- data/sig/orb/models/event_search_params.rbs +7 -0
- data/sig/orb/models/event_search_response.rbs +12 -0
- data/sig/orb/models/event_update_params.rbs +9 -0
- data/sig/orb/models/event_update_response.rbs +2 -0
- data/sig/orb/models/events/backfill_close_params.rbs +2 -0
- data/sig/orb/models/events/backfill_close_response.rbs +14 -0
- data/sig/orb/models/events/backfill_create_params.rbs +11 -0
- data/sig/orb/models/events/backfill_create_response.rbs +14 -0
- data/sig/orb/models/events/backfill_fetch_params.rbs +2 -0
- data/sig/orb/models/events/backfill_fetch_response.rbs +14 -0
- data/sig/orb/models/events/backfill_list_params.rbs +6 -0
- data/sig/orb/models/events/backfill_list_response.rbs +14 -0
- data/sig/orb/models/events/backfill_revert_params.rbs +2 -0
- data/sig/orb/models/events/backfill_revert_response.rbs +14 -0
- data/sig/orb/models/events/event_volumes.rbs +8 -0
- data/sig/orb/models/events/volume_list_params.rbs +8 -0
- data/sig/orb/models/invoice.rbs +293 -36
- data/sig/orb/models/invoice_create_params.rbs +30 -4
- data/sig/orb/models/invoice_fetch_params.rbs +2 -0
- data/sig/orb/models/invoice_fetch_upcoming_params.rbs +5 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +257 -0
- data/sig/orb/models/invoice_issue_params.rbs +5 -0
- data/sig/orb/models/invoice_line_item_create_params.rbs +10 -0
- data/sig/orb/models/invoice_line_item_create_response.rbs +132 -0
- data/sig/orb/models/invoice_list_params.rbs +27 -4
- data/sig/orb/models/invoice_mark_paid_params.rbs +7 -0
- data/sig/orb/models/invoice_pay_params.rbs +2 -0
- data/sig/orb/models/invoice_update_params.rbs +5 -0
- data/sig/orb/models/invoice_void_params.rbs +2 -0
- data/sig/orb/models/item.rbs +16 -4
- data/sig/orb/models/item_create_params.rbs +2 -0
- data/sig/orb/models/item_fetch_params.rbs +2 -0
- data/sig/orb/models/item_list_params.rbs +6 -0
- data/sig/orb/models/item_update_params.rbs +15 -4
- data/sig/orb/models/metric_create_params.rbs +9 -0
- data/sig/orb/models/metric_fetch_params.rbs +2 -0
- data/sig/orb/models/metric_list_params.rbs +10 -0
- data/sig/orb/models/metric_update_params.rbs +5 -0
- data/sig/orb/models/pagination_metadata.rbs +2 -0
- data/sig/orb/models/percentage_discount.rbs +11 -4
- data/sig/orb/models/plan.rbs +141 -16
- data/sig/orb/models/plan_create_params.rbs +1070 -304
- data/sig/orb/models/plan_fetch_params.rbs +2 -0
- data/sig/orb/models/plan_list_params.rbs +11 -0
- data/sig/orb/models/plan_update_params.rbs +6 -0
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +2 -0
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +6 -0
- data/sig/orb/models/price.rbs +2148 -460
- data/sig/orb/models/price_create_params.rbs +130 -8
- data/sig/orb/models/price_evaluate_params.rbs +10 -0
- data/sig/orb/models/price_evaluate_response.rbs +2 -0
- data/sig/orb/models/price_fetch_params.rbs +2 -0
- data/sig/orb/models/price_list_params.rbs +6 -0
- data/sig/orb/models/price_update_params.rbs +5 -0
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +2 -0
- data/sig/orb/models/prices/external_price_id_update_params.rbs +5 -0
- data/sig/orb/models/subscription.rbs +177 -12
- data/sig/orb/models/subscription_cancel_params.rbs +7 -0
- data/sig/orb/models/subscription_cancel_response.rbs +173 -0
- data/sig/orb/models/subscription_change_apply_params.rbs +6 -0
- data/sig/orb/models/subscription_change_apply_response.rbs +186 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +2 -0
- data/sig/orb/models/subscription_change_cancel_response.rbs +186 -0
- data/sig/orb/models/subscription_change_retrieve_params.rbs +2 -0
- data/sig/orb/models/subscription_change_retrieve_response.rbs +186 -0
- data/sig/orb/models/subscription_create_params.rbs +2368 -632
- data/sig/orb/models/subscription_create_response.rbs +173 -0
- data/sig/orb/models/subscription_fetch_costs_params.rbs +8 -0
- data/sig/orb/models/subscription_fetch_costs_response.rbs +20 -0
- data/sig/orb/models/subscription_fetch_params.rbs +2 -0
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +10 -0
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +13 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +14 -0
- data/sig/orb/models/subscription_list_params.rbs +13 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +1348 -396
- data/sig/orb/models/subscription_price_intervals_response.rbs +173 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +2363 -632
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +173 -0
- data/sig/orb/models/subscription_trigger_phase_params.rbs +6 -0
- data/sig/orb/models/subscription_trigger_phase_response.rbs +173 -0
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +2 -0
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +173 -0
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +2 -0
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +173 -0
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +2 -0
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +173 -0
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +9 -0
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +173 -0
- data/sig/orb/models/subscription_update_params.rbs +9 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +6 -0
- data/sig/orb/models/subscription_update_trial_response.rbs +173 -0
- data/sig/orb/models/subscription_usage.rbs +48 -8
- data/sig/orb/models/subscriptions.rbs +5 -0
- data/sig/orb/models/top_level_ping_params.rbs +2 -0
- data/sig/orb/models/top_level_ping_response.rbs +2 -0
- data/sig/orb/models/trial_discount.rbs +12 -4
- data/sig/orb/models/usage_discount.rbs +11 -4
- data/sig/orb/resources/invoices.rbs +1 -1
- data/sig/orb/resources/plans.rbs +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 046f939f85c0fbdb9e429913a6d9016d67233f1bb2ecf85c94bfdb1c3b7737ed
|
4
|
+
data.tar.gz: 0105134177a44d30a99f0d98b184fe26e00bf8c57dae02b1212841e7188f6217
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc454ca6fff2c9effb81eafeee563b7c1d59f86be00e9921fa650fd063abba8235de362a9b4b0cab292c28008029fb21952931c3531f9a6af297cabb7ea7df89
|
7
|
+
data.tar.gz: 25066c2618830848109dc606b7d0befc10de1ae5f8957b65905a8c997ff2c7221f77c21e580202055f9b375544bc67a7a9ef107ee30551f4cf21d2fff7c98de4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,31 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.5.3 (2025-05-22)
|
4
|
+
|
5
|
+
Full Changelog: [v0.5.2...v0.5.3](https://github.com/orbcorp/orb-ruby/compare/v0.5.2...v0.5.3)
|
6
|
+
|
7
|
+
### Chores
|
8
|
+
|
9
|
+
* **docs:** grammar improvements ([3c1a4d4](https://github.com/orbcorp/orb-ruby/commit/3c1a4d421f276c01935659d401c8383470f2f10c))
|
10
|
+
* force utf-8 locale via `RUBYOPT` when formatting ([42a4919](https://github.com/orbcorp/orb-ruby/commit/42a49195c6ea42836d56e130113158c013f4d5d7))
|
11
|
+
* **internal:** version bump ([1decdd2](https://github.com/orbcorp/orb-ruby/commit/1decdd2778f75a19da2218937d4a4f6a44009b84))
|
12
|
+
* refine Yard and Sorbet types and ensure linting is turned on for examples ([8ec00ad](https://github.com/orbcorp/orb-ruby/commit/8ec00ad8007fa9ff78d8c479eb592f3083da8ad9))
|
13
|
+
* use fully qualified names for yard annotations and rbs aliases ([22efb17](https://github.com/orbcorp/orb-ruby/commit/22efb17c873701d2d583c9c517a128128b1bd4d5))
|
14
|
+
|
15
|
+
## 0.5.2 (2025-05-20)
|
16
|
+
|
17
|
+
Full Changelog: [v0.5.1...v0.5.2](https://github.com/orbcorp/orb-ruby/compare/v0.5.1...v0.5.2)
|
18
|
+
|
19
|
+
### Bug Fixes
|
20
|
+
|
21
|
+
* correctly instantiate sorbet type aliases for enums and unions ([fe6a29e](https://github.com/orbcorp/orb-ruby/commit/fe6a29e33ae5266fd130d703da02eec410a3902f))
|
22
|
+
|
23
|
+
|
24
|
+
### Chores
|
25
|
+
|
26
|
+
* **internal:** version bump ([b4afd0a](https://github.com/orbcorp/orb-ruby/commit/b4afd0af68ade8e7a53de012123bce96cedb8670))
|
27
|
+
* use sorbet union aliases where available ([444add5](https://github.com/orbcorp/orb-ruby/commit/444add556f04ae705e8c918421419cf43df1b053))
|
28
|
+
|
3
29
|
## 0.5.1 (2025-05-20)
|
4
30
|
|
5
31
|
Full Changelog: [v0.5.0...v0.5.1](https://github.com/orbcorp/orb-ruby/compare/v0.5.0...v0.5.1)
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
15
|
<!-- x-release-please-start-version -->
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem "orb-billing", "~> 0.5.
|
18
|
+
gem "orb-billing", "~> 0.5.3"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
@@ -180,7 +180,7 @@ puts(customer[:my_undocumented_property])
|
|
180
180
|
|
181
181
|
#### Undocumented request params
|
182
182
|
|
183
|
-
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request as seen in examples above.
|
183
|
+
If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` under the `request_options:` parameter when making a request, as seen in the examples above.
|
184
184
|
|
185
185
|
#### Undocumented endpoints
|
186
186
|
|
@@ -198,7 +198,7 @@ response = client.request(
|
|
198
198
|
|
199
199
|
### Concurrency & connection pooling
|
200
200
|
|
201
|
-
The `Orb::Client` instances are threadsafe, but only are fork-safe when there are no in-flight HTTP requests.
|
201
|
+
The `Orb::Client` instances are threadsafe, but are only are fork-safe when there are no in-flight HTTP requests.
|
202
202
|
|
203
203
|
Each instance of `Orb::Client` has its own HTTP connection pool with a default size of 99. As such, we recommend instantiating the client once per application in most settings.
|
204
204
|
|
@@ -248,7 +248,7 @@ orb.credit_notes.create(
|
|
248
248
|
# …
|
249
249
|
)
|
250
250
|
|
251
|
-
# Literal values
|
251
|
+
# Literal values are also permissible:
|
252
252
|
orb.credit_notes.create(
|
253
253
|
reason: :duplicate,
|
254
254
|
# …
|
data/SECURITY.md
CHANGED
@@ -16,11 +16,11 @@ before making any information public.
|
|
16
16
|
## Reporting Non-SDK Related Security Issues
|
17
17
|
|
18
18
|
If you encounter security issues that are not directly related to SDKs but pertain to the services
|
19
|
-
or products provided by Orb please follow the respective company's security reporting guidelines.
|
19
|
+
or products provided by Orb, please follow the respective company's security reporting guidelines.
|
20
20
|
|
21
21
|
### Orb Terms and Policies
|
22
22
|
|
23
|
-
Please contact team@withorb.com for any questions or concerns regarding security of our services.
|
23
|
+
Please contact team@withorb.com for any questions or concerns regarding the security of our services.
|
24
24
|
|
25
25
|
---
|
26
26
|
|
@@ -12,6 +12,7 @@ module Orb
|
|
12
12
|
# Array of items of a given type.
|
13
13
|
class ArrayOf
|
14
14
|
include Orb::Internal::Type::Converter
|
15
|
+
include Orb::Internal::Util::SorbetRuntimeSupport
|
15
16
|
|
16
17
|
private_class_method :new
|
17
18
|
|
@@ -110,6 +111,13 @@ module Orb
|
|
110
111
|
end
|
111
112
|
end
|
112
113
|
|
114
|
+
# @api private
|
115
|
+
#
|
116
|
+
# @return [Object]
|
117
|
+
def to_sorbet_type
|
118
|
+
T::Array[Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
|
119
|
+
end
|
120
|
+
|
113
121
|
# @api private
|
114
122
|
#
|
115
123
|
# @return [generic<Elem>]
|
@@ -10,6 +10,7 @@ module Orb
|
|
10
10
|
# Ruby has no Boolean class; this is something for models to refer to.
|
11
11
|
class Boolean
|
12
12
|
extend Orb::Internal::Type::Converter
|
13
|
+
extend Orb::Internal::Util::SorbetRuntimeSupport
|
13
14
|
|
14
15
|
private_class_method :new
|
15
16
|
|
@@ -56,6 +57,13 @@ module Orb
|
|
56
57
|
# @option state [Boolean] :can_retry
|
57
58
|
#
|
58
59
|
# @return [Boolean, Object]
|
60
|
+
|
61
|
+
# @api private
|
62
|
+
#
|
63
|
+
# @return [Object]
|
64
|
+
def to_sorbet_type
|
65
|
+
T::Boolean
|
66
|
+
end
|
59
67
|
end
|
60
68
|
end
|
61
69
|
end
|
@@ -108,6 +108,18 @@ module Orb
|
|
108
108
|
#
|
109
109
|
# @return [Symbol, Object]
|
110
110
|
|
111
|
+
# @api private
|
112
|
+
#
|
113
|
+
# @return [Object]
|
114
|
+
def to_sorbet_type
|
115
|
+
case values
|
116
|
+
in []
|
117
|
+
T.noreturn
|
118
|
+
in [value, *_]
|
119
|
+
T.all(Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
|
120
|
+
end
|
121
|
+
end
|
122
|
+
|
111
123
|
# @api private
|
112
124
|
#
|
113
125
|
# @param depth [Integer]
|
@@ -12,6 +12,7 @@ module Orb
|
|
12
12
|
# Hash of items of a given type.
|
13
13
|
class HashOf
|
14
14
|
include Orb::Internal::Type::Converter
|
15
|
+
include Orb::Internal::Util::SorbetRuntimeSupport
|
15
16
|
|
16
17
|
private_class_method :new
|
17
18
|
|
@@ -130,6 +131,13 @@ module Orb
|
|
130
131
|
end
|
131
132
|
end
|
132
133
|
|
134
|
+
# @api private
|
135
|
+
#
|
136
|
+
# @return [Object]
|
137
|
+
def to_sorbet_type
|
138
|
+
T::Hash[Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(item_type)]
|
139
|
+
end
|
140
|
+
|
133
141
|
# @api private
|
134
142
|
#
|
135
143
|
# @return [generic<Elem>]
|
@@ -231,6 +231,18 @@ module Orb
|
|
231
231
|
super
|
232
232
|
end
|
233
233
|
|
234
|
+
# @api private
|
235
|
+
#
|
236
|
+
# @return [Object]
|
237
|
+
def to_sorbet_type
|
238
|
+
case (v = variants)
|
239
|
+
in []
|
240
|
+
T.noreturn
|
241
|
+
else
|
242
|
+
T.any(*v.map { Orb::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
234
246
|
# rubocop:enable Style/CaseEquality
|
235
247
|
# rubocop:enable Style/HashEachMethods
|
236
248
|
|
@@ -10,6 +10,7 @@ module Orb
|
|
10
10
|
# When we don't know what to expect for the value.
|
11
11
|
class Unknown
|
12
12
|
extend Orb::Internal::Type::Converter
|
13
|
+
extend Orb::Internal::Util::SorbetRuntimeSupport
|
13
14
|
|
14
15
|
# rubocop:disable Lint/UnusedMethodArgument
|
15
16
|
|
@@ -58,6 +59,13 @@ module Orb
|
|
58
59
|
# @option state [Boolean] :can_retry
|
59
60
|
#
|
60
61
|
# @return [Object]
|
62
|
+
|
63
|
+
# @api private
|
64
|
+
#
|
65
|
+
# @return [Object]
|
66
|
+
def to_sorbet_type
|
67
|
+
T.anything
|
68
|
+
end
|
61
69
|
end
|
62
70
|
|
63
71
|
# rubocop:enable Lint/UnusedMethodArgument
|
data/lib/orb/internal/util.rb
CHANGED
@@ -9,6 +9,23 @@ module Orb
|
|
9
9
|
# @return [Float]
|
10
10
|
def self.monotonic_secs = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
11
11
|
|
12
|
+
# @api private
|
13
|
+
#
|
14
|
+
# @param ns [Module, Class]
|
15
|
+
#
|
16
|
+
# @return [Enumerable<Module, Class>]
|
17
|
+
def self.walk_namespaces(ns)
|
18
|
+
ns.constants(false).lazy.flat_map do
|
19
|
+
case (c = ns.const_get(_1, false))
|
20
|
+
in Module | Class
|
21
|
+
walk_namespaces(c)
|
22
|
+
else
|
23
|
+
[]
|
24
|
+
end
|
25
|
+
end
|
26
|
+
.chain([ns])
|
27
|
+
end
|
28
|
+
|
12
29
|
class << self
|
13
30
|
# @api private
|
14
31
|
#
|
@@ -826,11 +843,39 @@ module Orb
|
|
826
843
|
sorbet_runtime_constants.fetch(name).call
|
827
844
|
end
|
828
845
|
|
846
|
+
# @api private
|
847
|
+
#
|
848
|
+
# @param name [Symbol]
|
849
|
+
#
|
850
|
+
# @return [Boolean]
|
851
|
+
def sorbet_constant_defined?(name) = sorbet_runtime_constants.key?(name)
|
852
|
+
|
829
853
|
# @api private
|
830
854
|
#
|
831
855
|
# @param name [Symbol]
|
832
856
|
# @param blk [Proc]
|
833
857
|
def define_sorbet_constant!(name, &blk) = sorbet_runtime_constants.store(name, blk)
|
858
|
+
|
859
|
+
# @api private
|
860
|
+
#
|
861
|
+
# @return [Object]
|
862
|
+
def to_sorbet_type = raise NotImplementedError
|
863
|
+
|
864
|
+
class << self
|
865
|
+
# @api private
|
866
|
+
#
|
867
|
+
# @param type [Orb::Internal::Util::SorbetRuntimeSupport, Object]
|
868
|
+
#
|
869
|
+
# @return [Object]
|
870
|
+
def to_sorbet_type(type)
|
871
|
+
case type
|
872
|
+
in Orb::Internal::Util::SorbetRuntimeSupport
|
873
|
+
type.to_sorbet_type
|
874
|
+
else
|
875
|
+
type
|
876
|
+
end
|
877
|
+
end
|
878
|
+
end
|
834
879
|
end
|
835
880
|
|
836
881
|
extend Orb::Internal::Util::SorbetRuntimeSupport
|
data/lib/orb/internal.rb
CHANGED
data/lib/orb/models/alert.rb
CHANGED
@@ -25,7 +25,7 @@ module Orb
|
|
25
25
|
# @!attribute customer
|
26
26
|
# The customer the alert applies to.
|
27
27
|
#
|
28
|
-
# @return [Orb::Alert::Customer, nil]
|
28
|
+
# @return [Orb::Models::Alert::Customer, nil]
|
29
29
|
required :customer, -> { Orb::Alert::Customer }, nil?: true
|
30
30
|
|
31
31
|
# @!attribute enabled
|
@@ -37,37 +37,37 @@ module Orb
|
|
37
37
|
# @!attribute metric
|
38
38
|
# The metric the alert applies to.
|
39
39
|
#
|
40
|
-
# @return [Orb::Alert::Metric, nil]
|
40
|
+
# @return [Orb::Models::Alert::Metric, nil]
|
41
41
|
required :metric, -> { Orb::Alert::Metric }, nil?: true
|
42
42
|
|
43
43
|
# @!attribute plan
|
44
44
|
# The plan the alert applies to.
|
45
45
|
#
|
46
|
-
# @return [Orb::Alert::Plan, nil]
|
46
|
+
# @return [Orb::Models::Alert::Plan, nil]
|
47
47
|
required :plan, -> { Orb::Alert::Plan }, nil?: true
|
48
48
|
|
49
49
|
# @!attribute subscription
|
50
50
|
# The subscription the alert applies to.
|
51
51
|
#
|
52
|
-
# @return [Orb::Alert::Subscription, nil]
|
52
|
+
# @return [Orb::Models::Alert::Subscription, nil]
|
53
53
|
required :subscription, -> { Orb::Alert::Subscription }, nil?: true
|
54
54
|
|
55
55
|
# @!attribute thresholds
|
56
56
|
# The thresholds that define the conditions under which the alert will be
|
57
57
|
# triggered.
|
58
58
|
#
|
59
|
-
# @return [Array<Orb::Alert::Threshold>, nil]
|
59
|
+
# @return [Array<Orb::Models::Alert::Threshold>, nil]
|
60
60
|
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::Alert::Threshold] }, nil?: true
|
61
61
|
|
62
62
|
# @!attribute type
|
63
63
|
# The type of alert. This must be a valid alert type.
|
64
64
|
#
|
65
|
-
# @return [Symbol, Orb::Alert::Type]
|
65
|
+
# @return [Symbol, Orb::Models::Alert::Type]
|
66
66
|
required :type, enum: -> { Orb::Alert::Type }
|
67
67
|
|
68
68
|
# @!method initialize(id:, created_at:, currency:, customer:, enabled:, metric:, plan:, subscription:, thresholds:, type:)
|
69
|
-
# Some parameter documentations has been truncated, see {Orb::Alert} for
|
70
|
-
# details.
|
69
|
+
# Some parameter documentations has been truncated, see {Orb::Models::Alert} for
|
70
|
+
# more details.
|
71
71
|
#
|
72
72
|
# [Alerts within Orb](/product-catalog/configuring-alerts) monitor spending,
|
73
73
|
# usage, or credit balance and trigger webhooks when a threshold is exceeded.
|
@@ -81,21 +81,21 @@ module Orb
|
|
81
81
|
#
|
82
82
|
# @param currency [String, nil] The name of the currency the credit balance or invoice cost is denominated in.
|
83
83
|
#
|
84
|
-
# @param customer [Orb::Alert::Customer, nil] The customer the alert applies to.
|
84
|
+
# @param customer [Orb::Models::Alert::Customer, nil] The customer the alert applies to.
|
85
85
|
#
|
86
86
|
# @param enabled [Boolean] Whether the alert is enabled or disabled.
|
87
87
|
#
|
88
|
-
# @param metric [Orb::Alert::Metric, nil] The metric the alert applies to.
|
88
|
+
# @param metric [Orb::Models::Alert::Metric, nil] The metric the alert applies to.
|
89
89
|
#
|
90
|
-
# @param plan [Orb::Alert::Plan, nil] The plan the alert applies to.
|
90
|
+
# @param plan [Orb::Models::Alert::Plan, nil] The plan the alert applies to.
|
91
91
|
#
|
92
|
-
# @param subscription [Orb::Alert::Subscription, nil] The subscription the alert applies to.
|
92
|
+
# @param subscription [Orb::Models::Alert::Subscription, nil] The subscription the alert applies to.
|
93
93
|
#
|
94
|
-
# @param thresholds [Array<Orb::Alert::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
|
94
|
+
# @param thresholds [Array<Orb::Models::Alert::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
|
95
95
|
#
|
96
|
-
# @param type [Symbol, Orb::Alert::Type] The type of alert. This must be a valid alert type.
|
96
|
+
# @param type [Symbol, Orb::Models::Alert::Type] The type of alert. This must be a valid alert type.
|
97
97
|
|
98
|
-
# @see Orb::Alert#customer
|
98
|
+
# @see Orb::Models::Alert#customer
|
99
99
|
class Customer < Orb::Internal::Type::BaseModel
|
100
100
|
# @!attribute id
|
101
101
|
#
|
@@ -114,7 +114,7 @@ module Orb
|
|
114
114
|
# @param external_customer_id [String, nil]
|
115
115
|
end
|
116
116
|
|
117
|
-
# @see Orb::Alert#metric
|
117
|
+
# @see Orb::Models::Alert#metric
|
118
118
|
class Metric < Orb::Internal::Type::BaseModel
|
119
119
|
# @!attribute id
|
120
120
|
#
|
@@ -127,7 +127,7 @@ module Orb
|
|
127
127
|
# @param id [String]
|
128
128
|
end
|
129
129
|
|
130
|
-
# @see Orb::Alert#plan
|
130
|
+
# @see Orb::Models::Alert#plan
|
131
131
|
class Plan < Orb::Internal::Type::BaseModel
|
132
132
|
# @!attribute id
|
133
133
|
#
|
@@ -153,8 +153,8 @@ module Orb
|
|
153
153
|
required :plan_version, String
|
154
154
|
|
155
155
|
# @!method initialize(id:, external_plan_id:, name:, plan_version:)
|
156
|
-
# Some parameter documentations has been truncated, see {Orb::Alert::Plan}
|
157
|
-
# more details.
|
156
|
+
# Some parameter documentations has been truncated, see {Orb::Models::Alert::Plan}
|
157
|
+
# for more details.
|
158
158
|
#
|
159
159
|
# The plan the alert applies to.
|
160
160
|
#
|
@@ -167,7 +167,7 @@ module Orb
|
|
167
167
|
# @param plan_version [String]
|
168
168
|
end
|
169
169
|
|
170
|
-
# @see Orb::Alert#subscription
|
170
|
+
# @see Orb::Models::Alert#subscription
|
171
171
|
class Subscription < Orb::Internal::Type::BaseModel
|
172
172
|
# @!attribute id
|
173
173
|
#
|
@@ -190,8 +190,8 @@ module Orb
|
|
190
190
|
required :value, Float
|
191
191
|
|
192
192
|
# @!method initialize(value:)
|
193
|
-
# Some parameter documentations has been truncated, see
|
194
|
-
# for more details.
|
193
|
+
# Some parameter documentations has been truncated, see
|
194
|
+
# {Orb::Models::Alert::Threshold} for more details.
|
195
195
|
#
|
196
196
|
# Thresholds are used to define the conditions under which an alert will be
|
197
197
|
# triggered.
|
@@ -201,7 +201,7 @@ module Orb
|
|
201
201
|
|
202
202
|
# The type of alert. This must be a valid alert type.
|
203
203
|
#
|
204
|
-
# @see Orb::Alert#type
|
204
|
+
# @see Orb::Models::Alert#type
|
205
205
|
module Type
|
206
206
|
extend Orb::Internal::Type::Enum
|
207
207
|
|
@@ -16,13 +16,13 @@ module Orb
|
|
16
16
|
# @!attribute type
|
17
17
|
# The type of alert to create. This must be a valid alert type.
|
18
18
|
#
|
19
|
-
# @return [Symbol, Orb::AlertCreateForCustomerParams::Type]
|
19
|
+
# @return [Symbol, Orb::Models::AlertCreateForCustomerParams::Type]
|
20
20
|
required :type, enum: -> { Orb::AlertCreateForCustomerParams::Type }
|
21
21
|
|
22
22
|
# @!attribute thresholds
|
23
23
|
# The thresholds that define the values at which the alert will be triggered.
|
24
24
|
#
|
25
|
-
# @return [Array<Orb::AlertCreateForCustomerParams::Threshold>, nil]
|
25
|
+
# @return [Array<Orb::Models::AlertCreateForCustomerParams::Threshold>, nil]
|
26
26
|
optional :thresholds,
|
27
27
|
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForCustomerParams::Threshold] },
|
28
28
|
nil?: true
|
@@ -30,9 +30,9 @@ module Orb
|
|
30
30
|
# @!method initialize(currency:, type:, thresholds: nil, request_options: {})
|
31
31
|
# @param currency [String] The case sensitive currency or custom pricing unit to use for this alert.
|
32
32
|
#
|
33
|
-
# @param type [Symbol, Orb::AlertCreateForCustomerParams::Type] The type of alert to create. This must be a valid alert type.
|
33
|
+
# @param type [Symbol, Orb::Models::AlertCreateForCustomerParams::Type] The type of alert to create. This must be a valid alert type.
|
34
34
|
#
|
35
|
-
# @param thresholds [Array<Orb::AlertCreateForCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
|
35
|
+
# @param thresholds [Array<Orb::Models::AlertCreateForCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
|
36
36
|
#
|
37
37
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
38
38
|
|
@@ -59,7 +59,7 @@ module Orb
|
|
59
59
|
|
60
60
|
# @!method initialize(value:)
|
61
61
|
# Some parameter documentations has been truncated, see
|
62
|
-
# {Orb::AlertCreateForCustomerParams::Threshold} for more details.
|
62
|
+
# {Orb::Models::AlertCreateForCustomerParams::Threshold} for more details.
|
63
63
|
#
|
64
64
|
# Thresholds are used to define the conditions under which an alert will be
|
65
65
|
# triggered.
|
@@ -16,13 +16,13 @@ module Orb
|
|
16
16
|
# @!attribute type
|
17
17
|
# The type of alert to create. This must be a valid alert type.
|
18
18
|
#
|
19
|
-
# @return [Symbol, Orb::AlertCreateForExternalCustomerParams::Type]
|
19
|
+
# @return [Symbol, Orb::Models::AlertCreateForExternalCustomerParams::Type]
|
20
20
|
required :type, enum: -> { Orb::AlertCreateForExternalCustomerParams::Type }
|
21
21
|
|
22
22
|
# @!attribute thresholds
|
23
23
|
# The thresholds that define the values at which the alert will be triggered.
|
24
24
|
#
|
25
|
-
# @return [Array<Orb::AlertCreateForExternalCustomerParams::Threshold>, nil]
|
25
|
+
# @return [Array<Orb::Models::AlertCreateForExternalCustomerParams::Threshold>, nil]
|
26
26
|
optional :thresholds,
|
27
27
|
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForExternalCustomerParams::Threshold] },
|
28
28
|
nil?: true
|
@@ -30,9 +30,9 @@ module Orb
|
|
30
30
|
# @!method initialize(currency:, type:, thresholds: nil, request_options: {})
|
31
31
|
# @param currency [String] The case sensitive currency or custom pricing unit to use for this alert.
|
32
32
|
#
|
33
|
-
# @param type [Symbol, Orb::AlertCreateForExternalCustomerParams::Type] The type of alert to create. This must be a valid alert type.
|
33
|
+
# @param type [Symbol, Orb::Models::AlertCreateForExternalCustomerParams::Type] The type of alert to create. This must be a valid alert type.
|
34
34
|
#
|
35
|
-
# @param thresholds [Array<Orb::AlertCreateForExternalCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
|
35
|
+
# @param thresholds [Array<Orb::Models::AlertCreateForExternalCustomerParams::Threshold>, nil] The thresholds that define the values at which the alert will be triggered.
|
36
36
|
#
|
37
37
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
38
38
|
|
@@ -59,7 +59,7 @@ module Orb
|
|
59
59
|
|
60
60
|
# @!method initialize(value:)
|
61
61
|
# Some parameter documentations has been truncated, see
|
62
|
-
# {Orb::AlertCreateForExternalCustomerParams::Threshold} for more details.
|
62
|
+
# {Orb::Models::AlertCreateForExternalCustomerParams::Threshold} for more details.
|
63
63
|
#
|
64
64
|
# Thresholds are used to define the conditions under which an alert will be
|
65
65
|
# triggered.
|
@@ -10,14 +10,14 @@ module Orb
|
|
10
10
|
# @!attribute thresholds
|
11
11
|
# The thresholds that define the values at which the alert will be triggered.
|
12
12
|
#
|
13
|
-
# @return [Array<Orb::AlertCreateForSubscriptionParams::Threshold>]
|
13
|
+
# @return [Array<Orb::Models::AlertCreateForSubscriptionParams::Threshold>]
|
14
14
|
required :thresholds,
|
15
15
|
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForSubscriptionParams::Threshold] }
|
16
16
|
|
17
17
|
# @!attribute type
|
18
18
|
# The type of alert to create. This must be a valid alert type.
|
19
19
|
#
|
20
|
-
# @return [Symbol, Orb::AlertCreateForSubscriptionParams::Type]
|
20
|
+
# @return [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type]
|
21
21
|
required :type, enum: -> { Orb::AlertCreateForSubscriptionParams::Type }
|
22
22
|
|
23
23
|
# @!attribute metric_id
|
@@ -27,9 +27,9 @@ module Orb
|
|
27
27
|
optional :metric_id, String, nil?: true
|
28
28
|
|
29
29
|
# @!method initialize(thresholds:, type:, metric_id: nil, request_options: {})
|
30
|
-
# @param thresholds [Array<Orb::AlertCreateForSubscriptionParams::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
30
|
+
# @param thresholds [Array<Orb::Models::AlertCreateForSubscriptionParams::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
31
31
|
#
|
32
|
-
# @param type [Symbol, Orb::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type.
|
32
|
+
# @param type [Symbol, Orb::Models::AlertCreateForSubscriptionParams::Type] The type of alert to create. This must be a valid alert type.
|
33
33
|
#
|
34
34
|
# @param metric_id [String, nil] The metric to track usage for.
|
35
35
|
#
|
@@ -46,7 +46,7 @@ module Orb
|
|
46
46
|
|
47
47
|
# @!method initialize(value:)
|
48
48
|
# Some parameter documentations has been truncated, see
|
49
|
-
# {Orb::AlertCreateForSubscriptionParams::Threshold} for more details.
|
49
|
+
# {Orb::Models::AlertCreateForSubscriptionParams::Threshold} for more details.
|
50
50
|
#
|
51
51
|
# Thresholds are used to define the conditions under which an alert will be
|
52
52
|
# triggered.
|
@@ -10,11 +10,11 @@ module Orb
|
|
10
10
|
# @!attribute thresholds
|
11
11
|
# The thresholds that define the values at which the alert will be triggered.
|
12
12
|
#
|
13
|
-
# @return [Array<Orb::AlertUpdateParams::Threshold>]
|
13
|
+
# @return [Array<Orb::Models::AlertUpdateParams::Threshold>]
|
14
14
|
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::AlertUpdateParams::Threshold] }
|
15
15
|
|
16
16
|
# @!method initialize(thresholds:, request_options: {})
|
17
|
-
# @param thresholds [Array<Orb::AlertUpdateParams::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
17
|
+
# @param thresholds [Array<Orb::Models::AlertUpdateParams::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
18
18
|
#
|
19
19
|
# @param request_options [Orb::RequestOptions, Hash{Symbol=>Object}]
|
20
20
|
|
@@ -29,7 +29,7 @@ module Orb
|
|
29
29
|
|
30
30
|
# @!method initialize(value:)
|
31
31
|
# Some parameter documentations has been truncated, see
|
32
|
-
# {Orb::AlertUpdateParams::Threshold} for more details.
|
32
|
+
# {Orb::Models::AlertUpdateParams::Threshold} for more details.
|
33
33
|
#
|
34
34
|
# Thresholds are used to define the conditions under which an alert will be
|
35
35
|
# triggered.
|
@@ -18,7 +18,7 @@ module Orb
|
|
18
18
|
|
19
19
|
# @!attribute discount_type
|
20
20
|
#
|
21
|
-
# @return [Symbol, Orb::AmountDiscount::DiscountType]
|
21
|
+
# @return [Symbol, Orb::Models::AmountDiscount::DiscountType]
|
22
22
|
required :discount_type, enum: -> { Orb::AmountDiscount::DiscountType }
|
23
23
|
|
24
24
|
# @!attribute reason
|
@@ -27,18 +27,18 @@ module Orb
|
|
27
27
|
optional :reason, String, nil?: true
|
28
28
|
|
29
29
|
# @!method initialize(amount_discount:, applies_to_price_ids:, discount_type:, reason: nil)
|
30
|
-
# Some parameter documentations has been truncated, see
|
31
|
-
# more details.
|
30
|
+
# Some parameter documentations has been truncated, see
|
31
|
+
# {Orb::Models::AmountDiscount} for more details.
|
32
32
|
#
|
33
33
|
# @param amount_discount [String] Only available if discount_type is `amount`.
|
34
34
|
#
|
35
35
|
# @param applies_to_price_ids [Array<String>] List of price_ids that this discount applies to. For plan/plan phase discounts,
|
36
36
|
#
|
37
|
-
# @param discount_type [Symbol, Orb::AmountDiscount::DiscountType]
|
37
|
+
# @param discount_type [Symbol, Orb::Models::AmountDiscount::DiscountType]
|
38
38
|
#
|
39
39
|
# @param reason [String, nil]
|
40
40
|
|
41
|
-
# @see Orb::AmountDiscount#discount_type
|
41
|
+
# @see Orb::Models::AmountDiscount#discount_type
|
42
42
|
module DiscountType
|
43
43
|
extend Orb::Internal::Type::Enum
|
44
44
|
|