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
@@ -3,6 +3,8 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class SubscriptionCancelResponse < Orb::Internal::Type::BaseModel
|
6
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
7
|
+
|
6
8
|
sig { returns(String) }
|
7
9
|
attr_accessor :id
|
8
10
|
|
@@ -13,7 +15,11 @@ module Orb
|
|
13
15
|
|
14
16
|
# The adjustment intervals for this subscription sorted by the start_date of the
|
15
17
|
# adjustment interval.
|
16
|
-
sig
|
18
|
+
sig do
|
19
|
+
returns(
|
20
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]
|
21
|
+
)
|
22
|
+
end
|
17
23
|
attr_accessor :adjustment_intervals
|
18
24
|
|
19
25
|
# Determines whether issued invoices for this subscription will automatically be
|
@@ -22,14 +28,18 @@ module Orb
|
|
22
28
|
sig { returns(T.nilable(T::Boolean)) }
|
23
29
|
attr_accessor :auto_collection
|
24
30
|
|
25
|
-
sig
|
31
|
+
sig do
|
32
|
+
returns(
|
33
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration
|
34
|
+
)
|
35
|
+
end
|
26
36
|
attr_reader :billing_cycle_anchor_configuration
|
27
37
|
|
28
38
|
sig do
|
29
39
|
params(
|
30
|
-
billing_cycle_anchor_configuration:
|
31
|
-
|
32
|
-
|
40
|
+
billing_cycle_anchor_configuration:
|
41
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration::OrHash
|
42
|
+
).void
|
33
43
|
end
|
34
44
|
attr_writer :billing_cycle_anchor_configuration
|
35
45
|
|
@@ -73,10 +83,10 @@ module Orb
|
|
73
83
|
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
74
84
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
75
85
|
# information on what this timezone parameter influences within Orb.
|
76
|
-
sig { returns(Orb::
|
86
|
+
sig { returns(Orb::Customer) }
|
77
87
|
attr_reader :customer
|
78
88
|
|
79
|
-
sig { params(customer:
|
89
|
+
sig { params(customer: Orb::Customer::OrHash).void }
|
80
90
|
attr_writer :customer
|
81
91
|
|
82
92
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -102,14 +112,24 @@ module Orb
|
|
102
112
|
sig { returns(T.nilable(Time)) }
|
103
113
|
attr_accessor :end_date
|
104
114
|
|
105
|
-
sig
|
115
|
+
sig do
|
116
|
+
returns(
|
117
|
+
T::Array[
|
118
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule
|
119
|
+
]
|
120
|
+
)
|
121
|
+
end
|
106
122
|
attr_accessor :fixed_fee_quantity_schedule
|
107
123
|
|
108
124
|
sig { returns(T.nilable(String)) }
|
109
125
|
attr_accessor :invoicing_threshold
|
110
126
|
|
111
127
|
# The maximum intervals for this subscription sorted by the start_date.
|
112
|
-
sig
|
128
|
+
sig do
|
129
|
+
returns(
|
130
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval]
|
131
|
+
)
|
132
|
+
end
|
113
133
|
attr_accessor :maximum_intervals
|
114
134
|
|
115
135
|
# User specified key-value pairs for the resource. If not present, this defaults
|
@@ -120,7 +140,11 @@ module Orb
|
|
120
140
|
attr_accessor :metadata
|
121
141
|
|
122
142
|
# The minimum intervals for this subscription sorted by the start_date.
|
123
|
-
sig
|
143
|
+
sig do
|
144
|
+
returns(
|
145
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval]
|
146
|
+
)
|
147
|
+
end
|
124
148
|
attr_accessor :minimum_intervals
|
125
149
|
|
126
150
|
# Determines the difference between the invoice issue date for subscription
|
@@ -131,16 +155,22 @@ module Orb
|
|
131
155
|
attr_accessor :net_terms
|
132
156
|
|
133
157
|
# A pending subscription change if one exists on this subscription.
|
134
|
-
sig
|
158
|
+
sig do
|
159
|
+
returns(
|
160
|
+
T.nilable(
|
161
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange
|
162
|
+
)
|
163
|
+
)
|
164
|
+
end
|
135
165
|
attr_reader :pending_subscription_change
|
136
166
|
|
137
167
|
sig do
|
138
168
|
params(
|
139
|
-
pending_subscription_change:
|
140
|
-
T.
|
141
|
-
|
142
|
-
|
143
|
-
|
169
|
+
pending_subscription_change:
|
170
|
+
T.nilable(
|
171
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange::OrHash
|
172
|
+
)
|
173
|
+
).void
|
144
174
|
end
|
145
175
|
attr_writer :pending_subscription_change
|
146
176
|
|
@@ -148,24 +178,34 @@ module Orb
|
|
148
178
|
# subscribed to by a customer. Plans define the billing behavior of the
|
149
179
|
# subscription. You can see more about how to configure prices in the
|
150
180
|
# [Price resource](/reference/price).
|
151
|
-
sig { returns(Orb::
|
181
|
+
sig { returns(Orb::Plan) }
|
152
182
|
attr_reader :plan
|
153
183
|
|
154
|
-
sig { params(plan:
|
184
|
+
sig { params(plan: Orb::Plan::OrHash).void }
|
155
185
|
attr_writer :plan
|
156
186
|
|
157
187
|
# The price intervals for this subscription.
|
158
|
-
sig
|
188
|
+
sig do
|
189
|
+
returns(
|
190
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval]
|
191
|
+
)
|
192
|
+
end
|
159
193
|
attr_accessor :price_intervals
|
160
194
|
|
161
|
-
sig
|
195
|
+
sig do
|
196
|
+
returns(
|
197
|
+
T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon)
|
198
|
+
)
|
199
|
+
end
|
162
200
|
attr_reader :redeemed_coupon
|
163
201
|
|
164
202
|
sig do
|
165
203
|
params(
|
166
|
-
redeemed_coupon:
|
167
|
-
|
168
|
-
|
204
|
+
redeemed_coupon:
|
205
|
+
T.nilable(
|
206
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon::OrHash
|
207
|
+
)
|
208
|
+
).void
|
169
209
|
end
|
170
210
|
attr_writer :redeemed_coupon
|
171
211
|
|
@@ -173,26 +213,38 @@ module Orb
|
|
173
213
|
sig { returns(Time) }
|
174
214
|
attr_accessor :start_date
|
175
215
|
|
176
|
-
sig
|
216
|
+
sig do
|
217
|
+
returns(Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol)
|
218
|
+
end
|
177
219
|
attr_accessor :status
|
178
220
|
|
179
221
|
sig { returns(Orb::Models::SubscriptionCancelResponse::TrialInfo) }
|
180
222
|
attr_reader :trial_info
|
181
223
|
|
182
|
-
sig
|
224
|
+
sig do
|
225
|
+
params(
|
226
|
+
trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo::OrHash
|
227
|
+
).void
|
228
|
+
end
|
183
229
|
attr_writer :trial_info
|
184
230
|
|
185
231
|
# The resources that were changed as part of this operation. Only present when
|
186
232
|
# fetched through the subscription changes API or if the
|
187
233
|
# `include_changed_resources` parameter was passed in the request.
|
188
|
-
sig
|
234
|
+
sig do
|
235
|
+
returns(
|
236
|
+
T.nilable(Orb::Models::SubscriptionCancelResponse::ChangedResources)
|
237
|
+
)
|
238
|
+
end
|
189
239
|
attr_reader :changed_resources
|
190
240
|
|
191
241
|
sig do
|
192
242
|
params(
|
193
|
-
changed_resources:
|
194
|
-
|
195
|
-
|
243
|
+
changed_resources:
|
244
|
+
T.nilable(
|
245
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources::OrHash
|
246
|
+
)
|
247
|
+
).void
|
196
248
|
end
|
197
249
|
attr_writer :changed_resources
|
198
250
|
|
@@ -200,42 +252,65 @@ module Orb
|
|
200
252
|
params(
|
201
253
|
id: String,
|
202
254
|
active_plan_phase_order: T.nilable(Integer),
|
203
|
-
adjustment_intervals:
|
255
|
+
adjustment_intervals:
|
256
|
+
T::Array[
|
257
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::OrHash
|
258
|
+
],
|
204
259
|
auto_collection: T.nilable(T::Boolean),
|
205
|
-
billing_cycle_anchor_configuration:
|
260
|
+
billing_cycle_anchor_configuration:
|
261
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration::OrHash,
|
206
262
|
billing_cycle_day: Integer,
|
207
263
|
created_at: Time,
|
208
264
|
current_billing_period_end_date: T.nilable(Time),
|
209
265
|
current_billing_period_start_date: T.nilable(Time),
|
210
|
-
customer:
|
266
|
+
customer: Orb::Customer::OrHash,
|
211
267
|
default_invoice_memo: T.nilable(String),
|
212
|
-
discount_intervals:
|
213
|
-
T
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
268
|
+
discount_intervals:
|
269
|
+
T::Array[
|
270
|
+
T.any(
|
271
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::OrHash,
|
272
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::OrHash,
|
273
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::OrHash
|
274
|
+
)
|
275
|
+
],
|
220
276
|
end_date: T.nilable(Time),
|
221
|
-
fixed_fee_quantity_schedule:
|
277
|
+
fixed_fee_quantity_schedule:
|
278
|
+
T::Array[
|
279
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule::OrHash
|
280
|
+
],
|
222
281
|
invoicing_threshold: T.nilable(String),
|
223
|
-
maximum_intervals:
|
282
|
+
maximum_intervals:
|
283
|
+
T::Array[
|
284
|
+
Orb::Models::SubscriptionCancelResponse::MaximumInterval::OrHash
|
285
|
+
],
|
224
286
|
metadata: T::Hash[Symbol, String],
|
225
|
-
minimum_intervals:
|
287
|
+
minimum_intervals:
|
288
|
+
T::Array[
|
289
|
+
Orb::Models::SubscriptionCancelResponse::MinimumInterval::OrHash
|
290
|
+
],
|
226
291
|
net_terms: Integer,
|
227
|
-
pending_subscription_change:
|
228
|
-
T.
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
292
|
+
pending_subscription_change:
|
293
|
+
T.nilable(
|
294
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange::OrHash
|
295
|
+
),
|
296
|
+
plan: Orb::Plan::OrHash,
|
297
|
+
price_intervals:
|
298
|
+
T::Array[
|
299
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::OrHash
|
300
|
+
],
|
301
|
+
redeemed_coupon:
|
302
|
+
T.nilable(
|
303
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon::OrHash
|
304
|
+
),
|
233
305
|
start_date: Time,
|
234
306
|
status: Orb::Models::SubscriptionCancelResponse::Status::OrSymbol,
|
235
|
-
trial_info:
|
236
|
-
|
237
|
-
|
238
|
-
|
307
|
+
trial_info:
|
308
|
+
Orb::Models::SubscriptionCancelResponse::TrialInfo::OrHash,
|
309
|
+
changed_resources:
|
310
|
+
T.nilable(
|
311
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources::OrHash
|
312
|
+
)
|
313
|
+
).returns(T.attached_class)
|
239
314
|
end
|
240
315
|
def self.new(
|
241
316
|
id:,
|
@@ -324,50 +399,79 @@ module Orb
|
|
324
399
|
# fetched through the subscription changes API or if the
|
325
400
|
# `include_changed_resources` parameter was passed in the request.
|
326
401
|
changed_resources: nil
|
327
|
-
)
|
402
|
+
)
|
403
|
+
end
|
404
|
+
|
328
405
|
sig do
|
329
|
-
override
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
406
|
+
override.returns(
|
407
|
+
{
|
408
|
+
id: String,
|
409
|
+
active_plan_phase_order: T.nilable(Integer),
|
410
|
+
adjustment_intervals:
|
411
|
+
T::Array[
|
412
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval
|
413
|
+
],
|
414
|
+
auto_collection: T.nilable(T::Boolean),
|
415
|
+
billing_cycle_anchor_configuration:
|
416
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration,
|
417
|
+
billing_cycle_day: Integer,
|
418
|
+
created_at: Time,
|
419
|
+
current_billing_period_end_date: T.nilable(Time),
|
420
|
+
current_billing_period_start_date: T.nilable(Time),
|
421
|
+
customer: Orb::Customer,
|
422
|
+
default_invoice_memo: T.nilable(String),
|
423
|
+
discount_intervals:
|
424
|
+
T::Array[
|
344
425
|
T.any(
|
345
426
|
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount,
|
346
427
|
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage,
|
347
428
|
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage
|
348
429
|
)
|
349
430
|
],
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
431
|
+
end_date: T.nilable(Time),
|
432
|
+
fixed_fee_quantity_schedule:
|
433
|
+
T::Array[
|
434
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule
|
435
|
+
],
|
436
|
+
invoicing_threshold: T.nilable(String),
|
437
|
+
maximum_intervals:
|
438
|
+
T::Array[
|
439
|
+
Orb::Models::SubscriptionCancelResponse::MaximumInterval
|
440
|
+
],
|
441
|
+
metadata: T::Hash[Symbol, String],
|
442
|
+
minimum_intervals:
|
443
|
+
T::Array[
|
444
|
+
Orb::Models::SubscriptionCancelResponse::MinimumInterval
|
445
|
+
],
|
446
|
+
net_terms: Integer,
|
447
|
+
pending_subscription_change:
|
448
|
+
T.nilable(
|
449
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange
|
450
|
+
),
|
451
|
+
plan: Orb::Plan,
|
452
|
+
price_intervals:
|
453
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval],
|
454
|
+
redeemed_coupon:
|
455
|
+
T.nilable(
|
456
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon
|
457
|
+
),
|
458
|
+
start_date: Time,
|
459
|
+
status:
|
460
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol,
|
461
|
+
trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo,
|
462
|
+
changed_resources:
|
463
|
+
T.nilable(
|
464
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources
|
465
|
+
)
|
466
|
+
}
|
467
|
+
)
|
468
|
+
end
|
469
|
+
def to_hash
|
367
470
|
end
|
368
|
-
def to_hash; end
|
369
471
|
|
370
472
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
473
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
474
|
+
|
371
475
|
sig { returns(String) }
|
372
476
|
attr_accessor :id
|
373
477
|
|
@@ -399,19 +503,18 @@ module Orb
|
|
399
503
|
sig do
|
400
504
|
params(
|
401
505
|
id: String,
|
402
|
-
adjustment:
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
506
|
+
adjustment:
|
507
|
+
T.any(
|
508
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
|
509
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
|
510
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
|
511
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::OrHash,
|
512
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::OrHash
|
513
|
+
),
|
410
514
|
applies_to_price_interval_ids: T::Array[String],
|
411
515
|
end_date: T.nilable(Time),
|
412
516
|
start_date: Time
|
413
|
-
)
|
414
|
-
.returns(T.attached_class)
|
517
|
+
).returns(T.attached_class)
|
415
518
|
end
|
416
519
|
def self.new(
|
417
520
|
id:,
|
@@ -422,31 +525,47 @@ module Orb
|
|
422
525
|
end_date:,
|
423
526
|
# The start date of the adjustment interval.
|
424
527
|
start_date:
|
425
|
-
)
|
528
|
+
)
|
529
|
+
end
|
530
|
+
|
426
531
|
sig do
|
427
|
-
override
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
532
|
+
override.returns(
|
533
|
+
{
|
534
|
+
id: String,
|
535
|
+
adjustment:
|
536
|
+
T.any(
|
432
537
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
433
538
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
434
539
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
435
540
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum,
|
436
541
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum
|
437
542
|
),
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
543
|
+
applies_to_price_interval_ids: T::Array[String],
|
544
|
+
end_date: T.nilable(Time),
|
545
|
+
start_date: Time
|
546
|
+
}
|
547
|
+
)
|
548
|
+
end
|
549
|
+
def to_hash
|
443
550
|
end
|
444
|
-
def to_hash; end
|
445
551
|
|
446
552
|
module Adjustment
|
447
553
|
extend Orb::Internal::Type::Union
|
448
554
|
|
555
|
+
Variants =
|
556
|
+
T.type_alias do
|
557
|
+
T.any(
|
558
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
559
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
560
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
561
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum,
|
562
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum
|
563
|
+
)
|
564
|
+
end
|
565
|
+
|
449
566
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
567
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
568
|
+
|
450
569
|
sig { returns(String) }
|
451
570
|
attr_accessor :id
|
452
571
|
|
@@ -484,8 +603,7 @@ module Orb
|
|
484
603
|
reason: T.nilable(String),
|
485
604
|
usage_discount: Float,
|
486
605
|
adjustment_type: Symbol
|
487
|
-
)
|
488
|
-
.returns(T.attached_class)
|
606
|
+
).returns(T.attached_class)
|
489
607
|
end
|
490
608
|
def self.new(
|
491
609
|
id:,
|
@@ -502,25 +620,29 @@ module Orb
|
|
502
620
|
# to in a given billing period.
|
503
621
|
usage_discount:,
|
504
622
|
adjustment_type: :usage_discount
|
505
|
-
)
|
623
|
+
)
|
624
|
+
end
|
625
|
+
|
506
626
|
sig do
|
507
|
-
override
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
627
|
+
override.returns(
|
628
|
+
{
|
629
|
+
id: String,
|
630
|
+
adjustment_type: Symbol,
|
631
|
+
applies_to_price_ids: T::Array[String],
|
632
|
+
is_invoice_level: T::Boolean,
|
633
|
+
plan_phase_order: T.nilable(Integer),
|
634
|
+
reason: T.nilable(String),
|
635
|
+
usage_discount: Float
|
636
|
+
}
|
637
|
+
)
|
638
|
+
end
|
639
|
+
def to_hash
|
519
640
|
end
|
520
|
-
def to_hash; end
|
521
641
|
end
|
522
642
|
|
523
643
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
644
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
645
|
+
|
524
646
|
sig { returns(String) }
|
525
647
|
attr_accessor :id
|
526
648
|
|
@@ -558,8 +680,7 @@ module Orb
|
|
558
680
|
plan_phase_order: T.nilable(Integer),
|
559
681
|
reason: T.nilable(String),
|
560
682
|
adjustment_type: Symbol
|
561
|
-
)
|
562
|
-
.returns(T.attached_class)
|
683
|
+
).returns(T.attached_class)
|
563
684
|
end
|
564
685
|
def self.new(
|
565
686
|
id:,
|
@@ -576,25 +697,29 @@ module Orb
|
|
576
697
|
# The reason for the adjustment.
|
577
698
|
reason:,
|
578
699
|
adjustment_type: :amount_discount
|
579
|
-
)
|
700
|
+
)
|
701
|
+
end
|
702
|
+
|
580
703
|
sig do
|
581
|
-
override
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
704
|
+
override.returns(
|
705
|
+
{
|
706
|
+
id: String,
|
707
|
+
adjustment_type: Symbol,
|
708
|
+
amount_discount: String,
|
709
|
+
applies_to_price_ids: T::Array[String],
|
710
|
+
is_invoice_level: T::Boolean,
|
711
|
+
plan_phase_order: T.nilable(Integer),
|
712
|
+
reason: T.nilable(String)
|
713
|
+
}
|
714
|
+
)
|
715
|
+
end
|
716
|
+
def to_hash
|
593
717
|
end
|
594
|
-
def to_hash; end
|
595
718
|
end
|
596
719
|
|
597
720
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
721
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
722
|
+
|
598
723
|
sig { returns(String) }
|
599
724
|
attr_accessor :id
|
600
725
|
|
@@ -632,8 +757,7 @@ module Orb
|
|
632
757
|
plan_phase_order: T.nilable(Integer),
|
633
758
|
reason: T.nilable(String),
|
634
759
|
adjustment_type: Symbol
|
635
|
-
)
|
636
|
-
.returns(T.attached_class)
|
760
|
+
).returns(T.attached_class)
|
637
761
|
end
|
638
762
|
def self.new(
|
639
763
|
id:,
|
@@ -650,25 +774,29 @@ module Orb
|
|
650
774
|
# The reason for the adjustment.
|
651
775
|
reason:,
|
652
776
|
adjustment_type: :percentage_discount
|
653
|
-
)
|
777
|
+
)
|
778
|
+
end
|
779
|
+
|
654
780
|
sig do
|
655
|
-
override
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
781
|
+
override.returns(
|
782
|
+
{
|
783
|
+
id: String,
|
784
|
+
adjustment_type: Symbol,
|
785
|
+
applies_to_price_ids: T::Array[String],
|
786
|
+
is_invoice_level: T::Boolean,
|
787
|
+
percentage_discount: Float,
|
788
|
+
plan_phase_order: T.nilable(Integer),
|
789
|
+
reason: T.nilable(String)
|
790
|
+
}
|
791
|
+
)
|
792
|
+
end
|
793
|
+
def to_hash
|
667
794
|
end
|
668
|
-
def to_hash; end
|
669
795
|
end
|
670
796
|
|
671
797
|
class Minimum < Orb::Internal::Type::BaseModel
|
798
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
799
|
+
|
672
800
|
sig { returns(String) }
|
673
801
|
attr_accessor :id
|
674
802
|
|
@@ -711,8 +839,7 @@ module Orb
|
|
711
839
|
plan_phase_order: T.nilable(Integer),
|
712
840
|
reason: T.nilable(String),
|
713
841
|
adjustment_type: Symbol
|
714
|
-
)
|
715
|
-
.returns(T.attached_class)
|
842
|
+
).returns(T.attached_class)
|
716
843
|
end
|
717
844
|
def self.new(
|
718
845
|
id:,
|
@@ -731,26 +858,30 @@ module Orb
|
|
731
858
|
# The reason for the adjustment.
|
732
859
|
reason:,
|
733
860
|
adjustment_type: :minimum
|
734
|
-
)
|
861
|
+
)
|
862
|
+
end
|
863
|
+
|
735
864
|
sig do
|
736
|
-
override
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
865
|
+
override.returns(
|
866
|
+
{
|
867
|
+
id: String,
|
868
|
+
adjustment_type: Symbol,
|
869
|
+
applies_to_price_ids: T::Array[String],
|
870
|
+
is_invoice_level: T::Boolean,
|
871
|
+
item_id: String,
|
872
|
+
minimum_amount: String,
|
873
|
+
plan_phase_order: T.nilable(Integer),
|
874
|
+
reason: T.nilable(String)
|
875
|
+
}
|
876
|
+
)
|
877
|
+
end
|
878
|
+
def to_hash
|
749
879
|
end
|
750
|
-
def to_hash; end
|
751
880
|
end
|
752
881
|
|
753
882
|
class Maximum < Orb::Internal::Type::BaseModel
|
883
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
884
|
+
|
754
885
|
sig { returns(String) }
|
755
886
|
attr_accessor :id
|
756
887
|
|
@@ -788,8 +919,7 @@ module Orb
|
|
788
919
|
plan_phase_order: T.nilable(Integer),
|
789
920
|
reason: T.nilable(String),
|
790
921
|
adjustment_type: Symbol
|
791
|
-
)
|
792
|
-
.returns(T.attached_class)
|
922
|
+
).returns(T.attached_class)
|
793
923
|
end
|
794
924
|
def self.new(
|
795
925
|
id:,
|
@@ -806,35 +936,41 @@ module Orb
|
|
806
936
|
# The reason for the adjustment.
|
807
937
|
reason:,
|
808
938
|
adjustment_type: :maximum
|
809
|
-
)
|
939
|
+
)
|
940
|
+
end
|
941
|
+
|
810
942
|
sig do
|
811
|
-
override
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
943
|
+
override.returns(
|
944
|
+
{
|
945
|
+
id: String,
|
946
|
+
adjustment_type: Symbol,
|
947
|
+
applies_to_price_ids: T::Array[String],
|
948
|
+
is_invoice_level: T::Boolean,
|
949
|
+
maximum_amount: String,
|
950
|
+
plan_phase_order: T.nilable(Integer),
|
951
|
+
reason: T.nilable(String)
|
952
|
+
}
|
953
|
+
)
|
954
|
+
end
|
955
|
+
def to_hash
|
823
956
|
end
|
824
|
-
def to_hash; end
|
825
957
|
end
|
826
958
|
|
827
959
|
sig do
|
828
|
-
override
|
829
|
-
|
830
|
-
|
831
|
-
|
960
|
+
override.returns(
|
961
|
+
T::Array[
|
962
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Variants
|
963
|
+
]
|
964
|
+
)
|
965
|
+
end
|
966
|
+
def self.variants
|
832
967
|
end
|
833
|
-
def self.variants; end
|
834
968
|
end
|
835
969
|
end
|
836
970
|
|
837
971
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
972
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
973
|
+
|
838
974
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
839
975
|
# number of days in a month is greater than this value, the last day of the month
|
840
976
|
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
@@ -854,7 +990,11 @@ module Orb
|
|
854
990
|
attr_accessor :year
|
855
991
|
|
856
992
|
sig do
|
857
|
-
params(
|
993
|
+
params(
|
994
|
+
day: Integer,
|
995
|
+
month: T.nilable(Integer),
|
996
|
+
year: T.nilable(Integer)
|
997
|
+
).returns(T.attached_class)
|
858
998
|
end
|
859
999
|
def self.new(
|
860
1000
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
@@ -869,15 +1009,37 @@ module Orb
|
|
869
1009
|
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
870
1010
|
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
871
1011
|
year: nil
|
872
|
-
)
|
873
|
-
|
874
|
-
|
1012
|
+
)
|
1013
|
+
end
|
1014
|
+
|
1015
|
+
sig do
|
1016
|
+
override.returns(
|
1017
|
+
{
|
1018
|
+
day: Integer,
|
1019
|
+
month: T.nilable(Integer),
|
1020
|
+
year: T.nilable(Integer)
|
1021
|
+
}
|
1022
|
+
)
|
1023
|
+
end
|
1024
|
+
def to_hash
|
1025
|
+
end
|
875
1026
|
end
|
876
1027
|
|
877
1028
|
module DiscountInterval
|
878
1029
|
extend Orb::Internal::Type::Union
|
879
1030
|
|
1031
|
+
Variants =
|
1032
|
+
T.type_alias do
|
1033
|
+
T.any(
|
1034
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount,
|
1035
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage,
|
1036
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage
|
1037
|
+
)
|
1038
|
+
end
|
1039
|
+
|
880
1040
|
class Amount < Orb::Internal::Type::BaseModel
|
1041
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1042
|
+
|
881
1043
|
# Only available if discount_type is `amount`.
|
882
1044
|
sig { returns(String) }
|
883
1045
|
attr_accessor :amount_discount
|
@@ -909,8 +1071,7 @@ module Orb
|
|
909
1071
|
end_date: T.nilable(Time),
|
910
1072
|
start_date: Time,
|
911
1073
|
discount_type: Symbol
|
912
|
-
)
|
913
|
-
.returns(T.attached_class)
|
1074
|
+
).returns(T.attached_class)
|
914
1075
|
end
|
915
1076
|
def self.new(
|
916
1077
|
# Only available if discount_type is `amount`.
|
@@ -924,24 +1085,28 @@ module Orb
|
|
924
1085
|
# The start date of the discount interval.
|
925
1086
|
start_date:,
|
926
1087
|
discount_type: :amount
|
927
|
-
)
|
1088
|
+
)
|
1089
|
+
end
|
1090
|
+
|
928
1091
|
sig do
|
929
|
-
override
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
1092
|
+
override.returns(
|
1093
|
+
{
|
1094
|
+
amount_discount: String,
|
1095
|
+
applies_to_price_ids: T::Array[String],
|
1096
|
+
applies_to_price_interval_ids: T::Array[String],
|
1097
|
+
discount_type: Symbol,
|
1098
|
+
end_date: T.nilable(Time),
|
1099
|
+
start_date: Time
|
1100
|
+
}
|
1101
|
+
)
|
1102
|
+
end
|
1103
|
+
def to_hash
|
940
1104
|
end
|
941
|
-
def to_hash; end
|
942
1105
|
end
|
943
1106
|
|
944
1107
|
class Percentage < Orb::Internal::Type::BaseModel
|
1108
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1109
|
+
|
945
1110
|
# The price ids that this discount interval applies to.
|
946
1111
|
sig { returns(T::Array[String]) }
|
947
1112
|
attr_accessor :applies_to_price_ids
|
@@ -974,8 +1139,7 @@ module Orb
|
|
974
1139
|
percentage_discount: Float,
|
975
1140
|
start_date: Time,
|
976
1141
|
discount_type: Symbol
|
977
|
-
)
|
978
|
-
.returns(T.attached_class)
|
1142
|
+
).returns(T.attached_class)
|
979
1143
|
end
|
980
1144
|
def self.new(
|
981
1145
|
# The price ids that this discount interval applies to.
|
@@ -990,24 +1154,28 @@ module Orb
|
|
990
1154
|
# The start date of the discount interval.
|
991
1155
|
start_date:,
|
992
1156
|
discount_type: :percentage
|
993
|
-
)
|
1157
|
+
)
|
1158
|
+
end
|
1159
|
+
|
994
1160
|
sig do
|
995
|
-
override
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1161
|
+
override.returns(
|
1162
|
+
{
|
1163
|
+
applies_to_price_ids: T::Array[String],
|
1164
|
+
applies_to_price_interval_ids: T::Array[String],
|
1165
|
+
discount_type: Symbol,
|
1166
|
+
end_date: T.nilable(Time),
|
1167
|
+
percentage_discount: Float,
|
1168
|
+
start_date: Time
|
1169
|
+
}
|
1170
|
+
)
|
1171
|
+
end
|
1172
|
+
def to_hash
|
1006
1173
|
end
|
1007
|
-
def to_hash; end
|
1008
1174
|
end
|
1009
1175
|
|
1010
1176
|
class Usage < Orb::Internal::Type::BaseModel
|
1177
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1178
|
+
|
1011
1179
|
# The price ids that this discount interval applies to.
|
1012
1180
|
sig { returns(T::Array[String]) }
|
1013
1181
|
attr_accessor :applies_to_price_ids
|
@@ -1040,8 +1208,7 @@ module Orb
|
|
1040
1208
|
start_date: Time,
|
1041
1209
|
usage_discount: Float,
|
1042
1210
|
discount_type: Symbol
|
1043
|
-
)
|
1044
|
-
.returns(T.attached_class)
|
1211
|
+
).returns(T.attached_class)
|
1045
1212
|
end
|
1046
1213
|
def self.new(
|
1047
1214
|
# The price ids that this discount interval applies to.
|
@@ -1056,33 +1223,39 @@ module Orb
|
|
1056
1223
|
# discount is for
|
1057
1224
|
usage_discount:,
|
1058
1225
|
discount_type: :usage
|
1059
|
-
)
|
1226
|
+
)
|
1227
|
+
end
|
1228
|
+
|
1060
1229
|
sig do
|
1061
|
-
override
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1230
|
+
override.returns(
|
1231
|
+
{
|
1232
|
+
applies_to_price_ids: T::Array[String],
|
1233
|
+
applies_to_price_interval_ids: T::Array[String],
|
1234
|
+
discount_type: Symbol,
|
1235
|
+
end_date: T.nilable(Time),
|
1236
|
+
start_date: Time,
|
1237
|
+
usage_discount: Float
|
1238
|
+
}
|
1239
|
+
)
|
1240
|
+
end
|
1241
|
+
def to_hash
|
1072
1242
|
end
|
1073
|
-
def to_hash; end
|
1074
1243
|
end
|
1075
1244
|
|
1076
1245
|
sig do
|
1077
|
-
override
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1246
|
+
override.returns(
|
1247
|
+
T::Array[
|
1248
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Variants
|
1249
|
+
]
|
1250
|
+
)
|
1251
|
+
end
|
1252
|
+
def self.variants
|
1081
1253
|
end
|
1082
|
-
def self.variants; end
|
1083
1254
|
end
|
1084
1255
|
|
1085
1256
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
1257
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1258
|
+
|
1086
1259
|
sig { returns(T.nilable(Time)) }
|
1087
1260
|
attr_accessor :end_date
|
1088
1261
|
|
@@ -1096,18 +1269,33 @@ module Orb
|
|
1096
1269
|
attr_accessor :start_date
|
1097
1270
|
|
1098
1271
|
sig do
|
1099
|
-
params(
|
1100
|
-
.
|
1272
|
+
params(
|
1273
|
+
end_date: T.nilable(Time),
|
1274
|
+
price_id: String,
|
1275
|
+
quantity: Float,
|
1276
|
+
start_date: Time
|
1277
|
+
).returns(T.attached_class)
|
1278
|
+
end
|
1279
|
+
def self.new(end_date:, price_id:, quantity:, start_date:)
|
1101
1280
|
end
|
1102
|
-
def self.new(end_date:, price_id:, quantity:, start_date:); end
|
1103
1281
|
|
1104
1282
|
sig do
|
1105
|
-
override.returns(
|
1283
|
+
override.returns(
|
1284
|
+
{
|
1285
|
+
end_date: T.nilable(Time),
|
1286
|
+
price_id: String,
|
1287
|
+
quantity: Float,
|
1288
|
+
start_date: Time
|
1289
|
+
}
|
1290
|
+
)
|
1291
|
+
end
|
1292
|
+
def to_hash
|
1106
1293
|
end
|
1107
|
-
def to_hash; end
|
1108
1294
|
end
|
1109
1295
|
|
1110
1296
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
1297
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1298
|
+
|
1111
1299
|
# The price ids that this maximum interval applies to.
|
1112
1300
|
sig { returns(T::Array[String]) }
|
1113
1301
|
attr_accessor :applies_to_price_ids
|
@@ -1136,8 +1324,7 @@ module Orb
|
|
1136
1324
|
end_date: T.nilable(Time),
|
1137
1325
|
maximum_amount: String,
|
1138
1326
|
start_date: Time
|
1139
|
-
)
|
1140
|
-
.returns(T.attached_class)
|
1327
|
+
).returns(T.attached_class)
|
1141
1328
|
end
|
1142
1329
|
def self.new(
|
1143
1330
|
# The price ids that this maximum interval applies to.
|
@@ -1151,23 +1338,27 @@ module Orb
|
|
1151
1338
|
maximum_amount:,
|
1152
1339
|
# The start date of the maximum interval.
|
1153
1340
|
start_date:
|
1154
|
-
)
|
1341
|
+
)
|
1342
|
+
end
|
1343
|
+
|
1155
1344
|
sig do
|
1156
|
-
override
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1345
|
+
override.returns(
|
1346
|
+
{
|
1347
|
+
applies_to_price_ids: T::Array[String],
|
1348
|
+
applies_to_price_interval_ids: T::Array[String],
|
1349
|
+
end_date: T.nilable(Time),
|
1350
|
+
maximum_amount: String,
|
1351
|
+
start_date: Time
|
1352
|
+
}
|
1353
|
+
)
|
1354
|
+
end
|
1355
|
+
def to_hash
|
1166
1356
|
end
|
1167
|
-
def to_hash; end
|
1168
1357
|
end
|
1169
1358
|
|
1170
1359
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
1360
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1361
|
+
|
1171
1362
|
# The price ids that this minimum interval applies to.
|
1172
1363
|
sig { returns(T::Array[String]) }
|
1173
1364
|
attr_accessor :applies_to_price_ids
|
@@ -1196,8 +1387,7 @@ module Orb
|
|
1196
1387
|
end_date: T.nilable(Time),
|
1197
1388
|
minimum_amount: String,
|
1198
1389
|
start_date: Time
|
1199
|
-
)
|
1200
|
-
.returns(T.attached_class)
|
1390
|
+
).returns(T.attached_class)
|
1201
1391
|
end
|
1202
1392
|
def self.new(
|
1203
1393
|
# The price ids that this minimum interval applies to.
|
@@ -1211,35 +1401,43 @@ module Orb
|
|
1211
1401
|
minimum_amount:,
|
1212
1402
|
# The start date of the minimum interval.
|
1213
1403
|
start_date:
|
1214
|
-
)
|
1404
|
+
)
|
1405
|
+
end
|
1406
|
+
|
1215
1407
|
sig do
|
1216
|
-
override
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1408
|
+
override.returns(
|
1409
|
+
{
|
1410
|
+
applies_to_price_ids: T::Array[String],
|
1411
|
+
applies_to_price_interval_ids: T::Array[String],
|
1412
|
+
end_date: T.nilable(Time),
|
1413
|
+
minimum_amount: String,
|
1414
|
+
start_date: Time
|
1415
|
+
}
|
1416
|
+
)
|
1417
|
+
end
|
1418
|
+
def to_hash
|
1226
1419
|
end
|
1227
|
-
def to_hash; end
|
1228
1420
|
end
|
1229
1421
|
|
1230
1422
|
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1423
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1424
|
+
|
1231
1425
|
sig { returns(String) }
|
1232
1426
|
attr_accessor :id
|
1233
1427
|
|
1234
1428
|
# A pending subscription change if one exists on this subscription.
|
1235
1429
|
sig { params(id: String).returns(T.attached_class) }
|
1236
|
-
def self.new(id:)
|
1430
|
+
def self.new(id:)
|
1431
|
+
end
|
1237
1432
|
|
1238
|
-
sig { override.returns({id: String}) }
|
1239
|
-
def to_hash
|
1433
|
+
sig { override.returns({ id: String }) }
|
1434
|
+
def to_hash
|
1435
|
+
end
|
1240
1436
|
end
|
1241
1437
|
|
1242
1438
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
1439
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1440
|
+
|
1243
1441
|
sig { returns(String) }
|
1244
1442
|
attr_accessor :id
|
1245
1443
|
|
@@ -1272,7 +1470,11 @@ module Orb
|
|
1272
1470
|
# relevant for fixed fees.
|
1273
1471
|
sig do
|
1274
1472
|
returns(
|
1275
|
-
T.nilable(
|
1473
|
+
T.nilable(
|
1474
|
+
T::Array[
|
1475
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition
|
1476
|
+
]
|
1477
|
+
)
|
1276
1478
|
)
|
1277
1479
|
end
|
1278
1480
|
attr_accessor :fixed_fee_quantity_transitions
|
@@ -1290,34 +1492,34 @@ module Orb
|
|
1290
1492
|
sig do
|
1291
1493
|
returns(
|
1292
1494
|
T.any(
|
1293
|
-
Orb::
|
1294
|
-
Orb::
|
1295
|
-
Orb::
|
1296
|
-
Orb::
|
1297
|
-
Orb::
|
1298
|
-
Orb::
|
1299
|
-
Orb::
|
1300
|
-
Orb::
|
1301
|
-
Orb::
|
1302
|
-
Orb::
|
1303
|
-
Orb::
|
1304
|
-
Orb::
|
1305
|
-
Orb::
|
1306
|
-
Orb::
|
1307
|
-
Orb::
|
1308
|
-
Orb::
|
1309
|
-
Orb::
|
1310
|
-
Orb::
|
1311
|
-
Orb::
|
1312
|
-
Orb::
|
1313
|
-
Orb::
|
1314
|
-
Orb::
|
1315
|
-
Orb::
|
1316
|
-
Orb::
|
1317
|
-
Orb::
|
1318
|
-
Orb::
|
1319
|
-
Orb::
|
1320
|
-
Orb::
|
1495
|
+
Orb::Price::Unit,
|
1496
|
+
Orb::Price::Package,
|
1497
|
+
Orb::Price::Matrix,
|
1498
|
+
Orb::Price::Tiered,
|
1499
|
+
Orb::Price::TieredBps,
|
1500
|
+
Orb::Price::Bps,
|
1501
|
+
Orb::Price::BulkBps,
|
1502
|
+
Orb::Price::Bulk,
|
1503
|
+
Orb::Price::ThresholdTotalAmount,
|
1504
|
+
Orb::Price::TieredPackage,
|
1505
|
+
Orb::Price::GroupedTiered,
|
1506
|
+
Orb::Price::TieredWithMinimum,
|
1507
|
+
Orb::Price::TieredPackageWithMinimum,
|
1508
|
+
Orb::Price::PackageWithAllocation,
|
1509
|
+
Orb::Price::UnitWithPercent,
|
1510
|
+
Orb::Price::MatrixWithAllocation,
|
1511
|
+
Orb::Price::TieredWithProration,
|
1512
|
+
Orb::Price::UnitWithProration,
|
1513
|
+
Orb::Price::GroupedAllocation,
|
1514
|
+
Orb::Price::GroupedWithProratedMinimum,
|
1515
|
+
Orb::Price::GroupedWithMeteredMinimum,
|
1516
|
+
Orb::Price::MatrixWithDisplayName,
|
1517
|
+
Orb::Price::BulkWithProration,
|
1518
|
+
Orb::Price::GroupedTieredPackage,
|
1519
|
+
Orb::Price::MaxGroupTieredPackage,
|
1520
|
+
Orb::Price::ScalableMatrixWithUnitPricing,
|
1521
|
+
Orb::Price::ScalableMatrixWithTieredPricing,
|
1522
|
+
Orb::Price::CumulativeGroupedBulk
|
1321
1523
|
)
|
1322
1524
|
)
|
1323
1525
|
end
|
@@ -1344,49 +1546,46 @@ module Orb
|
|
1344
1546
|
current_billing_period_start_date: T.nilable(Time),
|
1345
1547
|
end_date: T.nilable(Time),
|
1346
1548
|
filter: T.nilable(String),
|
1347
|
-
fixed_fee_quantity_transitions:
|
1348
|
-
T
|
1349
|
-
T
|
1350
|
-
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
|
1363
|
-
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
Orb::Models::Price::CumulativeGroupedBulk
|
1385
|
-
),
|
1549
|
+
fixed_fee_quantity_transitions:
|
1550
|
+
T.nilable(
|
1551
|
+
T::Array[
|
1552
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition::OrHash
|
1553
|
+
]
|
1554
|
+
),
|
1555
|
+
price:
|
1556
|
+
T.any(
|
1557
|
+
Orb::Price::Unit::OrHash,
|
1558
|
+
Orb::Price::Package::OrHash,
|
1559
|
+
Orb::Price::Matrix::OrHash,
|
1560
|
+
Orb::Price::Tiered::OrHash,
|
1561
|
+
Orb::Price::TieredBps::OrHash,
|
1562
|
+
Orb::Price::Bps::OrHash,
|
1563
|
+
Orb::Price::BulkBps::OrHash,
|
1564
|
+
Orb::Price::Bulk::OrHash,
|
1565
|
+
Orb::Price::ThresholdTotalAmount::OrHash,
|
1566
|
+
Orb::Price::TieredPackage::OrHash,
|
1567
|
+
Orb::Price::GroupedTiered::OrHash,
|
1568
|
+
Orb::Price::TieredWithMinimum::OrHash,
|
1569
|
+
Orb::Price::TieredPackageWithMinimum::OrHash,
|
1570
|
+
Orb::Price::PackageWithAllocation::OrHash,
|
1571
|
+
Orb::Price::UnitWithPercent::OrHash,
|
1572
|
+
Orb::Price::MatrixWithAllocation::OrHash,
|
1573
|
+
Orb::Price::TieredWithProration::OrHash,
|
1574
|
+
Orb::Price::UnitWithProration::OrHash,
|
1575
|
+
Orb::Price::GroupedAllocation::OrHash,
|
1576
|
+
Orb::Price::GroupedWithProratedMinimum::OrHash,
|
1577
|
+
Orb::Price::GroupedWithMeteredMinimum::OrHash,
|
1578
|
+
Orb::Price::MatrixWithDisplayName::OrHash,
|
1579
|
+
Orb::Price::BulkWithProration::OrHash,
|
1580
|
+
Orb::Price::GroupedTieredPackage::OrHash,
|
1581
|
+
Orb::Price::MaxGroupTieredPackage::OrHash,
|
1582
|
+
Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
|
1583
|
+
Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
|
1584
|
+
Orb::Price::CumulativeGroupedBulk::OrHash
|
1585
|
+
),
|
1386
1586
|
start_date: Time,
|
1387
1587
|
usage_customer_ids: T.nilable(T::Array[String])
|
1388
|
-
)
|
1389
|
-
.returns(T.attached_class)
|
1588
|
+
).returns(T.attached_class)
|
1390
1589
|
end
|
1391
1590
|
def self.new(
|
1392
1591
|
id:,
|
@@ -1425,56 +1624,66 @@ module Orb
|
|
1425
1624
|
# A list of customer IDs whose usage events will be aggregated and billed under
|
1426
1625
|
# this price interval.
|
1427
1626
|
usage_customer_ids:
|
1428
|
-
)
|
1627
|
+
)
|
1628
|
+
end
|
1629
|
+
|
1429
1630
|
sig do
|
1430
|
-
override
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
Orb::Models::Price::Matrix,
|
1444
|
-
Orb::Models::Price::Tiered,
|
1445
|
-
Orb::Models::Price::TieredBps,
|
1446
|
-
Orb::Models::Price::Bps,
|
1447
|
-
Orb::Models::Price::BulkBps,
|
1448
|
-
Orb::Models::Price::Bulk,
|
1449
|
-
Orb::Models::Price::ThresholdTotalAmount,
|
1450
|
-
Orb::Models::Price::TieredPackage,
|
1451
|
-
Orb::Models::Price::GroupedTiered,
|
1452
|
-
Orb::Models::Price::TieredWithMinimum,
|
1453
|
-
Orb::Models::Price::TieredPackageWithMinimum,
|
1454
|
-
Orb::Models::Price::PackageWithAllocation,
|
1455
|
-
Orb::Models::Price::UnitWithPercent,
|
1456
|
-
Orb::Models::Price::MatrixWithAllocation,
|
1457
|
-
Orb::Models::Price::TieredWithProration,
|
1458
|
-
Orb::Models::Price::UnitWithProration,
|
1459
|
-
Orb::Models::Price::GroupedAllocation,
|
1460
|
-
Orb::Models::Price::GroupedWithProratedMinimum,
|
1461
|
-
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1462
|
-
Orb::Models::Price::MatrixWithDisplayName,
|
1463
|
-
Orb::Models::Price::BulkWithProration,
|
1464
|
-
Orb::Models::Price::GroupedTieredPackage,
|
1465
|
-
Orb::Models::Price::MaxGroupTieredPackage,
|
1466
|
-
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1467
|
-
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1468
|
-
Orb::Models::Price::CumulativeGroupedBulk
|
1631
|
+
override.returns(
|
1632
|
+
{
|
1633
|
+
id: String,
|
1634
|
+
billing_cycle_day: Integer,
|
1635
|
+
current_billing_period_end_date: T.nilable(Time),
|
1636
|
+
current_billing_period_start_date: T.nilable(Time),
|
1637
|
+
end_date: T.nilable(Time),
|
1638
|
+
filter: T.nilable(String),
|
1639
|
+
fixed_fee_quantity_transitions:
|
1640
|
+
T.nilable(
|
1641
|
+
T::Array[
|
1642
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition
|
1643
|
+
]
|
1469
1644
|
),
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1645
|
+
price:
|
1646
|
+
T.any(
|
1647
|
+
Orb::Price::Unit,
|
1648
|
+
Orb::Price::Package,
|
1649
|
+
Orb::Price::Matrix,
|
1650
|
+
Orb::Price::Tiered,
|
1651
|
+
Orb::Price::TieredBps,
|
1652
|
+
Orb::Price::Bps,
|
1653
|
+
Orb::Price::BulkBps,
|
1654
|
+
Orb::Price::Bulk,
|
1655
|
+
Orb::Price::ThresholdTotalAmount,
|
1656
|
+
Orb::Price::TieredPackage,
|
1657
|
+
Orb::Price::GroupedTiered,
|
1658
|
+
Orb::Price::TieredWithMinimum,
|
1659
|
+
Orb::Price::TieredPackageWithMinimum,
|
1660
|
+
Orb::Price::PackageWithAllocation,
|
1661
|
+
Orb::Price::UnitWithPercent,
|
1662
|
+
Orb::Price::MatrixWithAllocation,
|
1663
|
+
Orb::Price::TieredWithProration,
|
1664
|
+
Orb::Price::UnitWithProration,
|
1665
|
+
Orb::Price::GroupedAllocation,
|
1666
|
+
Orb::Price::GroupedWithProratedMinimum,
|
1667
|
+
Orb::Price::GroupedWithMeteredMinimum,
|
1668
|
+
Orb::Price::MatrixWithDisplayName,
|
1669
|
+
Orb::Price::BulkWithProration,
|
1670
|
+
Orb::Price::GroupedTieredPackage,
|
1671
|
+
Orb::Price::MaxGroupTieredPackage,
|
1672
|
+
Orb::Price::ScalableMatrixWithUnitPricing,
|
1673
|
+
Orb::Price::ScalableMatrixWithTieredPricing,
|
1674
|
+
Orb::Price::CumulativeGroupedBulk
|
1675
|
+
),
|
1676
|
+
start_date: Time,
|
1677
|
+
usage_customer_ids: T.nilable(T::Array[String])
|
1678
|
+
}
|
1679
|
+
)
|
1680
|
+
end
|
1681
|
+
def to_hash
|
1474
1682
|
end
|
1475
|
-
def to_hash; end
|
1476
1683
|
|
1477
1684
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1685
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1686
|
+
|
1478
1687
|
sig { returns(Time) }
|
1479
1688
|
attr_accessor :effective_date
|
1480
1689
|
|
@@ -1484,15 +1693,29 @@ module Orb
|
|
1484
1693
|
sig { returns(Integer) }
|
1485
1694
|
attr_accessor :quantity
|
1486
1695
|
|
1487
|
-
sig
|
1488
|
-
|
1696
|
+
sig do
|
1697
|
+
params(
|
1698
|
+
effective_date: Time,
|
1699
|
+
price_id: String,
|
1700
|
+
quantity: Integer
|
1701
|
+
).returns(T.attached_class)
|
1702
|
+
end
|
1703
|
+
def self.new(effective_date:, price_id:, quantity:)
|
1704
|
+
end
|
1489
1705
|
|
1490
|
-
sig
|
1491
|
-
|
1706
|
+
sig do
|
1707
|
+
override.returns(
|
1708
|
+
{ effective_date: Time, price_id: String, quantity: Integer }
|
1709
|
+
)
|
1710
|
+
end
|
1711
|
+
def to_hash
|
1712
|
+
end
|
1492
1713
|
end
|
1493
1714
|
end
|
1494
1715
|
|
1495
1716
|
class RedeemedCoupon < Orb::Internal::Type::BaseModel
|
1717
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1718
|
+
|
1496
1719
|
sig { returns(String) }
|
1497
1720
|
attr_accessor :coupon_id
|
1498
1721
|
|
@@ -1503,54 +1726,92 @@ module Orb
|
|
1503
1726
|
attr_accessor :start_date
|
1504
1727
|
|
1505
1728
|
sig do
|
1506
|
-
params(
|
1729
|
+
params(
|
1730
|
+
coupon_id: String,
|
1731
|
+
end_date: T.nilable(Time),
|
1732
|
+
start_date: Time
|
1733
|
+
).returns(T.attached_class)
|
1734
|
+
end
|
1735
|
+
def self.new(coupon_id:, end_date:, start_date:)
|
1507
1736
|
end
|
1508
|
-
def self.new(coupon_id:, end_date:, start_date:); end
|
1509
1737
|
|
1510
|
-
sig
|
1511
|
-
|
1738
|
+
sig do
|
1739
|
+
override.returns(
|
1740
|
+
{ coupon_id: String, end_date: T.nilable(Time), start_date: Time }
|
1741
|
+
)
|
1742
|
+
end
|
1743
|
+
def to_hash
|
1744
|
+
end
|
1512
1745
|
end
|
1513
1746
|
|
1514
1747
|
module Status
|
1515
1748
|
extend Orb::Internal::Type::Enum
|
1516
1749
|
|
1517
|
-
TaggedSymbol =
|
1750
|
+
TaggedSymbol =
|
1751
|
+
T.type_alias do
|
1752
|
+
T.all(Symbol, Orb::Models::SubscriptionCancelResponse::Status)
|
1753
|
+
end
|
1518
1754
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1519
1755
|
|
1520
|
-
ACTIVE =
|
1521
|
-
|
1522
|
-
|
1756
|
+
ACTIVE =
|
1757
|
+
T.let(
|
1758
|
+
:active,
|
1759
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1760
|
+
)
|
1761
|
+
ENDED =
|
1762
|
+
T.let(
|
1763
|
+
:ended,
|
1764
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1765
|
+
)
|
1766
|
+
UPCOMING =
|
1767
|
+
T.let(
|
1768
|
+
:upcoming,
|
1769
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1770
|
+
)
|
1523
1771
|
|
1524
|
-
sig
|
1525
|
-
|
1772
|
+
sig do
|
1773
|
+
override.returns(
|
1774
|
+
T::Array[
|
1775
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1776
|
+
]
|
1777
|
+
)
|
1778
|
+
end
|
1779
|
+
def self.values
|
1780
|
+
end
|
1526
1781
|
end
|
1527
1782
|
|
1528
1783
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
1784
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1785
|
+
|
1529
1786
|
sig { returns(T.nilable(Time)) }
|
1530
1787
|
attr_accessor :end_date
|
1531
1788
|
|
1532
1789
|
sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
|
1533
|
-
def self.new(end_date:)
|
1790
|
+
def self.new(end_date:)
|
1791
|
+
end
|
1534
1792
|
|
1535
|
-
sig { override.returns({end_date: T.nilable(Time)}) }
|
1536
|
-
def to_hash
|
1793
|
+
sig { override.returns({ end_date: T.nilable(Time) }) }
|
1794
|
+
def to_hash
|
1795
|
+
end
|
1537
1796
|
end
|
1538
1797
|
|
1539
1798
|
class ChangedResources < Orb::Internal::Type::BaseModel
|
1799
|
+
OrHash = T.type_alias { T.any(T.self_type, Orb::Internal::AnyHash) }
|
1800
|
+
|
1540
1801
|
# The credit notes that were created as part of this operation.
|
1541
|
-
sig { returns(T::Array[Orb::
|
1802
|
+
sig { returns(T::Array[Orb::CreditNote]) }
|
1542
1803
|
attr_accessor :created_credit_notes
|
1543
1804
|
|
1544
1805
|
# The invoices that were created as part of this operation.
|
1545
|
-
sig { returns(T::Array[Orb::
|
1806
|
+
sig { returns(T::Array[Orb::Invoice]) }
|
1546
1807
|
attr_accessor :created_invoices
|
1547
1808
|
|
1548
1809
|
# The credit notes that were voided as part of this operation.
|
1549
|
-
sig { returns(T::Array[Orb::
|
1810
|
+
sig { returns(T::Array[Orb::CreditNote]) }
|
1550
1811
|
attr_accessor :voided_credit_notes
|
1551
1812
|
|
1552
1813
|
# The invoices that were voided as part of this operation.
|
1553
|
-
sig { returns(T::Array[Orb::
|
1814
|
+
sig { returns(T::Array[Orb::Invoice]) }
|
1554
1815
|
attr_accessor :voided_invoices
|
1555
1816
|
|
1556
1817
|
# The resources that were changed as part of this operation. Only present when
|
@@ -1558,12 +1819,11 @@ module Orb
|
|
1558
1819
|
# `include_changed_resources` parameter was passed in the request.
|
1559
1820
|
sig do
|
1560
1821
|
params(
|
1561
|
-
created_credit_notes: T::Array[
|
1562
|
-
created_invoices: T::Array[
|
1563
|
-
voided_credit_notes: T::Array[
|
1564
|
-
voided_invoices: T::Array[
|
1565
|
-
)
|
1566
|
-
.returns(T.attached_class)
|
1822
|
+
created_credit_notes: T::Array[Orb::CreditNote::OrHash],
|
1823
|
+
created_invoices: T::Array[Orb::Invoice::OrHash],
|
1824
|
+
voided_credit_notes: T::Array[Orb::CreditNote::OrHash],
|
1825
|
+
voided_invoices: T::Array[Orb::Invoice::OrHash]
|
1826
|
+
).returns(T.attached_class)
|
1567
1827
|
end
|
1568
1828
|
def self.new(
|
1569
1829
|
# The credit notes that were created as part of this operation.
|
@@ -1574,19 +1834,21 @@ module Orb
|
|
1574
1834
|
voided_credit_notes:,
|
1575
1835
|
# The invoices that were voided as part of this operation.
|
1576
1836
|
voided_invoices:
|
1577
|
-
)
|
1837
|
+
)
|
1838
|
+
end
|
1839
|
+
|
1578
1840
|
sig do
|
1579
|
-
override
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1841
|
+
override.returns(
|
1842
|
+
{
|
1843
|
+
created_credit_notes: T::Array[Orb::CreditNote],
|
1844
|
+
created_invoices: T::Array[Orb::Invoice],
|
1845
|
+
voided_credit_notes: T::Array[Orb::CreditNote],
|
1846
|
+
voided_invoices: T::Array[Orb::Invoice]
|
1847
|
+
}
|
1848
|
+
)
|
1849
|
+
end
|
1850
|
+
def to_hash
|
1588
1851
|
end
|
1589
|
-
def to_hash; end
|
1590
1852
|
end
|
1591
1853
|
end
|
1592
1854
|
end
|