orb-billing 0.5.2 → 0.5.4
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 +25 -0
- data/README.md +4 -4
- data/SECURITY.md +2 -2
- data/lib/orb/internal/util.rb +3 -1
- 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 -6
- data/lib/orb/models/coupon_create_params.rb +3 -3
- 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 -26
- data/lib/orb/models/customer_update_by_external_id_params.rb +26 -26
- data/lib/orb/models/customer_update_params.rb +26 -26
- 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_params.rb +8 -8
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +4 -4
- data/lib/orb/models/customers/credits/ledger_list_params.rb +4 -4
- 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 -1
- 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 -113
- data/lib/orb/models/invoice_create_params.rb +10 -10
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +6 -6
- data/lib/orb/models/invoice_level_discount.rb +1 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +4 -4
- 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 -58
- data/lib/orb/models/plan_create_params.rb +448 -444
- data/lib/orb/models/plan_list_params.rb +2 -2
- data/lib/orb/models/price.rb +1204 -1204
- 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 -56
- data/lib/orb/models/subscription_cancel_params.rb +2 -2
- data/lib/orb/models/subscription_cancel_response.rb +14 -14
- data/lib/orb/models/subscription_change_apply_response.rb +14 -14
- data/lib/orb/models/subscription_change_cancel_response.rb +14 -14
- data/lib/orb/models/subscription_change_retrieve_response.rb +14 -14
- data/lib/orb/models/subscription_create_params.rb +1002 -987
- data/lib/orb/models/subscription_create_response.rb +14 -14
- 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 -585
- data/lib/orb/models/subscription_price_intervals_response.rb +14 -14
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +973 -971
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +14 -14
- data/lib/orb/models/subscription_trigger_phase_response.rb +14 -14
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +14 -14
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +14 -14
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +14 -14
- 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 -14
- data/lib/orb/models/subscription_update_trial_params.rb +3 -3
- data/lib/orb/models/subscription_update_trial_response.rb +14 -14
- data/lib/orb/models/subscription_usage.rb +26 -26
- 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/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.rbi +3 -0
- data/rbi/orb/models/subscription_price_intervals_params.rbi +26 -72
- data/rbi/orb/models/subscription_update_trial_params.rbi +14 -3
- data/rbi/orb/resources/subscriptions.rbi +4 -1
- data/sig/orb/internal/page.rbs +2 -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: 53290586e1325effc936a864ffdca13f0365aeb720897b87581148b5a0dc1251
|
4
|
+
data.tar.gz: a734cbfb59fe1527fbfc6187057d7c94ad491924f95dd80dbef792bd1dbd7841
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e405f620ae6654e9ee44aadd9d47de94df790a8384fde15c35d07c31cbfe6f273cd90e3343e083b6a2a89dd8804ab9e126e87fae91f95dd60b10555f712b7cea
|
7
|
+
data.tar.gz: '039505f54e061b96bf058f23bc3798314b634dd7d3c3f421752451d81f8c282d58b09657295b263b6eab1139f47f6e7adccae8173225f408c38add810528137f'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,30 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.5.4 (2025-05-23)
|
4
|
+
|
5
|
+
Full Changelog: [v0.5.3...v0.5.4](https://github.com/orbcorp/orb-ruby/compare/v0.5.3...v0.5.4)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* prevent rubocop from mangling `===` to `is_a?` check ([dcff731](https://github.com/orbcorp/orb-ruby/commit/dcff7318aec9cfaa21b7a82849d9df89d82e3ecb))
|
10
|
+
|
11
|
+
|
12
|
+
### Chores
|
13
|
+
|
14
|
+
* **internal:** version bump ([853de30](https://github.com/orbcorp/orb-ruby/commit/853de30e4985aea443239b02ad9ce92ae6ff6ce9))
|
15
|
+
|
16
|
+
## 0.5.3 (2025-05-22)
|
17
|
+
|
18
|
+
Full Changelog: [v0.5.2...v0.5.3](https://github.com/orbcorp/orb-ruby/compare/v0.5.2...v0.5.3)
|
19
|
+
|
20
|
+
### Chores
|
21
|
+
|
22
|
+
* **docs:** grammar improvements ([3c1a4d4](https://github.com/orbcorp/orb-ruby/commit/3c1a4d421f276c01935659d401c8383470f2f10c))
|
23
|
+
* force utf-8 locale via `RUBYOPT` when formatting ([42a4919](https://github.com/orbcorp/orb-ruby/commit/42a49195c6ea42836d56e130113158c013f4d5d7))
|
24
|
+
* **internal:** version bump ([1decdd2](https://github.com/orbcorp/orb-ruby/commit/1decdd2778f75a19da2218937d4a4f6a44009b84))
|
25
|
+
* refine Yard and Sorbet types and ensure linting is turned on for examples ([8ec00ad](https://github.com/orbcorp/orb-ruby/commit/8ec00ad8007fa9ff78d8c479eb592f3083da8ad9))
|
26
|
+
* use fully qualified names for yard annotations and rbs aliases ([22efb17](https://github.com/orbcorp/orb-ruby/commit/22efb17c873701d2d583c9c517a128128b1bd4d5))
|
27
|
+
|
3
28
|
## 0.5.2 (2025-05-20)
|
4
29
|
|
5
30
|
Full Changelog: [v0.5.1...v0.5.2](https://github.com/orbcorp/orb-ruby/compare/v0.5.1...v0.5.2)
|
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.4"
|
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
|
|
data/lib/orb/internal/util.rb
CHANGED
@@ -600,11 +600,12 @@ module Orb
|
|
600
600
|
#
|
601
601
|
# @return [Object]
|
602
602
|
def encode_content(headers, body)
|
603
|
+
# rubocop:disable Style/CaseEquality
|
603
604
|
content_type = headers["content-type"]
|
604
605
|
case [content_type, body]
|
605
606
|
in [Orb::Internal::Util::JSON_CONTENT, Hash | Array | -> { primitive?(_1) }]
|
606
607
|
[headers, JSON.generate(body)]
|
607
|
-
in [Orb::Internal::Util::JSONL_CONTENT, Enumerable] unless
|
608
|
+
in [Orb::Internal::Util::JSONL_CONTENT, Enumerable] unless Orb::Internal::Type::FileInput === body
|
608
609
|
[headers, body.lazy.map { JSON.generate(_1) }]
|
609
610
|
in [%r{^multipart/form-data}, Hash | Orb::Internal::Type::FileInput]
|
610
611
|
boundary, strio = encode_multipart_streaming(body)
|
@@ -619,6 +620,7 @@ module Orb
|
|
619
620
|
else
|
620
621
|
[headers, body]
|
621
622
|
end
|
623
|
+
# rubocop:enable Style/CaseEquality
|
622
624
|
end
|
623
625
|
|
624
626
|
# @api private
|
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
|
|
@@ -19,7 +19,7 @@ module Orb
|
|
19
19
|
# with all line items, billable metrics, and prices and are used for defining
|
20
20
|
# external sync behavior for invoices and tax calculation purposes.
|
21
21
|
#
|
22
|
-
# @return [Orb::Item]
|
22
|
+
# @return [Orb::Models::Item]
|
23
23
|
required :item, -> { Orb::Item }
|
24
24
|
|
25
25
|
# @!attribute metadata
|
@@ -38,12 +38,12 @@ module Orb
|
|
38
38
|
|
39
39
|
# @!attribute status
|
40
40
|
#
|
41
|
-
# @return [Symbol, Orb::BillableMetric::Status]
|
41
|
+
# @return [Symbol, Orb::Models::BillableMetric::Status]
|
42
42
|
required :status, enum: -> { Orb::BillableMetric::Status }
|
43
43
|
|
44
44
|
# @!method initialize(id:, description:, item:, metadata:, name:, status:)
|
45
|
-
# Some parameter documentations has been truncated, see
|
46
|
-
# more details.
|
45
|
+
# Some parameter documentations has been truncated, see
|
46
|
+
# {Orb::Models::BillableMetric} for more details.
|
47
47
|
#
|
48
48
|
# The Metric resource represents a calculation of a quantity based on events.
|
49
49
|
# Metrics are defined by the query that transforms raw usage events into
|
@@ -53,15 +53,15 @@ module Orb
|
|
53
53
|
#
|
54
54
|
# @param description [String, nil]
|
55
55
|
#
|
56
|
-
# @param item [Orb::Item] The Item resource represents a sellable product or good. Items are associated wi
|
56
|
+
# @param item [Orb::Models::Item] The Item resource represents a sellable product or good. Items are associated wi
|
57
57
|
#
|
58
58
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
59
59
|
#
|
60
60
|
# @param name [String]
|
61
61
|
#
|
62
|
-
# @param status [Symbol, Orb::BillableMetric::Status]
|
62
|
+
# @param status [Symbol, Orb::Models::BillableMetric::Status]
|
63
63
|
|
64
|
-
# @see Orb::BillableMetric#status
|
64
|
+
# @see Orb::Models::BillableMetric#status
|
65
65
|
module Status
|
66
66
|
extend Orb::Internal::Type::Enum
|
67
67
|
|
data/lib/orb/models/coupon.rb
CHANGED
@@ -19,7 +19,7 @@ module Orb
|
|
19
19
|
|
20
20
|
# @!attribute discount
|
21
21
|
#
|
22
|
-
# @return [Orb::PercentageDiscount, Orb::AmountDiscount]
|
22
|
+
# @return [Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount]
|
23
23
|
required :discount, union: -> { Orb::Coupon::Discount }
|
24
24
|
|
25
25
|
# @!attribute duration_in_months
|
@@ -49,8 +49,8 @@ module Orb
|
|
49
49
|
required :times_redeemed, Integer
|
50
50
|
|
51
51
|
# @!method initialize(id:, archived_at:, discount:, duration_in_months:, max_redemptions:, redemption_code:, times_redeemed:)
|
52
|
-
# Some parameter documentations has been truncated, see {Orb::Coupon} for
|
53
|
-
# details.
|
52
|
+
# Some parameter documentations has been truncated, see {Orb::Models::Coupon} for
|
53
|
+
# more details.
|
54
54
|
#
|
55
55
|
# A coupon represents a reusable discount configuration that can be applied either
|
56
56
|
# as a fixed or percentage amount to an invoice or subscription. Coupons are
|
@@ -62,7 +62,7 @@ module Orb
|
|
62
62
|
#
|
63
63
|
# @param archived_at [Time, nil] An archived coupon can no longer be redeemed. Active coupons will have a value o
|
64
64
|
#
|
65
|
-
# @param discount [Orb::PercentageDiscount, Orb::AmountDiscount]
|
65
|
+
# @param discount [Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount]
|
66
66
|
#
|
67
67
|
# @param duration_in_months [Integer, nil] This allows for a coupon's discount to apply for a limited time (determined in m
|
68
68
|
#
|
@@ -72,7 +72,7 @@ module Orb
|
|
72
72
|
#
|
73
73
|
# @param times_redeemed [Integer] The number of times this coupon has been redeemed.
|
74
74
|
|
75
|
-
# @see Orb::Coupon#discount
|
75
|
+
# @see Orb::Models::Coupon#discount
|
76
76
|
module Discount
|
77
77
|
extend Orb::Internal::Type::Union
|
78
78
|
|
@@ -83,7 +83,7 @@ module Orb
|
|
83
83
|
variant :amount, -> { Orb::AmountDiscount }
|
84
84
|
|
85
85
|
# @!method self.variants
|
86
|
-
# @return [Array(Orb::PercentageDiscount, Orb::AmountDiscount)]
|
86
|
+
# @return [Array(Orb::Models::PercentageDiscount, Orb::Models::AmountDiscount)]
|
87
87
|
end
|
88
88
|
end
|
89
89
|
end
|
@@ -9,7 +9,7 @@ module Orb
|
|
9
9
|
|
10
10
|
# @!attribute discount
|
11
11
|
#
|
12
|
-
# @return [Orb::CouponCreateParams::Discount::Percentage, Orb::CouponCreateParams::Discount::Amount]
|
12
|
+
# @return [Orb::Models::CouponCreateParams::Discount::Percentage, Orb::Models::CouponCreateParams::Discount::Amount]
|
13
13
|
required :discount, union: -> { Orb::CouponCreateParams::Discount }
|
14
14
|
|
15
15
|
# @!attribute redemption_code
|
@@ -36,7 +36,7 @@ module Orb
|
|
36
36
|
# Some parameter documentations has been truncated, see
|
37
37
|
# {Orb::Models::CouponCreateParams} for more details.
|
38
38
|
#
|
39
|
-
# @param discount [Orb::CouponCreateParams::Discount::Percentage, Orb::CouponCreateParams::Discount::Amount]
|
39
|
+
# @param discount [Orb::Models::CouponCreateParams::Discount::Percentage, Orb::Models::CouponCreateParams::Discount::Amount]
|
40
40
|
#
|
41
41
|
# @param redemption_code [String] This string can be used to redeem this coupon for a given subscription.
|
42
42
|
#
|
@@ -88,7 +88,7 @@ module Orb
|
|
88
88
|
end
|
89
89
|
|
90
90
|
# @!method self.variants
|
91
|
-
# @return [Array(Orb::CouponCreateParams::Discount::Percentage, Orb::CouponCreateParams::Discount::Amount)]
|
91
|
+
# @return [Array(Orb::Models::CouponCreateParams::Discount::Percentage, Orb::Models::CouponCreateParams::Discount::Amount)]
|
92
92
|
end
|
93
93
|
end
|
94
94
|
end
|