orb-billing 0.3.1 → 0.3.2
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 +14 -0
- data/README.md +3 -3
- data/lib/orb/file_part.rb +2 -2
- data/lib/orb/internal/type/enum.rb +3 -3
- data/lib/orb/internal/type/request_parameters.rb +4 -4
- data/lib/orb/internal/type/union.rb +4 -4
- data/lib/orb/internal/util.rb +1 -1
- data/lib/orb/models/alert.rb +29 -32
- data/lib/orb/models/alert_create_for_customer_params.rb +7 -8
- data/lib/orb/models/alert_create_for_external_customer_params.rb +7 -8
- data/lib/orb/models/alert_create_for_subscription_params.rb +7 -8
- data/lib/orb/models/alert_list_params.rb +0 -1
- data/lib/orb/models/alert_update_params.rb +4 -5
- data/lib/orb/models/amount_discount.rb +6 -7
- data/lib/orb/models/billable_metric.rb +9 -11
- data/lib/orb/models/coupon.rb +9 -12
- data/lib/orb/models/coupon_create_params.rb +6 -8
- data/lib/orb/models/coupon_list_params.rb +0 -2
- data/lib/orb/models/coupons/subscription_list_params.rb +0 -1
- data/lib/orb/models/credit_note.rb +48 -46
- data/lib/orb/models/credit_note_create_params.rb +6 -6
- data/lib/orb/models/credit_note_list_params.rb +0 -1
- data/lib/orb/models/customer.rb +54 -61
- data/lib/orb/models/customer_create_params.rb +41 -53
- data/lib/orb/models/customer_list_params.rb +0 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +41 -53
- data/lib/orb/models/customer_update_params.rb +41 -51
- data/lib/orb/models/customers/balance_transaction_create_params.rb +3 -3
- data/lib/orb/models/customers/balance_transaction_create_response.rb +0 -2
- data/lib/orb/models/customers/balance_transaction_list_params.rb +0 -1
- data/lib/orb/models/customers/balance_transaction_list_response.rb +0 -2
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +3 -4
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +3 -3
- data/lib/orb/models/customers/cost_list_params.rb +3 -4
- data/lib/orb/models/customers/cost_list_response.rb +3 -3
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +0 -2
- data/lib/orb/models/customers/credit_list_params.rb +0 -2
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +12 -21
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +0 -7
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +11 -22
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +0 -7
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +6 -7
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +0 -7
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -9
- data/lib/orb/models/customers/credits/ledger_list_response.rb +0 -7
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +10 -15
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +0 -6
- data/lib/orb/models/customers/credits/top_up_create_params.rb +7 -15
- data/lib/orb/models/customers/credits/top_up_create_response.rb +0 -6
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +0 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +0 -6
- data/lib/orb/models/customers/credits/top_up_list_params.rb +0 -1
- data/lib/orb/models/customers/credits/top_up_list_response.rb +0 -6
- data/lib/orb/models/dimensional_price_group.rb +1 -3
- data/lib/orb/models/dimensional_price_group_create_params.rb +0 -1
- data/lib/orb/models/dimensional_price_group_list_params.rb +0 -1
- data/lib/orb/models/dimensional_price_groups.rb +6 -6
- data/lib/orb/models/discount.rb +5 -5
- data/lib/orb/models/evaluate_price_group.rb +1 -1
- data/lib/orb/models/event_ingest_params.rb +4 -9
- data/lib/orb/models/event_ingest_response.rb +0 -3
- data/lib/orb/models/event_search_params.rb +0 -3
- data/lib/orb/models/event_search_response.rb +0 -4
- data/lib/orb/models/event_update_params.rb +0 -3
- data/lib/orb/models/events/backfill_close_response.rb +0 -4
- data/lib/orb/models/events/backfill_create_params.rb +0 -7
- data/lib/orb/models/events/backfill_create_response.rb +0 -4
- data/lib/orb/models/events/backfill_fetch_response.rb +0 -4
- data/lib/orb/models/events/backfill_list_params.rb +0 -1
- data/lib/orb/models/events/backfill_list_response.rb +0 -4
- data/lib/orb/models/events/backfill_revert_response.rb +0 -4
- data/lib/orb/models/events/event_volumes.rb +3 -3
- data/lib/orb/models/events/volume_list_params.rb +0 -3
- data/lib/orb/models/invoice.rb +157 -202
- data/lib/orb/models/invoice_create_params.rb +14 -21
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +9 -54
- data/lib/orb/models/invoice_issue_params.rb +0 -1
- data/lib/orb/models/invoice_level_discount.rb +4 -4
- data/lib/orb/models/invoice_line_item_create_params.rb +0 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +6 -26
- data/lib/orb/models/invoice_list_params.rb +6 -10
- data/lib/orb/models/invoice_update_params.rb +0 -1
- data/lib/orb/models/item.rb +7 -8
- data/lib/orb/models/item_list_params.rb +0 -1
- data/lib/orb/models/item_update_params.rb +7 -7
- data/lib/orb/models/metric_create_params.rb +0 -1
- data/lib/orb/models/metric_list_params.rb +0 -1
- data/lib/orb/models/metric_update_params.rb +0 -1
- data/lib/orb/models/percentage_discount.rb +6 -8
- data/lib/orb/models/plan.rb +78 -103
- data/lib/orb/models/plan_create_params.rb +727 -800
- data/lib/orb/models/plan_list_params.rb +3 -4
- data/lib/orb/models/plan_update_params.rb +0 -2
- data/lib/orb/models/plans/external_plan_id_update_params.rb +0 -2
- data/lib/orb/models/price.rb +1671 -1724
- data/lib/orb/models/price_create_params.rb +75 -84
- data/lib/orb/models/price_evaluate_params.rb +0 -2
- data/lib/orb/models/price_evaluate_response.rb +3 -3
- data/lib/orb/models/price_list_params.rb +0 -1
- data/lib/orb/models/price_update_params.rb +0 -1
- data/lib/orb/models/prices/external_price_id_update_params.rb +0 -1
- data/lib/orb/models/subscription.rb +86 -122
- data/lib/orb/models/subscription_cancel_params.rb +3 -5
- data/lib/orb/models/subscription_cancel_response.rb +21 -57
- data/lib/orb/models/subscription_change_apply_response.rb +21 -58
- data/lib/orb/models/subscription_change_cancel_response.rb +21 -58
- data/lib/orb/models/subscription_change_retrieve_response.rb +21 -58
- data/lib/orb/models/subscription_create_params.rb +1865 -1815
- data/lib/orb/models/subscription_create_response.rb +21 -57
- data/lib/orb/models/subscription_fetch_costs_params.rb +3 -4
- data/lib/orb/models/subscription_fetch_costs_response.rb +3 -3
- data/lib/orb/models/subscription_fetch_schedule_params.rb +0 -1
- data/lib/orb/models/subscription_fetch_schedule_response.rb +0 -1
- data/lib/orb/models/subscription_fetch_usage_params.rb +6 -8
- data/lib/orb/models/subscription_list_params.rb +3 -4
- data/lib/orb/models/subscription_price_intervals_params.rb +1105 -1017
- data/lib/orb/models/subscription_price_intervals_response.rb +21 -57
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1906 -1791
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +21 -57
- data/lib/orb/models/subscription_trigger_phase_params.rb +0 -2
- data/lib/orb/models/subscription_trigger_phase_response.rb +21 -57
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +21 -57
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +21 -57
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +21 -57
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +3 -6
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +21 -57
- data/lib/orb/models/subscription_update_params.rb +0 -5
- data/lib/orb/models/subscription_update_trial_params.rb +4 -6
- data/lib/orb/models/subscription_update_trial_response.rb +21 -57
- data/lib/orb/models/subscription_usage.rb +46 -39
- data/lib/orb/models/subscriptions.rb +6 -6
- data/lib/orb/models/trial_discount.rb +6 -7
- data/lib/orb/models/usage_discount.rb +6 -8
- data/lib/orb/resources/alerts.rb +30 -31
- data/lib/orb/resources/coupons/subscriptions.rb +3 -4
- data/lib/orb/resources/coupons.rb +11 -21
- data/lib/orb/resources/credit_notes.rb +10 -11
- data/lib/orb/resources/customers/balance_transactions.rb +3 -4
- data/lib/orb/resources/customers/costs.rb +4 -6
- data/lib/orb/resources/customers/credits/ledger.rb +14 -33
- data/lib/orb/resources/customers/credits/top_ups.rb +10 -20
- data/lib/orb/resources/customers/credits.rb +2 -6
- data/lib/orb/resources/customers.rb +40 -67
- data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +2 -2
- data/lib/orb/resources/dimensional_price_groups.rb +8 -10
- data/lib/orb/resources/events/backfills.rb +2 -10
- data/lib/orb/resources/events/volume.rb +3 -6
- data/lib/orb/resources/events.rb +4 -12
- data/lib/orb/resources/invoice_line_items.rb +1 -2
- data/lib/orb/resources/invoices.rb +26 -43
- data/lib/orb/resources/items.rb +12 -13
- data/lib/orb/resources/metrics.rb +11 -14
- data/lib/orb/resources/plans/external_plan_id.rb +5 -7
- data/lib/orb/resources/plans.rb +14 -23
- data/lib/orb/resources/prices/external_price_id.rb +5 -6
- data/lib/orb/resources/prices.rb +25 -35
- data/lib/orb/resources/subscription_changes.rb +1 -1
- data/lib/orb/resources/subscriptions.rb +49 -107
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +1 -0
- data/rbi/orb/client.rbi +5 -4
- data/rbi/orb/errors.rbi +59 -28
- data/rbi/orb/file_part.rbi +9 -6
- data/rbi/orb/internal/page.rbi +19 -6
- data/rbi/orb/internal/transport/base_client.rbi +131 -73
- data/rbi/orb/internal/transport/pooled_net_requester.rbi +25 -12
- data/rbi/orb/internal/type/array_of.rbi +42 -34
- data/rbi/orb/internal/type/base_model.rbi +124 -65
- data/rbi/orb/internal/type/base_page.rbi +11 -7
- data/rbi/orb/internal/type/boolean.rbi +16 -10
- data/rbi/orb/internal/type/converter.rbi +66 -31
- data/rbi/orb/internal/type/enum.rbi +27 -15
- data/rbi/orb/internal/type/file_input.rbi +12 -10
- data/rbi/orb/internal/type/hash_of.rbi +34 -24
- data/rbi/orb/internal/type/request_parameters.rbi +12 -4
- data/rbi/orb/internal/type/union.rbi +60 -25
- data/rbi/orb/internal/type/unknown.rbi +20 -12
- data/rbi/orb/internal/util.rbi +210 -89
- data/rbi/orb/models/alert.rbi +107 -70
- data/rbi/orb/models/alert_create_for_customer_params.rbi +60 -27
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +68 -29
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +53 -26
- data/rbi/orb/models/alert_disable_params.rbi +17 -6
- data/rbi/orb/models/alert_enable_params.rbi +17 -6
- data/rbi/orb/models/alert_list_params.rbi +23 -20
- data/rbi/orb/models/alert_retrieve_params.rbi +10 -4
- data/rbi/orb/models/alert_update_params.rbi +25 -14
- data/rbi/orb/models/amount_discount.rbi +28 -19
- data/rbi/orb/models/billable_metric.rbi +33 -26
- data/rbi/orb/models/billing_cycle_relative_date.rbi +11 -5
- data/rbi/orb/models/coupon.rbi +28 -20
- data/rbi/orb/models/coupon_archive_params.rbi +10 -4
- data/rbi/orb/models/coupon_create_params.rbi +72 -38
- data/rbi/orb/models/coupon_fetch_params.rbi +10 -4
- data/rbi/orb/models/coupon_list_params.rbi +18 -15
- data/rbi/orb/models/coupons/subscription_list_params.rbi +16 -6
- data/rbi/orb/models/credit_note.rbi +293 -158
- data/rbi/orb/models/credit_note_create_params.rbi +58 -29
- data/rbi/orb/models/credit_note_fetch_params.rbi +10 -4
- data/rbi/orb/models/credit_note_list_params.rbi +20 -17
- data/rbi/orb/models/customer.rbi +430 -329
- data/rbi/orb/models/customer_create_params.rbi +662 -325
- data/rbi/orb/models/customer_delete_params.rbi +10 -4
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +10 -4
- data/rbi/orb/models/customer_fetch_params.rbi +10 -4
- data/rbi/orb/models/customer_list_params.rbi +20 -17
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +10 -4
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +10 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +1136 -336
- data/rbi/orb/models/customer_update_params.rbi +661 -324
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +50 -21
- data/rbi/orb/models/customers/balance_transaction_create_response.rbi +154 -61
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +20 -17
- data/rbi/orb/models/customers/balance_transaction_list_response.rbi +164 -59
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +56 -22
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +162 -124
- data/rbi/orb/models/customers/cost_list_params.rbi +45 -22
- data/rbi/orb/models/customers/cost_list_response.rbi +154 -123
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +18 -15
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +48 -22
- data/rbi/orb/models/customers/credit_list_params.rbi +18 -15
- data/rbi/orb/models/customers/credit_list_response.rbi +44 -21
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +106 -68
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +643 -434
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +117 -59
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +700 -425
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +102 -44
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +681 -432
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +123 -40
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +735 -389
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +74 -53
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +65 -48
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +84 -45
- data/rbi/orb/models/customers/credits/top_up_create_response.rbi +83 -43
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +16 -6
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +15 -5
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +9 -5
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +70 -49
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +9 -5
- data/rbi/orb/models/customers/credits/top_up_list_response.rbi +84 -43
- data/rbi/orb/models/dimensional_price_group.rbi +18 -15
- data/rbi/orb/models/dimensional_price_group_create_params.rbi +19 -16
- data/rbi/orb/models/dimensional_price_group_list_params.rbi +16 -6
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +10 -4
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +10 -9
- data/rbi/orb/models/dimensional_price_groups.rbi +18 -13
- data/rbi/orb/models/discount.rbi +11 -5
- data/rbi/orb/models/evaluate_price_group.rbi +28 -12
- data/rbi/orb/models/event_deprecate_params.rbi +10 -4
- data/rbi/orb/models/event_deprecate_response.rbi +8 -3
- data/rbi/orb/models/event_ingest_params.rbi +37 -31
- data/rbi/orb/models/event_ingest_response.rbi +63 -23
- data/rbi/orb/models/event_search_params.rbi +17 -14
- data/rbi/orb/models/event_search_response.rbi +33 -21
- data/rbi/orb/models/event_update_params.rbi +19 -16
- data/rbi/orb/models/event_update_response.rbi +8 -3
- data/rbi/orb/models/events/backfill_close_params.rbi +10 -9
- data/rbi/orb/models/events/backfill_close_response.rbi +64 -29
- data/rbi/orb/models/events/backfill_create_params.rbi +21 -18
- data/rbi/orb/models/events/backfill_create_response.rbi +63 -29
- data/rbi/orb/models/events/backfill_fetch_params.rbi +10 -9
- data/rbi/orb/models/events/backfill_fetch_response.rbi +64 -29
- data/rbi/orb/models/events/backfill_list_params.rbi +16 -6
- data/rbi/orb/models/events/backfill_list_response.rbi +62 -28
- data/rbi/orb/models/events/backfill_revert_params.rbi +10 -9
- data/rbi/orb/models/events/backfill_revert_response.rbi +63 -29
- data/rbi/orb/models/events/event_volumes.rbi +32 -10
- data/rbi/orb/models/events/volume_list_params.rbi +18 -15
- data/rbi/orb/models/invoice.rbi +1286 -805
- data/rbi/orb/models/invoice_create_params.rbi +97 -69
- data/rbi/orb/models/invoice_fetch_params.rbi +10 -4
- data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +15 -5
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +1991 -861
- data/rbi/orb/models/invoice_issue_params.rbi +16 -5
- data/rbi/orb/models/invoice_level_discount.rbi +11 -4
- data/rbi/orb/models/invoice_line_item_create_params.rbi +20 -17
- data/rbi/orb/models/invoice_line_item_create_response.rbi +573 -376
- data/rbi/orb/models/invoice_list_params.rbi +67 -47
- data/rbi/orb/models/invoice_mark_paid_params.rbi +17 -14
- data/rbi/orb/models/invoice_pay_params.rbi +10 -4
- data/rbi/orb/models/invoice_update_params.rbi +15 -10
- data/rbi/orb/models/invoice_void_params.rbi +10 -4
- data/rbi/orb/models/item.rbi +87 -39
- data/rbi/orb/models/item_create_params.rbi +14 -5
- data/rbi/orb/models/item_fetch_params.rbi +10 -4
- data/rbi/orb/models/item_list_params.rbi +16 -6
- data/rbi/orb/models/item_update_params.rbi +79 -39
- data/rbi/orb/models/metric_create_params.rbi +19 -16
- data/rbi/orb/models/metric_fetch_params.rbi +10 -4
- data/rbi/orb/models/metric_list_params.rbi +20 -17
- data/rbi/orb/models/metric_update_params.rbi +15 -10
- data/rbi/orb/models/pagination_metadata.rbi +16 -4
- data/rbi/orb/models/percentage_discount.rbi +32 -19
- data/rbi/orb/models/plan.rbi +496 -365
- data/rbi/orb/models/plan_create_params.rbi +4785 -2875
- data/rbi/orb/models/plan_fetch_params.rbi +10 -4
- data/rbi/orb/models/plan_list_params.rbi +34 -27
- data/rbi/orb/models/plan_update_params.rbi +16 -13
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +10 -9
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +16 -13
- data/rbi/orb/models/price.rbi +9969 -5024
- data/rbi/orb/models/price_create_params.rbi +501 -245
- data/rbi/orb/models/price_evaluate_params.rbi +20 -17
- data/rbi/orb/models/price_evaluate_response.rbi +11 -6
- data/rbi/orb/models/price_fetch_params.rbi +10 -4
- data/rbi/orb/models/price_list_params.rbi +16 -6
- data/rbi/orb/models/price_update_params.rbi +15 -10
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +10 -9
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +15 -10
- data/rbi/orb/models/subscription.rbi +578 -420
- data/rbi/orb/models/subscription_cancel_params.rbi +44 -22
- data/rbi/orb/models/subscription_cancel_response.rbi +700 -438
- data/rbi/orb/models/subscription_change_apply_params.rbi +16 -13
- data/rbi/orb/models/subscription_change_apply_response.rbi +784 -504
- data/rbi/orb/models/subscription_change_cancel_params.rbi +10 -4
- data/rbi/orb/models/subscription_change_cancel_response.rbi +783 -514
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +10 -4
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +782 -524
- data/rbi/orb/models/subscription_create_params.rbi +9021 -6730
- data/rbi/orb/models/subscription_create_response.rbi +700 -438
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +47 -22
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +154 -123
- data/rbi/orb/models/subscription_fetch_params.rbi +10 -4
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +20 -17
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +33 -19
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +81 -34
- data/rbi/orb/models/subscription_list_params.rbi +39 -28
- data/rbi/orb/models/subscription_price_intervals_params.rbi +5181 -3822
- data/rbi/orb/models/subscription_price_intervals_response.rbi +720 -453
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +8602 -6910
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +718 -467
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +16 -13
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +712 -448
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +10 -4
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +719 -467
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +16 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +693 -502
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +10 -4
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +708 -497
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +57 -26
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +719 -467
- data/rbi/orb/models/subscription_update_params.rbi +19 -16
- data/rbi/orb/models/subscription_update_trial_params.rbi +57 -19
- data/rbi/orb/models/subscription_update_trial_response.rbi +712 -447
- data/rbi/orb/models/subscription_usage.rbi +271 -121
- data/rbi/orb/models/subscriptions.rbi +18 -11
- data/rbi/orb/models/top_level_ping_params.rbi +10 -4
- data/rbi/orb/models/top_level_ping_response.rbi +7 -3
- data/rbi/orb/models/trial_discount.rbi +29 -20
- data/rbi/orb/models/usage_discount.rbi +28 -19
- data/rbi/orb/models.rbi +22 -11
- data/rbi/orb/request_options.rbi +12 -6
- data/rbi/orb/resources/alerts.rbi +61 -40
- data/rbi/orb/resources/coupons/subscriptions.rbi +7 -5
- data/rbi/orb/resources/coupons.rbi +33 -18
- data/rbi/orb/resources/credit_notes.rbi +22 -13
- data/rbi/orb/resources/customers/balance_transactions.rbi +17 -9
- data/rbi/orb/resources/customers/costs.rbi +18 -11
- data/rbi/orb/resources/customers/credits/ledger.rbi +98 -74
- data/rbi/orb/resources/customers/credits/top_ups.rbi +61 -25
- data/rbi/orb/resources/customers/credits.rbi +16 -7
- data/rbi/orb/resources/customers.rbi +137 -72
- data/rbi/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +8 -4
- data/rbi/orb/resources/dimensional_price_groups.rbi +26 -12
- data/rbi/orb/resources/events/backfills.rbi +35 -17
- data/rbi/orb/resources/events/volume.rbi +7 -5
- data/rbi/orb/resources/events.rbi +26 -16
- data/rbi/orb/resources/invoice_line_items.rbi +7 -5
- data/rbi/orb/resources/invoices.rbi +72 -41
- data/rbi/orb/resources/items.rbi +40 -13
- data/rbi/orb/resources/metrics.rbi +25 -15
- data/rbi/orb/resources/plans/external_plan_id.rbi +15 -7
- data/rbi/orb/resources/plans.rbi +57 -47
- data/rbi/orb/resources/prices/external_price_id.rbi +73 -68
- data/rbi/orb/resources/prices.rbi +176 -156
- data/rbi/orb/resources/subscription_changes.rbi +19 -11
- data/rbi/orb/resources/subscriptions.rbi +200 -114
- data/rbi/orb/resources/top_level.rbi +9 -3
- data/sig/orb/internal/page.rbs +0 -2
- data/sig/orb/internal/type/request_parameters.rbs +3 -1
- data/sig/orb/models/alert.rbs +19 -31
- data/sig/orb/models/alert_create_for_customer_params.rbs +3 -7
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +3 -7
- data/sig/orb/models/alert_create_for_subscription_params.rbs +3 -7
- data/sig/orb/models/alert_disable_params.rbs +0 -2
- data/sig/orb/models/alert_enable_params.rbs +0 -2
- data/sig/orb/models/alert_list_params.rbs +0 -2
- data/sig/orb/models/alert_retrieve_params.rbs +0 -2
- data/sig/orb/models/alert_update_params.rbs +3 -7
- data/sig/orb/models/amount_discount.rbs +4 -6
- data/sig/orb/models/billable_metric.rbs +7 -9
- data/sig/orb/models/coupon.rbs +5 -8
- data/sig/orb/models/coupon_archive_params.rbs +0 -2
- data/sig/orb/models/coupon_create_params.rbs +3 -9
- data/sig/orb/models/coupon_fetch_params.rbs +0 -2
- data/sig/orb/models/coupon_list_params.rbs +0 -2
- data/sig/orb/models/coupons/subscription_list_params.rbs +0 -2
- data/sig/orb/models/credit_note.rbs +48 -66
- data/sig/orb/models/credit_note_create_params.rbs +3 -7
- data/sig/orb/models/credit_note_fetch_params.rbs +0 -2
- data/sig/orb/models/credit_note_list_params.rbs +0 -2
- data/sig/orb/models/customer.rbs +43 -63
- data/sig/orb/models/customer_create_params.rbs +32 -52
- data/sig/orb/models/customer_delete_params.rbs +0 -2
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customer_fetch_params.rbs +0 -2
- data/sig/orb/models/customer_list_params.rbs +0 -2
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +0 -2
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +0 -2
- data/sig/orb/models/customer_update_by_external_id_params.rbs +32 -52
- data/sig/orb/models/customer_update_params.rbs +32 -52
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +0 -2
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +0 -6
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +0 -2
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +0 -6
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +0 -6
- data/sig/orb/models/customers/cost_list_params.rbs +0 -2
- data/sig/orb/models/customers/cost_list_response.rbs +0 -6
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +0 -2
- data/sig/orb/models/customers/credit_list_params.rbs +0 -2
- data/sig/orb/models/customers/credit_list_response.rbs +0 -2
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +3 -7
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +1 -43
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +3 -7
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +1 -43
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +1 -43
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +0 -2
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +1 -43
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +3 -7
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +0 -4
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +3 -7
- data/sig/orb/models/customers/credits/top_up_create_response.rbs +0 -4
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +0 -4
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +0 -2
- data/sig/orb/models/customers/credits/top_up_list_response.rbs +0 -4
- data/sig/orb/models/dimensional_price_group.rbs +0 -2
- data/sig/orb/models/dimensional_price_group_create_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_group_list_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +0 -2
- data/sig/orb/models/dimensional_price_groups.rbs +6 -8
- data/sig/orb/models/discount.rbs +5 -5
- data/sig/orb/models/evaluate_price_group.rbs +4 -6
- data/sig/orb/models/event_deprecate_params.rbs +0 -2
- data/sig/orb/models/event_deprecate_response.rbs +0 -2
- data/sig/orb/models/event_ingest_params.rbs +3 -7
- data/sig/orb/models/event_ingest_response.rbs +0 -6
- data/sig/orb/models/event_search_params.rbs +0 -2
- data/sig/orb/models/event_search_response.rbs +0 -4
- data/sig/orb/models/event_update_params.rbs +0 -2
- data/sig/orb/models/event_update_response.rbs +0 -2
- data/sig/orb/models/events/backfill_close_params.rbs +0 -2
- data/sig/orb/models/events/backfill_close_response.rbs +0 -2
- data/sig/orb/models/events/backfill_create_params.rbs +0 -2
- data/sig/orb/models/events/backfill_create_response.rbs +0 -2
- data/sig/orb/models/events/backfill_fetch_params.rbs +0 -2
- data/sig/orb/models/events/backfill_fetch_response.rbs +0 -2
- data/sig/orb/models/events/backfill_list_params.rbs +0 -2
- data/sig/orb/models/events/backfill_list_response.rbs +0 -2
- data/sig/orb/models/events/backfill_revert_params.rbs +0 -2
- data/sig/orb/models/events/backfill_revert_response.rbs +0 -2
- data/sig/orb/models/events/event_volumes.rbs +3 -10
- data/sig/orb/models/events/volume_list_params.rbs +0 -2
- data/sig/orb/models/invoice.rbs +110 -172
- data/sig/orb/models/invoice_create_params.rbs +10 -16
- data/sig/orb/models/invoice_fetch_params.rbs +0 -2
- data/sig/orb/models/invoice_fetch_upcoming_params.rbs +0 -2
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +2 -64
- data/sig/orb/models/invoice_issue_params.rbs +0 -2
- data/sig/orb/models/invoice_level_discount.rbs +2 -4
- data/sig/orb/models/invoice_line_item_create_params.rbs +0 -2
- data/sig/orb/models/invoice_line_item_create_response.rbs +2 -36
- data/sig/orb/models/invoice_list_params.rbs +4 -6
- data/sig/orb/models/invoice_mark_paid_params.rbs +0 -2
- data/sig/orb/models/invoice_pay_params.rbs +0 -2
- data/sig/orb/models/invoice_update_params.rbs +0 -2
- data/sig/orb/models/invoice_void_params.rbs +0 -2
- data/sig/orb/models/item.rbs +7 -11
- data/sig/orb/models/item_create_params.rbs +0 -2
- data/sig/orb/models/item_fetch_params.rbs +0 -2
- data/sig/orb/models/item_list_params.rbs +0 -2
- data/sig/orb/models/item_update_params.rbs +7 -11
- data/sig/orb/models/metric_create_params.rbs +0 -2
- data/sig/orb/models/metric_fetch_params.rbs +0 -2
- data/sig/orb/models/metric_list_params.rbs +0 -2
- data/sig/orb/models/metric_update_params.rbs +0 -2
- data/sig/orb/models/pagination_metadata.rbs +0 -2
- data/sig/orb/models/percentage_discount.rbs +4 -6
- data/sig/orb/models/plan.rbs +45 -73
- data/sig/orb/models/plan_create_params.rbs +518 -696
- data/sig/orb/models/plan_fetch_params.rbs +0 -2
- data/sig/orb/models/plan_list_params.rbs +0 -2
- data/sig/orb/models/plan_update_params.rbs +0 -2
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +0 -2
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +0 -2
- data/sig/orb/models/price.rbs +1194 -1730
- data/sig/orb/models/price_create_params.rbs +59 -97
- data/sig/orb/models/price_evaluate_params.rbs +0 -2
- data/sig/orb/models/price_evaluate_response.rbs +3 -6
- data/sig/orb/models/price_fetch_params.rbs +0 -2
- data/sig/orb/models/price_list_params.rbs +0 -2
- data/sig/orb/models/price_update_params.rbs +0 -2
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +0 -2
- data/sig/orb/models/prices/external_price_id_update_params.rbs +0 -2
- data/sig/orb/models/subscription.rbs +56 -94
- data/sig/orb/models/subscription_cancel_params.rbs +0 -2
- data/sig/orb/models/subscription_cancel_response.rbs +20 -60
- data/sig/orb/models/subscription_change_apply_params.rbs +0 -2
- data/sig/orb/models/subscription_change_apply_response.rbs +20 -62
- data/sig/orb/models/subscription_change_cancel_params.rbs +0 -2
- data/sig/orb/models/subscription_change_cancel_response.rbs +20 -62
- data/sig/orb/models/subscription_change_retrieve_params.rbs +0 -2
- data/sig/orb/models/subscription_change_retrieve_response.rbs +20 -62
- data/sig/orb/models/subscription_create_params.rbs +1103 -1499
- data/sig/orb/models/subscription_create_response.rbs +20 -60
- data/sig/orb/models/subscription_fetch_costs_params.rbs +0 -2
- data/sig/orb/models/subscription_fetch_costs_response.rbs +0 -6
- data/sig/orb/models/subscription_fetch_params.rbs +0 -2
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +0 -2
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +0 -4
- data/sig/orb/models/subscription_fetch_usage_params.rbs +0 -2
- data/sig/orb/models/subscription_list_params.rbs +0 -2
- data/sig/orb/models/subscription_price_intervals_params.rbs +666 -896
- data/sig/orb/models/subscription_price_intervals_response.rbs +20 -60
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1103 -1499
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +20 -60
- data/sig/orb/models/subscription_trigger_phase_params.rbs +0 -2
- data/sig/orb/models/subscription_trigger_phase_response.rbs +20 -60
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +0 -2
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +20 -60
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +0 -2
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +20 -60
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +0 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +20 -60
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +0 -2
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +20 -60
- data/sig/orb/models/subscription_update_params.rbs +0 -2
- data/sig/orb/models/subscription_update_trial_params.rbs +1 -3
- data/sig/orb/models/subscription_update_trial_response.rbs +20 -60
- data/sig/orb/models/subscription_usage.rbs +35 -53
- data/sig/orb/models/subscriptions.rbs +6 -8
- data/sig/orb/models/top_level_ping_params.rbs +0 -2
- data/sig/orb/models/top_level_ping_response.rbs +0 -2
- data/sig/orb/models/trial_discount.rbs +4 -6
- data/sig/orb/models/usage_discount.rbs +4 -6
- data/sig/orb/request_options.rbs +1 -1
- data/sig/orb/resources/alerts.rbs +12 -12
- data/sig/orb/resources/coupons/subscriptions.rbs +1 -1
- data/sig/orb/resources/coupons.rbs +4 -4
- data/sig/orb/resources/credit_notes.rbs +4 -4
- data/sig/orb/resources/customers/credits/ledger.rbs +2 -2
- data/sig/orb/resources/customers/credits/top_ups.rbs +2 -2
- data/sig/orb/resources/customers.rbs +24 -24
- data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +1 -1
- data/sig/orb/resources/dimensional_price_groups.rbs +3 -3
- data/sig/orb/resources/events/volume.rbs +1 -1
- data/sig/orb/resources/events.rbs +1 -1
- data/sig/orb/resources/invoices.rbs +10 -10
- data/sig/orb/resources/items.rbs +5 -5
- data/sig/orb/resources/metrics.rbs +4 -4
- data/sig/orb/resources/plans/external_plan_id.rbs +2 -2
- data/sig/orb/resources/plans.rbs +5 -5
- data/sig/orb/resources/prices.rbs +11 -11
- data/sig/orb/resources/subscriptions.rbs +21 -21
- metadata +2 -2
@@ -6,12 +6,16 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
10
|
+
|
9
11
|
# The thresholds that define the values at which the alert will be triggered.
|
10
|
-
sig
|
12
|
+
sig do
|
13
|
+
returns(T::Array[Orb::AlertCreateForSubscriptionParams::Threshold])
|
14
|
+
end
|
11
15
|
attr_accessor :thresholds
|
12
16
|
|
13
17
|
# The type of alert to create. This must be a valid alert type.
|
14
|
-
sig { returns(Orb::
|
18
|
+
sig { returns(Orb::AlertCreateForSubscriptionParams::Type::OrSymbol) }
|
15
19
|
attr_accessor :type
|
16
20
|
|
17
21
|
# The metric to track usage for.
|
@@ -20,12 +24,12 @@ module Orb
|
|
20
24
|
|
21
25
|
sig do
|
22
26
|
params(
|
23
|
-
thresholds:
|
24
|
-
|
27
|
+
thresholds:
|
28
|
+
T::Array[Orb::AlertCreateForSubscriptionParams::Threshold::OrHash],
|
29
|
+
type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol,
|
25
30
|
metric_id: T.nilable(String),
|
26
|
-
request_options:
|
27
|
-
)
|
28
|
-
.returns(T.attached_class)
|
31
|
+
request_options: Orb::RequestOptions::OrHash
|
32
|
+
).returns(T.attached_class)
|
29
33
|
end
|
30
34
|
def self.new(
|
31
35
|
# The thresholds that define the values at which the alert will be triggered.
|
@@ -35,21 +39,26 @@ module Orb
|
|
35
39
|
# The metric to track usage for.
|
36
40
|
metric_id: nil,
|
37
41
|
request_options: {}
|
38
|
-
)
|
42
|
+
)
|
43
|
+
end
|
44
|
+
|
39
45
|
sig do
|
40
|
-
override
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
override.returns(
|
47
|
+
{
|
48
|
+
thresholds:
|
49
|
+
T::Array[Orb::AlertCreateForSubscriptionParams::Threshold],
|
50
|
+
type: Orb::AlertCreateForSubscriptionParams::Type::OrSymbol,
|
51
|
+
metric_id: T.nilable(String),
|
52
|
+
request_options: Orb::RequestOptions
|
53
|
+
}
|
54
|
+
)
|
55
|
+
end
|
56
|
+
def to_hash
|
49
57
|
end
|
50
|
-
def to_hash; end
|
51
58
|
|
52
59
|
class Threshold < Orb::Internal::Type::BaseModel
|
60
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
61
|
+
|
53
62
|
# The value at which an alert will fire. For credit balance alerts, the alert will
|
54
63
|
# fire at or below this value. For usage and cost alerts, the alert will fire at
|
55
64
|
# or above this value.
|
@@ -64,24 +73,42 @@ module Orb
|
|
64
73
|
# fire at or below this value. For usage and cost alerts, the alert will fire at
|
65
74
|
# or above this value.
|
66
75
|
value:
|
67
|
-
)
|
68
|
-
|
69
|
-
|
76
|
+
)
|
77
|
+
end
|
78
|
+
|
79
|
+
sig { override.returns({ value: Float }) }
|
80
|
+
def to_hash
|
81
|
+
end
|
70
82
|
end
|
71
83
|
|
72
84
|
# The type of alert to create. This must be a valid alert type.
|
73
85
|
module Type
|
74
86
|
extend Orb::Internal::Type::Enum
|
75
87
|
|
76
|
-
TaggedSymbol =
|
88
|
+
TaggedSymbol =
|
89
|
+
T.type_alias do
|
90
|
+
T.all(Symbol, Orb::AlertCreateForSubscriptionParams::Type)
|
91
|
+
end
|
77
92
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
78
93
|
|
79
94
|
USAGE_EXCEEDED =
|
80
|
-
T.let(
|
81
|
-
|
95
|
+
T.let(
|
96
|
+
:usage_exceeded,
|
97
|
+
Orb::AlertCreateForSubscriptionParams::Type::TaggedSymbol
|
98
|
+
)
|
99
|
+
COST_EXCEEDED =
|
100
|
+
T.let(
|
101
|
+
:cost_exceeded,
|
102
|
+
Orb::AlertCreateForSubscriptionParams::Type::TaggedSymbol
|
103
|
+
)
|
82
104
|
|
83
|
-
sig
|
84
|
-
|
105
|
+
sig do
|
106
|
+
override.returns(
|
107
|
+
T::Array[Orb::AlertCreateForSubscriptionParams::Type::TaggedSymbol]
|
108
|
+
)
|
109
|
+
end
|
110
|
+
def self.values
|
111
|
+
end
|
85
112
|
end
|
86
113
|
end
|
87
114
|
end
|
@@ -6,6 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
10
|
+
|
9
11
|
# Used to update the status of a plan alert scoped to this subscription_id
|
10
12
|
sig { returns(T.nilable(String)) }
|
11
13
|
attr_accessor :subscription_id
|
@@ -13,17 +15,26 @@ module Orb
|
|
13
15
|
sig do
|
14
16
|
params(
|
15
17
|
subscription_id: T.nilable(String),
|
16
|
-
request_options:
|
17
|
-
)
|
18
|
-
.returns(T.attached_class)
|
18
|
+
request_options: Orb::RequestOptions::OrHash
|
19
|
+
).returns(T.attached_class)
|
19
20
|
end
|
20
21
|
def self.new(
|
21
22
|
# Used to update the status of a plan alert scoped to this subscription_id
|
22
23
|
subscription_id: nil,
|
23
24
|
request_options: {}
|
24
|
-
)
|
25
|
-
|
26
|
-
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
sig do
|
29
|
+
override.returns(
|
30
|
+
{
|
31
|
+
subscription_id: T.nilable(String),
|
32
|
+
request_options: Orb::RequestOptions
|
33
|
+
}
|
34
|
+
)
|
35
|
+
end
|
36
|
+
def to_hash
|
37
|
+
end
|
27
38
|
end
|
28
39
|
end
|
29
40
|
end
|
@@ -6,6 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
10
|
+
|
9
11
|
# Used to update the status of a plan alert scoped to this subscription_id
|
10
12
|
sig { returns(T.nilable(String)) }
|
11
13
|
attr_accessor :subscription_id
|
@@ -13,17 +15,26 @@ module Orb
|
|
13
15
|
sig do
|
14
16
|
params(
|
15
17
|
subscription_id: T.nilable(String),
|
16
|
-
request_options:
|
17
|
-
)
|
18
|
-
.returns(T.attached_class)
|
18
|
+
request_options: Orb::RequestOptions::OrHash
|
19
|
+
).returns(T.attached_class)
|
19
20
|
end
|
20
21
|
def self.new(
|
21
22
|
# Used to update the status of a plan alert scoped to this subscription_id
|
22
23
|
subscription_id: nil,
|
23
24
|
request_options: {}
|
24
|
-
)
|
25
|
-
|
26
|
-
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
28
|
+
sig do
|
29
|
+
override.returns(
|
30
|
+
{
|
31
|
+
subscription_id: T.nilable(String),
|
32
|
+
request_options: Orb::RequestOptions
|
33
|
+
}
|
34
|
+
)
|
35
|
+
end
|
36
|
+
def to_hash
|
37
|
+
end
|
27
38
|
end
|
28
39
|
end
|
29
40
|
end
|
@@ -6,6 +6,8 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
10
|
+
|
9
11
|
sig { returns(T.nilable(Time)) }
|
10
12
|
attr_accessor :created_at_gt
|
11
13
|
|
@@ -53,9 +55,8 @@ module Orb
|
|
53
55
|
external_customer_id: T.nilable(String),
|
54
56
|
limit: Integer,
|
55
57
|
subscription_id: T.nilable(String),
|
56
|
-
request_options:
|
57
|
-
)
|
58
|
-
.returns(T.attached_class)
|
58
|
+
request_options: Orb::RequestOptions::OrHash
|
59
|
+
).returns(T.attached_class)
|
59
60
|
end
|
60
61
|
def self.new(
|
61
62
|
created_at_gt: nil,
|
@@ -74,25 +75,27 @@ module Orb
|
|
74
75
|
# Fetch alerts scoped to this subscription_id
|
75
76
|
subscription_id: nil,
|
76
77
|
request_options: {}
|
77
|
-
)
|
78
|
+
)
|
79
|
+
end
|
80
|
+
|
78
81
|
sig do
|
79
|
-
override
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
82
|
+
override.returns(
|
83
|
+
{
|
84
|
+
created_at_gt: T.nilable(Time),
|
85
|
+
created_at_gte: T.nilable(Time),
|
86
|
+
created_at_lt: T.nilable(Time),
|
87
|
+
created_at_lte: T.nilable(Time),
|
88
|
+
cursor: T.nilable(String),
|
89
|
+
customer_id: T.nilable(String),
|
90
|
+
external_customer_id: T.nilable(String),
|
91
|
+
limit: Integer,
|
92
|
+
subscription_id: T.nilable(String),
|
93
|
+
request_options: Orb::RequestOptions
|
94
|
+
}
|
95
|
+
)
|
96
|
+
end
|
97
|
+
def to_hash
|
94
98
|
end
|
95
|
-
def to_hash; end
|
96
99
|
end
|
97
100
|
end
|
98
101
|
end
|
@@ -6,13 +6,19 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
10
|
+
|
9
11
|
sig do
|
10
|
-
params(request_options:
|
12
|
+
params(request_options: Orb::RequestOptions::OrHash).returns(
|
13
|
+
T.attached_class
|
14
|
+
)
|
15
|
+
end
|
16
|
+
def self.new(request_options: {})
|
11
17
|
end
|
12
|
-
def self.new(request_options: {}); end
|
13
18
|
|
14
|
-
sig { override.returns({request_options: Orb::RequestOptions}) }
|
15
|
-
def to_hash
|
19
|
+
sig { override.returns({ request_options: Orb::RequestOptions }) }
|
20
|
+
def to_hash
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
@@ -6,31 +6,39 @@ module Orb
|
|
6
6
|
extend Orb::Internal::Type::RequestParameters::Converter
|
7
7
|
include Orb::Internal::Type::RequestParameters
|
8
8
|
|
9
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
10
|
+
|
9
11
|
# The thresholds that define the values at which the alert will be triggered.
|
10
|
-
sig { returns(T::Array[Orb::
|
12
|
+
sig { returns(T::Array[Orb::AlertUpdateParams::Threshold]) }
|
11
13
|
attr_accessor :thresholds
|
12
14
|
|
13
15
|
sig do
|
14
16
|
params(
|
15
|
-
thresholds: T::Array[
|
16
|
-
request_options:
|
17
|
-
)
|
18
|
-
.returns(T.attached_class)
|
17
|
+
thresholds: T::Array[Orb::AlertUpdateParams::Threshold::OrHash],
|
18
|
+
request_options: Orb::RequestOptions::OrHash
|
19
|
+
).returns(T.attached_class)
|
19
20
|
end
|
20
21
|
def self.new(
|
21
22
|
# The thresholds that define the values at which the alert will be triggered.
|
22
23
|
thresholds:,
|
23
24
|
request_options: {}
|
24
|
-
)
|
25
|
+
)
|
26
|
+
end
|
27
|
+
|
25
28
|
sig do
|
26
|
-
override
|
27
|
-
|
28
|
-
|
29
|
-
|
29
|
+
override.returns(
|
30
|
+
{
|
31
|
+
thresholds: T::Array[Orb::AlertUpdateParams::Threshold],
|
32
|
+
request_options: Orb::RequestOptions
|
33
|
+
}
|
34
|
+
)
|
35
|
+
end
|
36
|
+
def to_hash
|
30
37
|
end
|
31
|
-
def to_hash; end
|
32
38
|
|
33
39
|
class Threshold < Orb::Internal::Type::BaseModel
|
40
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
41
|
+
|
34
42
|
# The value at which an alert will fire. For credit balance alerts, the alert will
|
35
43
|
# fire at or below this value. For usage and cost alerts, the alert will fire at
|
36
44
|
# or above this value.
|
@@ -45,9 +53,12 @@ module Orb
|
|
45
53
|
# fire at or below this value. For usage and cost alerts, the alert will fire at
|
46
54
|
# or above this value.
|
47
55
|
value:
|
48
|
-
)
|
49
|
-
|
50
|
-
|
56
|
+
)
|
57
|
+
end
|
58
|
+
|
59
|
+
sig { override.returns({ value: Float }) }
|
60
|
+
def to_hash
|
61
|
+
end
|
51
62
|
end
|
52
63
|
end
|
53
64
|
end
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
6
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
7
|
+
|
6
8
|
# Only available if discount_type is `amount`.
|
7
9
|
sig { returns(String) }
|
8
10
|
attr_accessor :amount_discount
|
@@ -12,7 +14,7 @@ module Orb
|
|
12
14
|
sig { returns(T::Array[String]) }
|
13
15
|
attr_accessor :applies_to_price_ids
|
14
16
|
|
15
|
-
sig { returns(Orb::
|
17
|
+
sig { returns(Orb::AmountDiscount::DiscountType::OrSymbol) }
|
16
18
|
attr_accessor :discount_type
|
17
19
|
|
18
20
|
sig { returns(T.nilable(String)) }
|
@@ -22,10 +24,9 @@ module Orb
|
|
22
24
|
params(
|
23
25
|
amount_discount: String,
|
24
26
|
applies_to_price_ids: T::Array[String],
|
25
|
-
discount_type: Orb::
|
27
|
+
discount_type: Orb::AmountDiscount::DiscountType::OrSymbol,
|
26
28
|
reason: T.nilable(String)
|
27
|
-
)
|
28
|
-
.returns(T.attached_class)
|
29
|
+
).returns(T.attached_class)
|
29
30
|
end
|
30
31
|
def self.new(
|
31
32
|
# Only available if discount_type is `amount`.
|
@@ -35,30 +36,38 @@ module Orb
|
|
35
36
|
applies_to_price_ids:,
|
36
37
|
discount_type:,
|
37
38
|
reason: nil
|
38
|
-
)
|
39
|
+
)
|
40
|
+
end
|
41
|
+
|
39
42
|
sig do
|
40
|
-
override
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
43
|
+
override.returns(
|
44
|
+
{
|
45
|
+
amount_discount: String,
|
46
|
+
applies_to_price_ids: T::Array[String],
|
47
|
+
discount_type: Orb::AmountDiscount::DiscountType::OrSymbol,
|
48
|
+
reason: T.nilable(String)
|
49
|
+
}
|
50
|
+
)
|
51
|
+
end
|
52
|
+
def to_hash
|
49
53
|
end
|
50
|
-
def to_hash; end
|
51
54
|
|
52
55
|
module DiscountType
|
53
56
|
extend Orb::Internal::Type::Enum
|
54
57
|
|
55
|
-
TaggedSymbol =
|
58
|
+
TaggedSymbol =
|
59
|
+
T.type_alias { T.all(Symbol, Orb::AmountDiscount::DiscountType) }
|
56
60
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
57
61
|
|
58
|
-
AMOUNT = T.let(:amount, Orb::
|
62
|
+
AMOUNT = T.let(:amount, Orb::AmountDiscount::DiscountType::TaggedSymbol)
|
59
63
|
|
60
|
-
sig
|
61
|
-
|
64
|
+
sig do
|
65
|
+
override.returns(
|
66
|
+
T::Array[Orb::AmountDiscount::DiscountType::TaggedSymbol]
|
67
|
+
)
|
68
|
+
end
|
69
|
+
def self.values
|
70
|
+
end
|
62
71
|
end
|
63
72
|
end
|
64
73
|
end
|
@@ -3,6 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class BillableMetric < Orb::Internal::Type::BaseModel
|
6
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
7
|
+
|
6
8
|
sig { returns(String) }
|
7
9
|
attr_accessor :id
|
8
10
|
|
@@ -12,10 +14,10 @@ module Orb
|
|
12
14
|
# The Item resource represents a sellable product or good. Items are associated
|
13
15
|
# with all line items, billable metrics, and prices and are used for defining
|
14
16
|
# external sync behavior for invoices and tax calculation purposes.
|
15
|
-
sig { returns(Orb::
|
17
|
+
sig { returns(Orb::Item) }
|
16
18
|
attr_reader :item
|
17
19
|
|
18
|
-
sig { params(item:
|
20
|
+
sig { params(item: Orb::Item::OrHash).void }
|
19
21
|
attr_writer :item
|
20
22
|
|
21
23
|
# User specified key-value pairs for the resource. If not present, this defaults
|
@@ -28,7 +30,7 @@ module Orb
|
|
28
30
|
sig { returns(String) }
|
29
31
|
attr_accessor :name
|
30
32
|
|
31
|
-
sig { returns(Orb::
|
33
|
+
sig { returns(Orb::BillableMetric::Status::TaggedSymbol) }
|
32
34
|
attr_accessor :status
|
33
35
|
|
34
36
|
# The Metric resource represents a calculation of a quantity based on events.
|
@@ -38,12 +40,11 @@ module Orb
|
|
38
40
|
params(
|
39
41
|
id: String,
|
40
42
|
description: T.nilable(String),
|
41
|
-
item:
|
43
|
+
item: Orb::Item::OrHash,
|
42
44
|
metadata: T::Hash[Symbol, String],
|
43
45
|
name: String,
|
44
|
-
status: Orb::
|
45
|
-
)
|
46
|
-
.returns(T.attached_class)
|
46
|
+
status: Orb::BillableMetric::Status::OrSymbol
|
47
|
+
).returns(T.attached_class)
|
47
48
|
end
|
48
49
|
def self.new(
|
49
50
|
id:,
|
@@ -59,34 +60,40 @@ module Orb
|
|
59
60
|
metadata:,
|
60
61
|
name:,
|
61
62
|
status:
|
62
|
-
)
|
63
|
+
)
|
64
|
+
end
|
65
|
+
|
63
66
|
sig do
|
64
|
-
override
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
67
|
+
override.returns(
|
68
|
+
{
|
69
|
+
id: String,
|
70
|
+
description: T.nilable(String),
|
71
|
+
item: Orb::Item,
|
72
|
+
metadata: T::Hash[Symbol, String],
|
73
|
+
name: String,
|
74
|
+
status: Orb::BillableMetric::Status::TaggedSymbol
|
75
|
+
}
|
76
|
+
)
|
77
|
+
end
|
78
|
+
def to_hash
|
75
79
|
end
|
76
|
-
def to_hash; end
|
77
80
|
|
78
81
|
module Status
|
79
82
|
extend Orb::Internal::Type::Enum
|
80
83
|
|
81
|
-
TaggedSymbol =
|
84
|
+
TaggedSymbol =
|
85
|
+
T.type_alias { T.all(Symbol, Orb::BillableMetric::Status) }
|
82
86
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
83
87
|
|
84
|
-
ACTIVE = T.let(:active, Orb::
|
85
|
-
DRAFT = T.let(:draft, Orb::
|
86
|
-
ARCHIVED = T.let(:archived, Orb::
|
88
|
+
ACTIVE = T.let(:active, Orb::BillableMetric::Status::TaggedSymbol)
|
89
|
+
DRAFT = T.let(:draft, Orb::BillableMetric::Status::TaggedSymbol)
|
90
|
+
ARCHIVED = T.let(:archived, Orb::BillableMetric::Status::TaggedSymbol)
|
87
91
|
|
88
|
-
sig
|
89
|
-
|
92
|
+
sig do
|
93
|
+
override.returns(T::Array[Orb::BillableMetric::Status::TaggedSymbol])
|
94
|
+
end
|
95
|
+
def self.values
|
96
|
+
end
|
90
97
|
end
|
91
98
|
end
|
92
99
|
end
|
@@ -5,14 +5,20 @@ module Orb
|
|
5
5
|
module BillingCycleRelativeDate
|
6
6
|
extend Orb::Internal::Type::Enum
|
7
7
|
|
8
|
-
TaggedSymbol =
|
8
|
+
TaggedSymbol =
|
9
|
+
T.type_alias { T.all(Symbol, Orb::BillingCycleRelativeDate) }
|
9
10
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
10
11
|
|
11
|
-
START_OF_TERM =
|
12
|
-
|
12
|
+
START_OF_TERM =
|
13
|
+
T.let(:start_of_term, Orb::BillingCycleRelativeDate::TaggedSymbol)
|
14
|
+
END_OF_TERM =
|
15
|
+
T.let(:end_of_term, Orb::BillingCycleRelativeDate::TaggedSymbol)
|
13
16
|
|
14
|
-
sig
|
15
|
-
|
17
|
+
sig do
|
18
|
+
override.returns(T::Array[Orb::BillingCycleRelativeDate::TaggedSymbol])
|
19
|
+
end
|
20
|
+
def self.values
|
21
|
+
end
|
16
22
|
end
|
17
23
|
end
|
18
24
|
end
|
data/rbi/orb/models/coupon.rbi
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class Coupon < Orb::Internal::Type::BaseModel
|
6
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
7
|
+
|
6
8
|
# Also referred to as coupon_id in this documentation.
|
7
9
|
sig { returns(String) }
|
8
10
|
attr_accessor :id
|
@@ -12,7 +14,7 @@ module Orb
|
|
12
14
|
sig { returns(T.nilable(Time)) }
|
13
15
|
attr_accessor :archived_at
|
14
16
|
|
15
|
-
sig { returns(T.any(Orb::
|
17
|
+
sig { returns(T.any(Orb::PercentageDiscount, Orb::AmountDiscount)) }
|
16
18
|
attr_accessor :discount
|
17
19
|
|
18
20
|
# This allows for a coupon's discount to apply for a limited time (determined in
|
@@ -42,13 +44,13 @@ module Orb
|
|
42
44
|
params(
|
43
45
|
id: String,
|
44
46
|
archived_at: T.nilable(Time),
|
45
|
-
discount:
|
47
|
+
discount:
|
48
|
+
T.any(Orb::PercentageDiscount::OrHash, Orb::AmountDiscount::OrHash),
|
46
49
|
duration_in_months: T.nilable(Integer),
|
47
50
|
max_redemptions: T.nilable(Integer),
|
48
51
|
redemption_code: String,
|
49
52
|
times_redeemed: Integer
|
50
|
-
)
|
51
|
-
.returns(T.attached_class)
|
53
|
+
).returns(T.attached_class)
|
52
54
|
end
|
53
55
|
def self.new(
|
54
56
|
# Also referred to as coupon_id in this documentation.
|
@@ -67,28 +69,34 @@ module Orb
|
|
67
69
|
redemption_code:,
|
68
70
|
# The number of times this coupon has been redeemed.
|
69
71
|
times_redeemed:
|
70
|
-
)
|
72
|
+
)
|
73
|
+
end
|
74
|
+
|
71
75
|
sig do
|
72
|
-
override
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
76
|
+
override.returns(
|
77
|
+
{
|
78
|
+
id: String,
|
79
|
+
archived_at: T.nilable(Time),
|
80
|
+
discount: T.any(Orb::PercentageDiscount, Orb::AmountDiscount),
|
81
|
+
duration_in_months: T.nilable(Integer),
|
82
|
+
max_redemptions: T.nilable(Integer),
|
83
|
+
redemption_code: String,
|
84
|
+
times_redeemed: Integer
|
85
|
+
}
|
86
|
+
)
|
87
|
+
end
|
88
|
+
def to_hash
|
84
89
|
end
|
85
|
-
def to_hash; end
|
86
90
|
|
87
91
|
module Discount
|
88
92
|
extend Orb::Internal::Type::Union
|
89
93
|
|
90
|
-
|
91
|
-
|
94
|
+
Variants =
|
95
|
+
T.type_alias { T.any(Orb::PercentageDiscount, Orb::AmountDiscount) }
|
96
|
+
|
97
|
+
sig { override.returns(T::Array[Orb::Coupon::Discount::Variants]) }
|
98
|
+
def self.variants
|
99
|
+
end
|
92
100
|
end
|
93
101
|
end
|
94
102
|
end
|