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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a8aab7ea27e9f429fb79d85663cb238393ef06c60acb43e7c1f4285658cdd2f
|
4
|
+
data.tar.gz: b48c4f83c56e09e04e50e10bb89c865c5fb72143f4a42dbd96e83cc183975fa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5e2ba15a48f4b458f9758393a6f421d4b795e44b3ecf5f7f7e7dfdba71c139b26a229cd4956d2d4269d1f5df689e9fc583ced8da055ab59403f0372b24ed1d4
|
7
|
+
data.tar.gz: ca4923f45449e5f4187ad9bd4cabf2abbdea4c2e593f2f294607e1e2cf8ce5efe3e2f311ee2371a85cbf4ceba724fa2de98d30d9521fa8f10f9262214fd52a54
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.3.2 (2025-05-07)
|
4
|
+
|
5
|
+
Full Changelog: [v0.3.1...v0.3.2](https://github.com/orbcorp/orb-ruby/compare/v0.3.1...v0.3.2)
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
* **internal:** ensure formatting always uses c.utf-8 locale ([c4cc44a](https://github.com/orbcorp/orb-ruby/commit/c4cc44a8e280089938586de353b08e8091056ca0))
|
10
|
+
|
11
|
+
|
12
|
+
### Chores
|
13
|
+
|
14
|
+
* **internal:** version bump ([fede0e6](https://github.com/orbcorp/orb-ruby/commit/fede0e64ca4753cc961e8308ddcef2b39dcb6f24))
|
15
|
+
* revert ignoring Gemfile.lock ([e572719](https://github.com/orbcorp/orb-ruby/commit/e572719854490cfa7735dcc70d9cfd1dc4d4a122))
|
16
|
+
|
3
17
|
## 0.3.1 (2025-05-06)
|
4
18
|
|
5
19
|
Full Changelog: [v0.3.0...v0.3.1](https://github.com/orbcorp/orb-ruby/compare/v0.3.0...v0.3.1)
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
|
|
15
15
|
<!-- x-release-please-start-version -->
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
gem "orb-billing", "~> 0.3.
|
18
|
+
gem "orb-billing", "~> 0.3.2"
|
19
19
|
```
|
20
20
|
|
21
21
|
<!-- x-release-please-end -->
|
@@ -200,9 +200,9 @@ Sorbet's typed enums require sub-classing of the [`T::Enum` class](https://sorbe
|
|
200
200
|
Since this library does not depend on `sorbet-runtime`, it uses a [`T.all` intersection type](https://sorbet.org/docs/intersection-types) with a ruby primitive type to construct a "tagged alias" instead.
|
201
201
|
|
202
202
|
```ruby
|
203
|
-
module Orb::
|
203
|
+
module Orb::BillingCycleRelativeDate
|
204
204
|
# This alias aids language service driven navigation.
|
205
|
-
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::
|
205
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::BillingCycleRelativeDate) }
|
206
206
|
end
|
207
207
|
```
|
208
208
|
|
data/lib/orb/file_part.rb
CHANGED
@@ -45,9 +45,9 @@ module Orb
|
|
45
45
|
@filename =
|
46
46
|
case content
|
47
47
|
in Pathname
|
48
|
-
filename.nil? ? content.basename.to_path : File.basename(filename)
|
48
|
+
filename.nil? ? content.basename.to_path : ::File.basename(filename)
|
49
49
|
else
|
50
|
-
filename.nil? ? nil : File.basename(filename)
|
50
|
+
filename.nil? ? nil : ::File.basename(filename)
|
51
51
|
end
|
52
52
|
@content_type = content_type
|
53
53
|
end
|
@@ -17,11 +17,11 @@ module Orb
|
|
17
17
|
# values safely.
|
18
18
|
#
|
19
19
|
# @example
|
20
|
-
# # `billing_cycle_relative_date` is a `Orb::
|
20
|
+
# # `billing_cycle_relative_date` is a `Orb::BillingCycleRelativeDate`
|
21
21
|
# case billing_cycle_relative_date
|
22
|
-
# when Orb::
|
22
|
+
# when Orb::BillingCycleRelativeDate::START_OF_TERM
|
23
23
|
# # ...
|
24
|
-
# when Orb::
|
24
|
+
# when Orb::BillingCycleRelativeDate::END_OF_TERM
|
25
25
|
# # ...
|
26
26
|
# else
|
27
27
|
# puts(billing_cycle_relative_date)
|
@@ -5,10 +5,10 @@ module Orb
|
|
5
5
|
module Type
|
6
6
|
# @api private
|
7
7
|
module RequestParameters
|
8
|
-
# @!
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
8
|
+
# @!attribute request_options
|
9
|
+
# Options to specify HTTP behaviour for this request.
|
10
|
+
#
|
11
|
+
# @return [Orb::RequestOptions, Hash{Symbol=>Object}]
|
12
12
|
|
13
13
|
# @param mod [Module]
|
14
14
|
def self.included(mod)
|
@@ -6,13 +6,13 @@ module Orb
|
|
6
6
|
# @api private
|
7
7
|
#
|
8
8
|
# @example
|
9
|
-
# # `discount` is a `Orb::
|
9
|
+
# # `discount` is a `Orb::Discount`
|
10
10
|
# case discount
|
11
|
-
# when Orb::
|
11
|
+
# when Orb::PercentageDiscount
|
12
12
|
# puts(discount.applies_to_price_ids)
|
13
|
-
# when Orb::
|
13
|
+
# when Orb::TrialDiscount
|
14
14
|
# puts(discount.discount_type)
|
15
|
-
# when Orb::
|
15
|
+
# when Orb::UsageDiscount
|
16
16
|
# puts(discount.usage_discount)
|
17
17
|
# else
|
18
18
|
# puts(discount)
|
data/lib/orb/internal/util.rb
CHANGED
@@ -535,7 +535,7 @@ module Orb
|
|
535
535
|
filename = ERB::Util.url_encode(val.filename)
|
536
536
|
y << "; filename=\"#{filename}\""
|
537
537
|
in Pathname | IO
|
538
|
-
filename = ERB::Util.url_encode(File.basename(val.to_path))
|
538
|
+
filename = ERB::Util.url_encode(::File.basename(val.to_path))
|
539
539
|
y << "; filename=\"#{filename}\""
|
540
540
|
else
|
541
541
|
end
|
data/lib/orb/models/alert.rb
CHANGED
@@ -25,8 +25,8 @@ module Orb
|
|
25
25
|
# @!attribute customer
|
26
26
|
# The customer the alert applies to.
|
27
27
|
#
|
28
|
-
# @return [Orb::
|
29
|
-
required :customer, -> { Orb::
|
28
|
+
# @return [Orb::Alert::Customer, nil]
|
29
|
+
required :customer, -> { Orb::Alert::Customer }, nil?: true
|
30
30
|
|
31
31
|
# @!attribute enabled
|
32
32
|
# Whether the alert is enabled or disabled.
|
@@ -37,37 +37,37 @@ module Orb
|
|
37
37
|
# @!attribute metric
|
38
38
|
# The metric the alert applies to.
|
39
39
|
#
|
40
|
-
# @return [Orb::
|
41
|
-
required :metric, -> { Orb::
|
40
|
+
# @return [Orb::Alert::Metric, nil]
|
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::
|
47
|
-
required :plan, -> { Orb::
|
46
|
+
# @return [Orb::Alert::Plan, nil]
|
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::
|
53
|
-
required :subscription, -> { Orb::
|
52
|
+
# @return [Orb::Alert::Subscription, nil]
|
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::
|
60
|
-
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::
|
59
|
+
# @return [Array<Orb::Alert::Threshold>, nil]
|
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::
|
66
|
-
required :type, enum: -> { Orb::
|
65
|
+
# @return [Symbol, Orb::Alert::Type]
|
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::
|
70
|
-
#
|
69
|
+
# Some parameter documentations has been truncated, see {Orb::Alert} for more
|
70
|
+
# 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,22 +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::
|
84
|
+
# @param customer [Orb::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::
|
88
|
+
# @param metric [Orb::Alert::Metric, nil] The metric the alert applies to.
|
89
89
|
#
|
90
|
-
# @param plan [Orb::
|
90
|
+
# @param plan [Orb::Alert::Plan, nil] The plan the alert applies to.
|
91
91
|
#
|
92
|
-
# @param subscription [Orb::
|
92
|
+
# @param subscription [Orb::Alert::Subscription, nil] The subscription the alert applies to.
|
93
93
|
#
|
94
|
-
# @param thresholds [Array<Orb::
|
95
|
-
# ...
|
94
|
+
# @param thresholds [Array<Orb::Alert::Threshold>, nil] The thresholds that define the conditions under which the alert will be triggere
|
96
95
|
#
|
97
|
-
# @param type [Symbol, Orb::
|
96
|
+
# @param type [Symbol, Orb::Alert::Type] The type of alert. This must be a valid alert type.
|
98
97
|
|
99
|
-
# @see Orb::
|
98
|
+
# @see Orb::Alert#customer
|
100
99
|
class Customer < Orb::Internal::Type::BaseModel
|
101
100
|
# @!attribute id
|
102
101
|
#
|
@@ -115,7 +114,7 @@ module Orb
|
|
115
114
|
# @param external_customer_id [String, nil]
|
116
115
|
end
|
117
116
|
|
118
|
-
# @see Orb::
|
117
|
+
# @see Orb::Alert#metric
|
119
118
|
class Metric < Orb::Internal::Type::BaseModel
|
120
119
|
# @!attribute id
|
121
120
|
#
|
@@ -128,7 +127,7 @@ module Orb
|
|
128
127
|
# @param id [String]
|
129
128
|
end
|
130
129
|
|
131
|
-
# @see Orb::
|
130
|
+
# @see Orb::Alert#plan
|
132
131
|
class Plan < Orb::Internal::Type::BaseModel
|
133
132
|
# @!attribute id
|
134
133
|
#
|
@@ -154,22 +153,21 @@ module Orb
|
|
154
153
|
required :plan_version, String
|
155
154
|
|
156
155
|
# @!method initialize(id:, external_plan_id:, name:, plan_version:)
|
157
|
-
# Some parameter documentations has been truncated, see {Orb::
|
158
|
-
#
|
156
|
+
# Some parameter documentations has been truncated, see {Orb::Alert::Plan} for
|
157
|
+
# more details.
|
159
158
|
#
|
160
159
|
# The plan the alert applies to.
|
161
160
|
#
|
162
161
|
# @param id [String, nil]
|
163
162
|
#
|
164
163
|
# @param external_plan_id [String, nil] An optional user-defined ID for this plan resource, used throughout the system a
|
165
|
-
# ...
|
166
164
|
#
|
167
165
|
# @param name [String, nil]
|
168
166
|
#
|
169
167
|
# @param plan_version [String]
|
170
168
|
end
|
171
169
|
|
172
|
-
# @see Orb::
|
170
|
+
# @see Orb::Alert#subscription
|
173
171
|
class Subscription < Orb::Internal::Type::BaseModel
|
174
172
|
# @!attribute id
|
175
173
|
#
|
@@ -192,19 +190,18 @@ module Orb
|
|
192
190
|
required :value, Float
|
193
191
|
|
194
192
|
# @!method initialize(value:)
|
195
|
-
# Some parameter documentations has been truncated, see
|
196
|
-
#
|
193
|
+
# Some parameter documentations has been truncated, see {Orb::Alert::Threshold}
|
194
|
+
# for more details.
|
197
195
|
#
|
198
196
|
# Thresholds are used to define the conditions under which an alert will be
|
199
197
|
# triggered.
|
200
198
|
#
|
201
199
|
# @param value [Float] The value at which an alert will fire. For credit balance alerts, the alert will
|
202
|
-
# ...
|
203
200
|
end
|
204
201
|
|
205
202
|
# The type of alert. This must be a valid alert type.
|
206
203
|
#
|
207
|
-
# @see Orb::
|
204
|
+
# @see Orb::Alert#type
|
208
205
|
module Type
|
209
206
|
extend Orb::Internal::Type::Enum
|
210
207
|
|
@@ -16,23 +16,23 @@ 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::
|
20
|
-
required :type, enum: -> { Orb::
|
19
|
+
# @return [Symbol, Orb::AlertCreateForCustomerParams::Type]
|
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::
|
25
|
+
# @return [Array<Orb::AlertCreateForCustomerParams::Threshold>, nil]
|
26
26
|
optional :thresholds,
|
27
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::
|
27
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForCustomerParams::Threshold] },
|
28
28
|
nil?: true
|
29
29
|
|
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::
|
33
|
+
# @param type [Symbol, Orb::AlertCreateForCustomerParams::Type] The type of alert to create. This must be a valid alert type.
|
34
34
|
#
|
35
|
-
# @param thresholds [Array<Orb::
|
35
|
+
# @param thresholds [Array<Orb::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,13 +59,12 @@ module Orb
|
|
59
59
|
|
60
60
|
# @!method initialize(value:)
|
61
61
|
# Some parameter documentations has been truncated, see
|
62
|
-
# {Orb::
|
62
|
+
# {Orb::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.
|
66
66
|
#
|
67
67
|
# @param value [Float] The value at which an alert will fire. For credit balance alerts, the alert will
|
68
|
-
# ...
|
69
68
|
end
|
70
69
|
end
|
71
70
|
end
|
@@ -16,23 +16,23 @@ 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::
|
20
|
-
required :type, enum: -> { Orb::
|
19
|
+
# @return [Symbol, Orb::AlertCreateForExternalCustomerParams::Type]
|
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::
|
25
|
+
# @return [Array<Orb::AlertCreateForExternalCustomerParams::Threshold>, nil]
|
26
26
|
optional :thresholds,
|
27
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::
|
27
|
+
-> { Orb::Internal::Type::ArrayOf[Orb::AlertCreateForExternalCustomerParams::Threshold] },
|
28
28
|
nil?: true
|
29
29
|
|
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::
|
33
|
+
# @param type [Symbol, Orb::AlertCreateForExternalCustomerParams::Type] The type of alert to create. This must be a valid alert type.
|
34
34
|
#
|
35
|
-
# @param thresholds [Array<Orb::
|
35
|
+
# @param thresholds [Array<Orb::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,13 +59,12 @@ module Orb
|
|
59
59
|
|
60
60
|
# @!method initialize(value:)
|
61
61
|
# Some parameter documentations has been truncated, see
|
62
|
-
# {Orb::
|
62
|
+
# {Orb::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.
|
66
66
|
#
|
67
67
|
# @param value [Float] The value at which an alert will fire. For credit balance alerts, the alert will
|
68
|
-
# ...
|
69
68
|
end
|
70
69
|
end
|
71
70
|
end
|
@@ -10,15 +10,15 @@ 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::
|
13
|
+
# @return [Array<Orb::AlertCreateForSubscriptionParams::Threshold>]
|
14
14
|
required :thresholds,
|
15
|
-
-> { Orb::Internal::Type::ArrayOf[Orb::
|
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::
|
21
|
-
required :type, enum: -> { Orb::
|
20
|
+
# @return [Symbol, Orb::AlertCreateForSubscriptionParams::Type]
|
21
|
+
required :type, enum: -> { Orb::AlertCreateForSubscriptionParams::Type }
|
22
22
|
|
23
23
|
# @!attribute metric_id
|
24
24
|
# The metric to track usage for.
|
@@ -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::
|
30
|
+
# @param thresholds [Array<Orb::AlertCreateForSubscriptionParams::Threshold>] The thresholds that define the values at which the alert will be triggered.
|
31
31
|
#
|
32
|
-
# @param type [Symbol, Orb::
|
32
|
+
# @param type [Symbol, Orb::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,13 +46,12 @@ module Orb
|
|
46
46
|
|
47
47
|
# @!method initialize(value:)
|
48
48
|
# Some parameter documentations has been truncated, see
|
49
|
-
# {Orb::
|
49
|
+
# {Orb::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.
|
53
53
|
#
|
54
54
|
# @param value [Float] The value at which an alert will fire. For credit balance alerts, the alert will
|
55
|
-
# ...
|
56
55
|
end
|
57
56
|
|
58
57
|
# The type of alert to create. This must be a valid alert type.
|
@@ -71,7 +71,6 @@ module Orb
|
|
71
71
|
# @param created_at_lte [Time, nil]
|
72
72
|
#
|
73
73
|
# @param cursor [String, nil] Cursor for pagination. This can be populated by the `next_cursor` value returned
|
74
|
-
# ...
|
75
74
|
#
|
76
75
|
# @param customer_id [String, nil] Fetch alerts scoped to this customer_id
|
77
76
|
#
|
@@ -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::
|
14
|
-
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::
|
13
|
+
# @return [Array<Orb::AlertUpdateParams::Threshold>]
|
14
|
+
required :thresholds, -> { Orb::Internal::Type::ArrayOf[Orb::AlertUpdateParams::Threshold] }
|
15
15
|
|
16
16
|
# @!method initialize(thresholds:, request_options: {})
|
17
|
-
# @param thresholds [Array<Orb::
|
17
|
+
# @param thresholds [Array<Orb::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,13 +29,12 @@ module Orb
|
|
29
29
|
|
30
30
|
# @!method initialize(value:)
|
31
31
|
# Some parameter documentations has been truncated, see
|
32
|
-
# {Orb::
|
32
|
+
# {Orb::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.
|
36
36
|
#
|
37
37
|
# @param value [Float] The value at which an alert will fire. For credit balance alerts, the alert will
|
38
|
-
# ...
|
39
38
|
end
|
40
39
|
end
|
41
40
|
end
|
@@ -18,8 +18,8 @@ module Orb
|
|
18
18
|
|
19
19
|
# @!attribute discount_type
|
20
20
|
#
|
21
|
-
# @return [Symbol, Orb::
|
22
|
-
required :discount_type, enum: -> { Orb::
|
21
|
+
# @return [Symbol, Orb::AmountDiscount::DiscountType]
|
22
|
+
required :discount_type, enum: -> { Orb::AmountDiscount::DiscountType }
|
23
23
|
|
24
24
|
# @!attribute reason
|
25
25
|
#
|
@@ -27,19 +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
|
-
#
|
30
|
+
# Some parameter documentations has been truncated, see {Orb::AmountDiscount} for
|
31
|
+
# 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
|
-
# ...
|
37
36
|
#
|
38
|
-
# @param discount_type [Symbol, Orb::
|
37
|
+
# @param discount_type [Symbol, Orb::AmountDiscount::DiscountType]
|
39
38
|
#
|
40
39
|
# @param reason [String, nil]
|
41
40
|
|
42
|
-
# @see Orb::
|
41
|
+
# @see Orb::AmountDiscount#discount_type
|
43
42
|
module DiscountType
|
44
43
|
extend Orb::Internal::Type::Enum
|
45
44
|
|
@@ -19,8 +19,8 @@ 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::
|
23
|
-
required :item, -> { Orb::
|
22
|
+
# @return [Orb::Item]
|
23
|
+
required :item, -> { Orb::Item }
|
24
24
|
|
25
25
|
# @!attribute metadata
|
26
26
|
# User specified key-value pairs for the resource. If not present, this defaults
|
@@ -38,12 +38,12 @@ module Orb
|
|
38
38
|
|
39
39
|
# @!attribute status
|
40
40
|
#
|
41
|
-
# @return [Symbol, Orb::
|
42
|
-
required :status, enum: -> { Orb::
|
41
|
+
# @return [Symbol, Orb::BillableMetric::Status]
|
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
|
-
#
|
45
|
+
# Some parameter documentations has been truncated, see {Orb::BillableMetric} for
|
46
|
+
# 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,17 +53,15 @@ module Orb
|
|
53
53
|
#
|
54
54
|
# @param description [String, nil]
|
55
55
|
#
|
56
|
-
# @param item [Orb::
|
57
|
-
# ...
|
56
|
+
# @param item [Orb::Item] The Item resource represents a sellable product or good. Items are associated wi
|
58
57
|
#
|
59
58
|
# @param metadata [Hash{Symbol=>String}] User specified key-value pairs for the resource. If not present, this defaults t
|
60
|
-
# ...
|
61
59
|
#
|
62
60
|
# @param name [String]
|
63
61
|
#
|
64
|
-
# @param status [Symbol, Orb::
|
62
|
+
# @param status [Symbol, Orb::BillableMetric::Status]
|
65
63
|
|
66
|
-
# @see Orb::
|
64
|
+
# @see Orb::BillableMetric#status
|
67
65
|
module Status
|
68
66
|
extend Orb::Internal::Type::Enum
|
69
67
|
|
data/lib/orb/models/coupon.rb
CHANGED
@@ -19,8 +19,8 @@ module Orb
|
|
19
19
|
|
20
20
|
# @!attribute discount
|
21
21
|
#
|
22
|
-
# @return [Orb::
|
23
|
-
required :discount, union: -> { Orb::
|
22
|
+
# @return [Orb::PercentageDiscount, Orb::AmountDiscount]
|
23
|
+
required :discount, union: -> { Orb::Coupon::Discount }
|
24
24
|
|
25
25
|
# @!attribute duration_in_months
|
26
26
|
# This allows for a coupon's discount to apply for a limited time (determined in
|
@@ -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::
|
53
|
-
#
|
52
|
+
# Some parameter documentations has been truncated, see {Orb::Coupon} for more
|
53
|
+
# 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
|
@@ -61,32 +61,29 @@ module Orb
|
|
61
61
|
# @param id [String] Also referred to as coupon_id in this documentation.
|
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
|
-
# ...
|
65
64
|
#
|
66
|
-
# @param discount [Orb::
|
65
|
+
# @param discount [Orb::PercentageDiscount, Orb::AmountDiscount]
|
67
66
|
#
|
68
67
|
# @param duration_in_months [Integer, nil] This allows for a coupon's discount to apply for a limited time (determined in m
|
69
|
-
# ...
|
70
68
|
#
|
71
69
|
# @param max_redemptions [Integer, nil] The maximum number of redemptions allowed for this coupon before it is exhausted
|
72
|
-
# ...
|
73
70
|
#
|
74
71
|
# @param redemption_code [String] This string can be used to redeem this coupon for a given subscription.
|
75
72
|
#
|
76
73
|
# @param times_redeemed [Integer] The number of times this coupon has been redeemed.
|
77
74
|
|
78
|
-
# @see Orb::
|
75
|
+
# @see Orb::Coupon#discount
|
79
76
|
module Discount
|
80
77
|
extend Orb::Internal::Type::Union
|
81
78
|
|
82
79
|
discriminator :discount_type
|
83
80
|
|
84
|
-
variant :percentage, -> { Orb::
|
81
|
+
variant :percentage, -> { Orb::PercentageDiscount }
|
85
82
|
|
86
|
-
variant :amount, -> { Orb::
|
83
|
+
variant :amount, -> { Orb::AmountDiscount }
|
87
84
|
|
88
85
|
# @!method self.variants
|
89
|
-
# @return [Array(Orb::
|
86
|
+
# @return [Array(Orb::PercentageDiscount, Orb::AmountDiscount)]
|
90
87
|
end
|
91
88
|
end
|
92
89
|
end
|