orb-billing 0.3.1 → 0.4.0
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 +35 -0
- data/README.md +3 -3
- data/lib/orb/errors.rb +1 -1
- data/lib/orb/file_part.rb +2 -2
- data/lib/orb/internal/transport/base_client.rb +74 -5
- data/lib/orb/internal/transport/pooled_net_requester.rb +14 -0
- data/lib/orb/internal/type/array_of.rb +1 -1
- data/lib/orb/internal/type/base_model.rb +62 -30
- data/lib/orb/internal/type/converter.rb +18 -0
- data/lib/orb/internal/type/enum.rb +4 -3
- data/lib/orb/internal/type/hash_of.rb +1 -1
- data/lib/orb/internal/type/request_parameters.rb +4 -4
- data/lib/orb/internal/type/union.rb +5 -4
- data/lib/orb/internal/util.rb +57 -1
- data/lib/orb/internal.rb +6 -0
- 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 +13 -12
- data/lib/orb/models/coupon_create_params.rb +12 -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 +50 -53
- data/lib/orb/models/customer_list_params.rb +0 -1
- data/lib/orb/models/customer_update_by_external_id_params.rb +50 -53
- data/lib/orb/models/customer_update_params.rb +50 -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 +14 -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 +14 -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 +14 -7
- data/lib/orb/models/customers/credits/ledger_list_params.rb +8 -9
- data/lib/orb/models/customers/credits/ledger_list_response.rb +14 -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 +11 -5
- data/lib/orb/models/evaluate_price_group.rb +5 -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 +179 -202
- data/lib/orb/models/invoice_create_params.rb +14 -21
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +31 -54
- data/lib/orb/models/invoice_issue_params.rb +0 -1
- data/lib/orb/models/invoice_level_discount.rb +8 -4
- data/lib/orb/models/invoice_line_item_create_params.rb +0 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +28 -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 +90 -103
- data/lib/orb/models/plan_create_params.rb +759 -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 +1706 -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 +108 -122
- data/lib/orb/models/subscription_cancel_params.rb +3 -5
- data/lib/orb/models/subscription_cancel_response.rb +43 -57
- data/lib/orb/models/subscription_change_apply_response.rb +43 -58
- data/lib/orb/models/subscription_change_cancel_response.rb +43 -58
- data/lib/orb/models/subscription_change_retrieve_response.rb +43 -58
- data/lib/orb/models/subscription_create_params.rb +1953 -1815
- data/lib/orb/models/subscription_create_response.rb +43 -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 +1194 -1017
- data/lib/orb/models/subscription_price_intervals_response.rb +43 -57
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +1994 -1791
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +43 -57
- data/lib/orb/models/subscription_trigger_phase_params.rb +0 -2
- data/lib/orb/models/subscription_trigger_phase_response.rb +43 -57
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +43 -57
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +43 -57
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +43 -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 +43 -57
- data/lib/orb/models/subscription_update_params.rb +0 -5
- data/lib/orb/models/subscription_update_trial_params.rb +8 -6
- data/lib/orb/models/subscription_update_trial_response.rb +43 -57
- data/lib/orb/models/subscription_usage.rb +55 -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/models.rb +24 -0
- data/lib/orb/request_options.rb +4 -0
- 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 +3 -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 +20 -6
- data/rbi/orb/internal/transport/base_client.rbi +159 -78
- data/rbi/orb/internal/transport/pooled_net_requester.rbi +27 -13
- data/rbi/orb/internal/type/array_of.rbi +42 -34
- data/rbi/orb/internal/type/base_model.rbi +144 -69
- data/rbi/orb/internal/type/base_page.rbi +12 -8
- data/rbi/orb/internal/type/boolean.rbi +16 -10
- data/rbi/orb/internal/type/converter.rbi +68 -31
- data/rbi/orb/internal/type/enum.rbi +28 -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 +61 -25
- data/rbi/orb/internal/type/unknown.rbi +20 -12
- data/rbi/orb/internal/util.rbi +232 -90
- data/rbi/orb/internal.rbi +2 -0
- data/rbi/orb/models/alert.rbi +114 -70
- data/rbi/orb/models/alert_create_for_customer_params.rbi +69 -27
- data/rbi/orb/models/alert_create_for_external_customer_params.rbi +80 -29
- data/rbi/orb/models/alert_create_for_subscription_params.rbi +62 -26
- data/rbi/orb/models/alert_disable_params.rbi +18 -6
- data/rbi/orb/models/alert_enable_params.rbi +18 -6
- data/rbi/orb/models/alert_list_params.rbi +24 -20
- data/rbi/orb/models/alert_retrieve_params.rbi +11 -4
- data/rbi/orb/models/alert_update_params.rbi +29 -14
- data/rbi/orb/models/amount_discount.rbi +29 -19
- data/rbi/orb/models/billable_metric.rbi +34 -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 +11 -4
- data/rbi/orb/models/coupon_create_params.rbi +85 -38
- data/rbi/orb/models/coupon_fetch_params.rbi +11 -4
- data/rbi/orb/models/coupon_list_params.rbi +19 -15
- data/rbi/orb/models/coupons/subscription_list_params.rbi +19 -6
- data/rbi/orb/models/credit_note.rbi +329 -158
- data/rbi/orb/models/credit_note_create_params.rbi +64 -29
- data/rbi/orb/models/credit_note_fetch_params.rbi +13 -4
- data/rbi/orb/models/credit_note_list_params.rbi +23 -17
- data/rbi/orb/models/customer.rbi +461 -329
- data/rbi/orb/models/customer_create_params.rbi +713 -325
- data/rbi/orb/models/customer_delete_params.rbi +13 -4
- data/rbi/orb/models/customer_fetch_by_external_id_params.rbi +13 -4
- data/rbi/orb/models/customer_fetch_params.rbi +11 -4
- data/rbi/orb/models/customer_list_params.rbi +21 -17
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +16 -4
- data/rbi/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +16 -4
- data/rbi/orb/models/customer_update_by_external_id_params.rbi +1193 -336
- data/rbi/orb/models/customer_update_params.rbi +712 -324
- data/rbi/orb/models/customers/balance_transaction_create_params.rbi +56 -21
- data/rbi/orb/models/customers/balance_transaction_create_response.rbi +172 -61
- data/rbi/orb/models/customers/balance_transaction_list_params.rbi +26 -17
- data/rbi/orb/models/customers/balance_transaction_list_response.rbi +182 -59
- data/rbi/orb/models/customers/cost_list_by_external_id_params.rbi +62 -22
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +180 -124
- data/rbi/orb/models/customers/cost_list_params.rbi +48 -22
- data/rbi/orb/models/customers/cost_list_response.rbi +172 -123
- data/rbi/orb/models/customers/credit_list_by_external_id_params.rbi +24 -15
- data/rbi/orb/models/customers/credit_list_by_external_id_response.rbi +54 -22
- data/rbi/orb/models/customers/credit_list_params.rbi +21 -15
- data/rbi/orb/models/customers/credit_list_response.rbi +50 -21
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +118 -68
- data/rbi/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +755 -434
- data/rbi/orb/models/customers/credits/ledger_create_entry_params.rbi +129 -59
- data/rbi/orb/models/customers/credits/ledger_create_entry_response.rbi +812 -425
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +108 -44
- data/rbi/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +793 -432
- data/rbi/orb/models/customers/credits/ledger_list_params.rbi +129 -40
- data/rbi/orb/models/customers/credits/ledger_list_response.rbi +847 -389
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +86 -53
- data/rbi/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +77 -48
- data/rbi/orb/models/customers/credits/top_up_create_params.rbi +96 -45
- data/rbi/orb/models/customers/credits/top_up_create_response.rbi +95 -43
- data/rbi/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +22 -6
- data/rbi/orb/models/customers/credits/top_up_delete_params.rbi +21 -5
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +15 -5
- data/rbi/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +82 -49
- data/rbi/orb/models/customers/credits/top_up_list_params.rbi +15 -5
- data/rbi/orb/models/customers/credits/top_up_list_response.rbi +96 -43
- data/rbi/orb/models/dimensional_price_group.rbi +21 -15
- data/rbi/orb/models/dimensional_price_group_create_params.rbi +22 -16
- data/rbi/orb/models/dimensional_price_group_list_params.rbi +19 -6
- data/rbi/orb/models/dimensional_price_group_retrieve_params.rbi +16 -4
- data/rbi/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +15 -8
- data/rbi/orb/models/dimensional_price_groups.rbi +21 -13
- data/rbi/orb/models/discount.rbi +11 -5
- data/rbi/orb/models/evaluate_price_group.rbi +29 -12
- data/rbi/orb/models/event_deprecate_params.rbi +13 -4
- data/rbi/orb/models/event_deprecate_response.rbi +11 -3
- data/rbi/orb/models/event_ingest_params.rbi +41 -31
- data/rbi/orb/models/event_ingest_response.rbi +78 -23
- data/rbi/orb/models/event_search_params.rbi +18 -14
- data/rbi/orb/models/event_search_response.rbi +42 -21
- data/rbi/orb/models/event_update_params.rbi +20 -16
- data/rbi/orb/models/event_update_response.rbi +11 -3
- data/rbi/orb/models/events/backfill_close_params.rbi +13 -9
- data/rbi/orb/models/events/backfill_close_response.rbi +70 -29
- data/rbi/orb/models/events/backfill_create_params.rbi +24 -18
- data/rbi/orb/models/events/backfill_create_response.rbi +69 -29
- data/rbi/orb/models/events/backfill_fetch_params.rbi +13 -9
- data/rbi/orb/models/events/backfill_fetch_response.rbi +70 -29
- data/rbi/orb/models/events/backfill_list_params.rbi +19 -6
- data/rbi/orb/models/events/backfill_list_response.rbi +68 -28
- data/rbi/orb/models/events/backfill_revert_params.rbi +13 -9
- data/rbi/orb/models/events/backfill_revert_response.rbi +69 -29
- data/rbi/orb/models/events/event_volumes.rbi +38 -10
- data/rbi/orb/models/events/volume_list_params.rbi +21 -15
- data/rbi/orb/models/invoice.rbi +1411 -805
- data/rbi/orb/models/invoice_create_params.rbi +107 -69
- data/rbi/orb/models/invoice_fetch_params.rbi +11 -4
- data/rbi/orb/models/invoice_fetch_upcoming_params.rbi +18 -5
- data/rbi/orb/models/invoice_fetch_upcoming_response.rbi +2187 -876
- data/rbi/orb/models/invoice_issue_params.rbi +17 -5
- data/rbi/orb/models/invoice_level_discount.rbi +11 -4
- data/rbi/orb/models/invoice_line_item_create_params.rbi +23 -17
- data/rbi/orb/models/invoice_line_item_create_response.rbi +675 -376
- data/rbi/orb/models/invoice_list_params.rbi +68 -47
- data/rbi/orb/models/invoice_mark_paid_params.rbi +20 -14
- data/rbi/orb/models/invoice_pay_params.rbi +11 -4
- data/rbi/orb/models/invoice_update_params.rbi +16 -10
- data/rbi/orb/models/invoice_void_params.rbi +11 -4
- data/rbi/orb/models/item.rbi +90 -39
- data/rbi/orb/models/item_create_params.rbi +15 -5
- data/rbi/orb/models/item_fetch_params.rbi +11 -4
- data/rbi/orb/models/item_list_params.rbi +17 -6
- data/rbi/orb/models/item_update_params.rbi +86 -39
- data/rbi/orb/models/metric_create_params.rbi +20 -16
- data/rbi/orb/models/metric_fetch_params.rbi +11 -4
- data/rbi/orb/models/metric_list_params.rbi +21 -17
- data/rbi/orb/models/metric_update_params.rbi +16 -10
- data/rbi/orb/models/pagination_metadata.rbi +17 -4
- data/rbi/orb/models/percentage_discount.rbi +33 -19
- data/rbi/orb/models/plan.rbi +532 -365
- data/rbi/orb/models/plan_create_params.rbi +5295 -2870
- data/rbi/orb/models/plan_fetch_params.rbi +11 -4
- data/rbi/orb/models/plan_list_params.rbi +35 -27
- data/rbi/orb/models/plan_update_params.rbi +17 -13
- data/rbi/orb/models/plans/external_plan_id_fetch_params.rbi +13 -9
- data/rbi/orb/models/plans/external_plan_id_update_params.rbi +22 -13
- data/rbi/orb/models/price.rbi +11332 -5033
- data/rbi/orb/models/price_create_params.rbi +583 -245
- data/rbi/orb/models/price_evaluate_params.rbi +21 -17
- data/rbi/orb/models/price_evaluate_response.rbi +14 -6
- data/rbi/orb/models/price_fetch_params.rbi +11 -4
- data/rbi/orb/models/price_list_params.rbi +17 -6
- data/rbi/orb/models/price_update_params.rbi +16 -10
- data/rbi/orb/models/prices/external_price_id_fetch_params.rbi +15 -8
- data/rbi/orb/models/prices/external_price_id_update_params.rbi +21 -10
- data/rbi/orb/models/subscription.rbi +668 -420
- data/rbi/orb/models/subscription_cancel_params.rbi +47 -22
- data/rbi/orb/models/subscription_cancel_response.rbi +817 -438
- data/rbi/orb/models/subscription_change_apply_params.rbi +19 -13
- data/rbi/orb/models/subscription_change_apply_response.rbi +906 -505
- data/rbi/orb/models/subscription_change_cancel_params.rbi +13 -4
- data/rbi/orb/models/subscription_change_cancel_response.rbi +906 -516
- data/rbi/orb/models/subscription_change_retrieve_params.rbi +13 -4
- data/rbi/orb/models/subscription_change_retrieve_response.rbi +903 -524
- data/rbi/orb/models/subscription_create_params.rbi +10096 -6746
- data/rbi/orb/models/subscription_create_response.rbi +817 -438
- data/rbi/orb/models/subscription_fetch_costs_params.rbi +50 -22
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +172 -123
- data/rbi/orb/models/subscription_fetch_params.rbi +13 -4
- data/rbi/orb/models/subscription_fetch_schedule_params.rbi +23 -17
- data/rbi/orb/models/subscription_fetch_schedule_response.rbi +45 -19
- data/rbi/orb/models/subscription_fetch_usage_params.rbi +84 -34
- data/rbi/orb/models/subscription_list_params.rbi +42 -28
- data/rbi/orb/models/subscription_price_intervals_params.rbi +5798 -3823
- data/rbi/orb/models/subscription_price_intervals_response.rbi +840 -453
- data/rbi/orb/models/subscription_schedule_plan_change_params.rbi +9676 -6922
- data/rbi/orb/models/subscription_schedule_plan_change_response.rbi +838 -467
- data/rbi/orb/models/subscription_trigger_phase_params.rbi +19 -13
- data/rbi/orb/models/subscription_trigger_phase_response.rbi +832 -448
- data/rbi/orb/models/subscription_unschedule_cancellation_params.rbi +16 -4
- data/rbi/orb/models/subscription_unschedule_cancellation_response.rbi +839 -467
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +22 -5
- data/rbi/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +815 -504
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +16 -4
- data/rbi/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +828 -497
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_params.rbi +63 -26
- data/rbi/orb/models/subscription_update_fixed_fee_quantity_response.rbi +839 -467
- data/rbi/orb/models/subscription_update_params.rbi +22 -16
- data/rbi/orb/models/subscription_update_trial_params.rbi +60 -19
- data/rbi/orb/models/subscription_update_trial_response.rbi +832 -447
- data/rbi/orb/models/subscription_usage.rbi +325 -121
- data/rbi/orb/models/subscriptions.rbi +19 -11
- data/rbi/orb/models/top_level_ping_params.rbi +11 -4
- data/rbi/orb/models/top_level_ping_response.rbi +10 -3
- data/rbi/orb/models/trial_discount.rbi +30 -20
- data/rbi/orb/models/usage_discount.rbi +29 -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/transport/base_client.rbs +16 -1
- data/sig/orb/internal/transport/pooled_net_requester.rbs +2 -0
- data/sig/orb/internal/type/base_model.rbs +11 -5
- data/sig/orb/internal/type/base_page.rbs +1 -1
- data/sig/orb/internal/type/converter.rbs +2 -0
- data/sig/orb/internal/type/enum.rbs +1 -0
- data/sig/orb/internal/type/request_parameters.rbs +3 -1
- data/sig/orb/internal/type/union.rbs +1 -0
- data/sig/orb/internal/util.rbs +13 -0
- data/sig/orb/internal.rbs +2 -0
- 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,11 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class SubscriptionCancelResponse < Orb::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(Orb::Models::SubscriptionCancelResponse, Orb::Internal::AnyHash)
|
9
|
+
end
|
10
|
+
|
6
11
|
sig { returns(String) }
|
7
12
|
attr_accessor :id
|
8
13
|
|
@@ -13,7 +18,11 @@ module Orb
|
|
13
18
|
|
14
19
|
# The adjustment intervals for this subscription sorted by the start_date of the
|
15
20
|
# adjustment interval.
|
16
|
-
sig
|
21
|
+
sig do
|
22
|
+
returns(
|
23
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::AdjustmentInterval]
|
24
|
+
)
|
25
|
+
end
|
17
26
|
attr_accessor :adjustment_intervals
|
18
27
|
|
19
28
|
# Determines whether issued invoices for this subscription will automatically be
|
@@ -22,14 +31,18 @@ module Orb
|
|
22
31
|
sig { returns(T.nilable(T::Boolean)) }
|
23
32
|
attr_accessor :auto_collection
|
24
33
|
|
25
|
-
sig
|
34
|
+
sig do
|
35
|
+
returns(
|
36
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration
|
37
|
+
)
|
38
|
+
end
|
26
39
|
attr_reader :billing_cycle_anchor_configuration
|
27
40
|
|
28
41
|
sig do
|
29
42
|
params(
|
30
|
-
billing_cycle_anchor_configuration:
|
31
|
-
|
32
|
-
|
43
|
+
billing_cycle_anchor_configuration:
|
44
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration::OrHash
|
45
|
+
).void
|
33
46
|
end
|
34
47
|
attr_writer :billing_cycle_anchor_configuration
|
35
48
|
|
@@ -73,10 +86,10 @@ module Orb
|
|
73
86
|
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
74
87
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
75
88
|
# information on what this timezone parameter influences within Orb.
|
76
|
-
sig { returns(Orb::
|
89
|
+
sig { returns(Orb::Customer) }
|
77
90
|
attr_reader :customer
|
78
91
|
|
79
|
-
sig { params(customer:
|
92
|
+
sig { params(customer: Orb::Customer::OrHash).void }
|
80
93
|
attr_writer :customer
|
81
94
|
|
82
95
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -102,14 +115,24 @@ module Orb
|
|
102
115
|
sig { returns(T.nilable(Time)) }
|
103
116
|
attr_accessor :end_date
|
104
117
|
|
105
|
-
sig
|
118
|
+
sig do
|
119
|
+
returns(
|
120
|
+
T::Array[
|
121
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule
|
122
|
+
]
|
123
|
+
)
|
124
|
+
end
|
106
125
|
attr_accessor :fixed_fee_quantity_schedule
|
107
126
|
|
108
127
|
sig { returns(T.nilable(String)) }
|
109
128
|
attr_accessor :invoicing_threshold
|
110
129
|
|
111
130
|
# The maximum intervals for this subscription sorted by the start_date.
|
112
|
-
sig
|
131
|
+
sig do
|
132
|
+
returns(
|
133
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::MaximumInterval]
|
134
|
+
)
|
135
|
+
end
|
113
136
|
attr_accessor :maximum_intervals
|
114
137
|
|
115
138
|
# User specified key-value pairs for the resource. If not present, this defaults
|
@@ -120,7 +143,11 @@ module Orb
|
|
120
143
|
attr_accessor :metadata
|
121
144
|
|
122
145
|
# The minimum intervals for this subscription sorted by the start_date.
|
123
|
-
sig
|
146
|
+
sig do
|
147
|
+
returns(
|
148
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::MinimumInterval]
|
149
|
+
)
|
150
|
+
end
|
124
151
|
attr_accessor :minimum_intervals
|
125
152
|
|
126
153
|
# Determines the difference between the invoice issue date for subscription
|
@@ -131,16 +158,22 @@ module Orb
|
|
131
158
|
attr_accessor :net_terms
|
132
159
|
|
133
160
|
# A pending subscription change if one exists on this subscription.
|
134
|
-
sig
|
161
|
+
sig do
|
162
|
+
returns(
|
163
|
+
T.nilable(
|
164
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange
|
165
|
+
)
|
166
|
+
)
|
167
|
+
end
|
135
168
|
attr_reader :pending_subscription_change
|
136
169
|
|
137
170
|
sig do
|
138
171
|
params(
|
139
|
-
pending_subscription_change:
|
140
|
-
T.
|
141
|
-
|
142
|
-
|
143
|
-
|
172
|
+
pending_subscription_change:
|
173
|
+
T.nilable(
|
174
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange::OrHash
|
175
|
+
)
|
176
|
+
).void
|
144
177
|
end
|
145
178
|
attr_writer :pending_subscription_change
|
146
179
|
|
@@ -148,24 +181,34 @@ module Orb
|
|
148
181
|
# subscribed to by a customer. Plans define the billing behavior of the
|
149
182
|
# subscription. You can see more about how to configure prices in the
|
150
183
|
# [Price resource](/reference/price).
|
151
|
-
sig { returns(Orb::
|
184
|
+
sig { returns(Orb::Plan) }
|
152
185
|
attr_reader :plan
|
153
186
|
|
154
|
-
sig { params(plan:
|
187
|
+
sig { params(plan: Orb::Plan::OrHash).void }
|
155
188
|
attr_writer :plan
|
156
189
|
|
157
190
|
# The price intervals for this subscription.
|
158
|
-
sig
|
191
|
+
sig do
|
192
|
+
returns(
|
193
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval]
|
194
|
+
)
|
195
|
+
end
|
159
196
|
attr_accessor :price_intervals
|
160
197
|
|
161
|
-
sig
|
198
|
+
sig do
|
199
|
+
returns(
|
200
|
+
T.nilable(Orb::Models::SubscriptionCancelResponse::RedeemedCoupon)
|
201
|
+
)
|
202
|
+
end
|
162
203
|
attr_reader :redeemed_coupon
|
163
204
|
|
164
205
|
sig do
|
165
206
|
params(
|
166
|
-
redeemed_coupon:
|
167
|
-
|
168
|
-
|
207
|
+
redeemed_coupon:
|
208
|
+
T.nilable(
|
209
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon::OrHash
|
210
|
+
)
|
211
|
+
).void
|
169
212
|
end
|
170
213
|
attr_writer :redeemed_coupon
|
171
214
|
|
@@ -173,26 +216,38 @@ module Orb
|
|
173
216
|
sig { returns(Time) }
|
174
217
|
attr_accessor :start_date
|
175
218
|
|
176
|
-
sig
|
219
|
+
sig do
|
220
|
+
returns(Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol)
|
221
|
+
end
|
177
222
|
attr_accessor :status
|
178
223
|
|
179
224
|
sig { returns(Orb::Models::SubscriptionCancelResponse::TrialInfo) }
|
180
225
|
attr_reader :trial_info
|
181
226
|
|
182
|
-
sig
|
227
|
+
sig do
|
228
|
+
params(
|
229
|
+
trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo::OrHash
|
230
|
+
).void
|
231
|
+
end
|
183
232
|
attr_writer :trial_info
|
184
233
|
|
185
234
|
# The resources that were changed as part of this operation. Only present when
|
186
235
|
# fetched through the subscription changes API or if the
|
187
236
|
# `include_changed_resources` parameter was passed in the request.
|
188
|
-
sig
|
237
|
+
sig do
|
238
|
+
returns(
|
239
|
+
T.nilable(Orb::Models::SubscriptionCancelResponse::ChangedResources)
|
240
|
+
)
|
241
|
+
end
|
189
242
|
attr_reader :changed_resources
|
190
243
|
|
191
244
|
sig do
|
192
245
|
params(
|
193
|
-
changed_resources:
|
194
|
-
|
195
|
-
|
246
|
+
changed_resources:
|
247
|
+
T.nilable(
|
248
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources::OrHash
|
249
|
+
)
|
250
|
+
).void
|
196
251
|
end
|
197
252
|
attr_writer :changed_resources
|
198
253
|
|
@@ -200,42 +255,65 @@ module Orb
|
|
200
255
|
params(
|
201
256
|
id: String,
|
202
257
|
active_plan_phase_order: T.nilable(Integer),
|
203
|
-
adjustment_intervals:
|
258
|
+
adjustment_intervals:
|
259
|
+
T::Array[
|
260
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::OrHash
|
261
|
+
],
|
204
262
|
auto_collection: T.nilable(T::Boolean),
|
205
|
-
billing_cycle_anchor_configuration:
|
263
|
+
billing_cycle_anchor_configuration:
|
264
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration::OrHash,
|
206
265
|
billing_cycle_day: Integer,
|
207
266
|
created_at: Time,
|
208
267
|
current_billing_period_end_date: T.nilable(Time),
|
209
268
|
current_billing_period_start_date: T.nilable(Time),
|
210
|
-
customer:
|
269
|
+
customer: Orb::Customer::OrHash,
|
211
270
|
default_invoice_memo: T.nilable(String),
|
212
|
-
discount_intervals:
|
213
|
-
T
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
271
|
+
discount_intervals:
|
272
|
+
T::Array[
|
273
|
+
T.any(
|
274
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount::OrHash,
|
275
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage::OrHash,
|
276
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage::OrHash
|
277
|
+
)
|
278
|
+
],
|
220
279
|
end_date: T.nilable(Time),
|
221
|
-
fixed_fee_quantity_schedule:
|
280
|
+
fixed_fee_quantity_schedule:
|
281
|
+
T::Array[
|
282
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule::OrHash
|
283
|
+
],
|
222
284
|
invoicing_threshold: T.nilable(String),
|
223
|
-
maximum_intervals:
|
285
|
+
maximum_intervals:
|
286
|
+
T::Array[
|
287
|
+
Orb::Models::SubscriptionCancelResponse::MaximumInterval::OrHash
|
288
|
+
],
|
224
289
|
metadata: T::Hash[Symbol, String],
|
225
|
-
minimum_intervals:
|
290
|
+
minimum_intervals:
|
291
|
+
T::Array[
|
292
|
+
Orb::Models::SubscriptionCancelResponse::MinimumInterval::OrHash
|
293
|
+
],
|
226
294
|
net_terms: Integer,
|
227
|
-
pending_subscription_change:
|
228
|
-
T.
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
295
|
+
pending_subscription_change:
|
296
|
+
T.nilable(
|
297
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange::OrHash
|
298
|
+
),
|
299
|
+
plan: Orb::Plan::OrHash,
|
300
|
+
price_intervals:
|
301
|
+
T::Array[
|
302
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::OrHash
|
303
|
+
],
|
304
|
+
redeemed_coupon:
|
305
|
+
T.nilable(
|
306
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon::OrHash
|
307
|
+
),
|
233
308
|
start_date: Time,
|
234
309
|
status: Orb::Models::SubscriptionCancelResponse::Status::OrSymbol,
|
235
|
-
trial_info:
|
236
|
-
|
237
|
-
|
238
|
-
|
310
|
+
trial_info:
|
311
|
+
Orb::Models::SubscriptionCancelResponse::TrialInfo::OrHash,
|
312
|
+
changed_resources:
|
313
|
+
T.nilable(
|
314
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources::OrHash
|
315
|
+
)
|
316
|
+
).returns(T.attached_class)
|
239
317
|
end
|
240
318
|
def self.new(
|
241
319
|
id:,
|
@@ -324,50 +402,85 @@ module Orb
|
|
324
402
|
# fetched through the subscription changes API or if the
|
325
403
|
# `include_changed_resources` parameter was passed in the request.
|
326
404
|
changed_resources: nil
|
327
|
-
)
|
405
|
+
)
|
406
|
+
end
|
407
|
+
|
328
408
|
sig do
|
329
|
-
override
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
409
|
+
override.returns(
|
410
|
+
{
|
411
|
+
id: String,
|
412
|
+
active_plan_phase_order: T.nilable(Integer),
|
413
|
+
adjustment_intervals:
|
414
|
+
T::Array[
|
415
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval
|
416
|
+
],
|
417
|
+
auto_collection: T.nilable(T::Boolean),
|
418
|
+
billing_cycle_anchor_configuration:
|
419
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration,
|
420
|
+
billing_cycle_day: Integer,
|
421
|
+
created_at: Time,
|
422
|
+
current_billing_period_end_date: T.nilable(Time),
|
423
|
+
current_billing_period_start_date: T.nilable(Time),
|
424
|
+
customer: Orb::Customer,
|
425
|
+
default_invoice_memo: T.nilable(String),
|
426
|
+
discount_intervals:
|
427
|
+
T::Array[
|
344
428
|
T.any(
|
345
429
|
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount,
|
346
430
|
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage,
|
347
431
|
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage
|
348
432
|
)
|
349
433
|
],
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
434
|
+
end_date: T.nilable(Time),
|
435
|
+
fixed_fee_quantity_schedule:
|
436
|
+
T::Array[
|
437
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule
|
438
|
+
],
|
439
|
+
invoicing_threshold: T.nilable(String),
|
440
|
+
maximum_intervals:
|
441
|
+
T::Array[
|
442
|
+
Orb::Models::SubscriptionCancelResponse::MaximumInterval
|
443
|
+
],
|
444
|
+
metadata: T::Hash[Symbol, String],
|
445
|
+
minimum_intervals:
|
446
|
+
T::Array[
|
447
|
+
Orb::Models::SubscriptionCancelResponse::MinimumInterval
|
448
|
+
],
|
449
|
+
net_terms: Integer,
|
450
|
+
pending_subscription_change:
|
451
|
+
T.nilable(
|
452
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange
|
453
|
+
),
|
454
|
+
plan: Orb::Plan,
|
455
|
+
price_intervals:
|
456
|
+
T::Array[Orb::Models::SubscriptionCancelResponse::PriceInterval],
|
457
|
+
redeemed_coupon:
|
458
|
+
T.nilable(
|
459
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon
|
460
|
+
),
|
461
|
+
start_date: Time,
|
462
|
+
status:
|
463
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol,
|
464
|
+
trial_info: Orb::Models::SubscriptionCancelResponse::TrialInfo,
|
465
|
+
changed_resources:
|
466
|
+
T.nilable(
|
467
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources
|
468
|
+
)
|
469
|
+
}
|
470
|
+
)
|
471
|
+
end
|
472
|
+
def to_hash
|
367
473
|
end
|
368
|
-
def to_hash; end
|
369
474
|
|
370
475
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
476
|
+
OrHash =
|
477
|
+
T.type_alias do
|
478
|
+
T.any(
|
479
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval,
|
480
|
+
Orb::Internal::AnyHash
|
481
|
+
)
|
482
|
+
end
|
483
|
+
|
371
484
|
sig { returns(String) }
|
372
485
|
attr_accessor :id
|
373
486
|
|
@@ -399,19 +512,18 @@ module Orb
|
|
399
512
|
sig do
|
400
513
|
params(
|
401
514
|
id: String,
|
402
|
-
adjustment:
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
515
|
+
adjustment:
|
516
|
+
T.any(
|
517
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
|
518
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
|
519
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
|
520
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum::OrHash,
|
521
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum::OrHash
|
522
|
+
),
|
410
523
|
applies_to_price_interval_ids: T::Array[String],
|
411
524
|
end_date: T.nilable(Time),
|
412
525
|
start_date: Time
|
413
|
-
)
|
414
|
-
.returns(T.attached_class)
|
526
|
+
).returns(T.attached_class)
|
415
527
|
end
|
416
528
|
def self.new(
|
417
529
|
id:,
|
@@ -422,31 +534,53 @@ module Orb
|
|
422
534
|
end_date:,
|
423
535
|
# The start date of the adjustment interval.
|
424
536
|
start_date:
|
425
|
-
)
|
537
|
+
)
|
538
|
+
end
|
539
|
+
|
426
540
|
sig do
|
427
|
-
override
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
541
|
+
override.returns(
|
542
|
+
{
|
543
|
+
id: String,
|
544
|
+
adjustment:
|
545
|
+
T.any(
|
432
546
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
433
547
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
434
548
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
435
549
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum,
|
436
550
|
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum
|
437
551
|
),
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
552
|
+
applies_to_price_interval_ids: T::Array[String],
|
553
|
+
end_date: T.nilable(Time),
|
554
|
+
start_date: Time
|
555
|
+
}
|
556
|
+
)
|
557
|
+
end
|
558
|
+
def to_hash
|
443
559
|
end
|
444
|
-
def to_hash; end
|
445
560
|
|
446
561
|
module Adjustment
|
447
562
|
extend Orb::Internal::Type::Union
|
448
563
|
|
564
|
+
Variants =
|
565
|
+
T.type_alias do
|
566
|
+
T.any(
|
567
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
568
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
569
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
570
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum,
|
571
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum
|
572
|
+
)
|
573
|
+
end
|
574
|
+
|
449
575
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
576
|
+
OrHash =
|
577
|
+
T.type_alias do
|
578
|
+
T.any(
|
579
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
580
|
+
Orb::Internal::AnyHash
|
581
|
+
)
|
582
|
+
end
|
583
|
+
|
450
584
|
sig { returns(String) }
|
451
585
|
attr_accessor :id
|
452
586
|
|
@@ -484,8 +618,7 @@ module Orb
|
|
484
618
|
reason: T.nilable(String),
|
485
619
|
usage_discount: Float,
|
486
620
|
adjustment_type: Symbol
|
487
|
-
)
|
488
|
-
.returns(T.attached_class)
|
621
|
+
).returns(T.attached_class)
|
489
622
|
end
|
490
623
|
def self.new(
|
491
624
|
id:,
|
@@ -502,25 +635,35 @@ module Orb
|
|
502
635
|
# to in a given billing period.
|
503
636
|
usage_discount:,
|
504
637
|
adjustment_type: :usage_discount
|
505
|
-
)
|
638
|
+
)
|
639
|
+
end
|
640
|
+
|
506
641
|
sig do
|
507
|
-
override
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
642
|
+
override.returns(
|
643
|
+
{
|
644
|
+
id: String,
|
645
|
+
adjustment_type: Symbol,
|
646
|
+
applies_to_price_ids: T::Array[String],
|
647
|
+
is_invoice_level: T::Boolean,
|
648
|
+
plan_phase_order: T.nilable(Integer),
|
649
|
+
reason: T.nilable(String),
|
650
|
+
usage_discount: Float
|
651
|
+
}
|
652
|
+
)
|
653
|
+
end
|
654
|
+
def to_hash
|
519
655
|
end
|
520
|
-
def to_hash; end
|
521
656
|
end
|
522
657
|
|
523
658
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
659
|
+
OrHash =
|
660
|
+
T.type_alias do
|
661
|
+
T.any(
|
662
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
663
|
+
Orb::Internal::AnyHash
|
664
|
+
)
|
665
|
+
end
|
666
|
+
|
524
667
|
sig { returns(String) }
|
525
668
|
attr_accessor :id
|
526
669
|
|
@@ -558,8 +701,7 @@ module Orb
|
|
558
701
|
plan_phase_order: T.nilable(Integer),
|
559
702
|
reason: T.nilable(String),
|
560
703
|
adjustment_type: Symbol
|
561
|
-
)
|
562
|
-
.returns(T.attached_class)
|
704
|
+
).returns(T.attached_class)
|
563
705
|
end
|
564
706
|
def self.new(
|
565
707
|
id:,
|
@@ -576,25 +718,35 @@ module Orb
|
|
576
718
|
# The reason for the adjustment.
|
577
719
|
reason:,
|
578
720
|
adjustment_type: :amount_discount
|
579
|
-
)
|
721
|
+
)
|
722
|
+
end
|
723
|
+
|
580
724
|
sig do
|
581
|
-
override
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
725
|
+
override.returns(
|
726
|
+
{
|
727
|
+
id: String,
|
728
|
+
adjustment_type: Symbol,
|
729
|
+
amount_discount: String,
|
730
|
+
applies_to_price_ids: T::Array[String],
|
731
|
+
is_invoice_level: T::Boolean,
|
732
|
+
plan_phase_order: T.nilable(Integer),
|
733
|
+
reason: T.nilable(String)
|
734
|
+
}
|
735
|
+
)
|
736
|
+
end
|
737
|
+
def to_hash
|
593
738
|
end
|
594
|
-
def to_hash; end
|
595
739
|
end
|
596
740
|
|
597
741
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
742
|
+
OrHash =
|
743
|
+
T.type_alias do
|
744
|
+
T.any(
|
745
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
746
|
+
Orb::Internal::AnyHash
|
747
|
+
)
|
748
|
+
end
|
749
|
+
|
598
750
|
sig { returns(String) }
|
599
751
|
attr_accessor :id
|
600
752
|
|
@@ -632,8 +784,7 @@ module Orb
|
|
632
784
|
plan_phase_order: T.nilable(Integer),
|
633
785
|
reason: T.nilable(String),
|
634
786
|
adjustment_type: Symbol
|
635
|
-
)
|
636
|
-
.returns(T.attached_class)
|
787
|
+
).returns(T.attached_class)
|
637
788
|
end
|
638
789
|
def self.new(
|
639
790
|
id:,
|
@@ -650,25 +801,35 @@ module Orb
|
|
650
801
|
# The reason for the adjustment.
|
651
802
|
reason:,
|
652
803
|
adjustment_type: :percentage_discount
|
653
|
-
)
|
804
|
+
)
|
805
|
+
end
|
806
|
+
|
654
807
|
sig do
|
655
|
-
override
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
808
|
+
override.returns(
|
809
|
+
{
|
810
|
+
id: String,
|
811
|
+
adjustment_type: Symbol,
|
812
|
+
applies_to_price_ids: T::Array[String],
|
813
|
+
is_invoice_level: T::Boolean,
|
814
|
+
percentage_discount: Float,
|
815
|
+
plan_phase_order: T.nilable(Integer),
|
816
|
+
reason: T.nilable(String)
|
817
|
+
}
|
818
|
+
)
|
819
|
+
end
|
820
|
+
def to_hash
|
667
821
|
end
|
668
|
-
def to_hash; end
|
669
822
|
end
|
670
823
|
|
671
824
|
class Minimum < Orb::Internal::Type::BaseModel
|
825
|
+
OrHash =
|
826
|
+
T.type_alias do
|
827
|
+
T.any(
|
828
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Minimum,
|
829
|
+
Orb::Internal::AnyHash
|
830
|
+
)
|
831
|
+
end
|
832
|
+
|
672
833
|
sig { returns(String) }
|
673
834
|
attr_accessor :id
|
674
835
|
|
@@ -711,8 +872,7 @@ module Orb
|
|
711
872
|
plan_phase_order: T.nilable(Integer),
|
712
873
|
reason: T.nilable(String),
|
713
874
|
adjustment_type: Symbol
|
714
|
-
)
|
715
|
-
.returns(T.attached_class)
|
875
|
+
).returns(T.attached_class)
|
716
876
|
end
|
717
877
|
def self.new(
|
718
878
|
id:,
|
@@ -731,26 +891,36 @@ module Orb
|
|
731
891
|
# The reason for the adjustment.
|
732
892
|
reason:,
|
733
893
|
adjustment_type: :minimum
|
734
|
-
)
|
894
|
+
)
|
895
|
+
end
|
896
|
+
|
735
897
|
sig do
|
736
|
-
override
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
898
|
+
override.returns(
|
899
|
+
{
|
900
|
+
id: String,
|
901
|
+
adjustment_type: Symbol,
|
902
|
+
applies_to_price_ids: T::Array[String],
|
903
|
+
is_invoice_level: T::Boolean,
|
904
|
+
item_id: String,
|
905
|
+
minimum_amount: String,
|
906
|
+
plan_phase_order: T.nilable(Integer),
|
907
|
+
reason: T.nilable(String)
|
908
|
+
}
|
909
|
+
)
|
910
|
+
end
|
911
|
+
def to_hash
|
749
912
|
end
|
750
|
-
def to_hash; end
|
751
913
|
end
|
752
914
|
|
753
915
|
class Maximum < Orb::Internal::Type::BaseModel
|
916
|
+
OrHash =
|
917
|
+
T.type_alias do
|
918
|
+
T.any(
|
919
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Maximum,
|
920
|
+
Orb::Internal::AnyHash
|
921
|
+
)
|
922
|
+
end
|
923
|
+
|
754
924
|
sig { returns(String) }
|
755
925
|
attr_accessor :id
|
756
926
|
|
@@ -788,8 +958,7 @@ module Orb
|
|
788
958
|
plan_phase_order: T.nilable(Integer),
|
789
959
|
reason: T.nilable(String),
|
790
960
|
adjustment_type: Symbol
|
791
|
-
)
|
792
|
-
.returns(T.attached_class)
|
961
|
+
).returns(T.attached_class)
|
793
962
|
end
|
794
963
|
def self.new(
|
795
964
|
id:,
|
@@ -806,35 +975,47 @@ module Orb
|
|
806
975
|
# The reason for the adjustment.
|
807
976
|
reason:,
|
808
977
|
adjustment_type: :maximum
|
809
|
-
)
|
978
|
+
)
|
979
|
+
end
|
980
|
+
|
810
981
|
sig do
|
811
|
-
override
|
812
|
-
|
813
|
-
|
814
|
-
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
982
|
+
override.returns(
|
983
|
+
{
|
984
|
+
id: String,
|
985
|
+
adjustment_type: Symbol,
|
986
|
+
applies_to_price_ids: T::Array[String],
|
987
|
+
is_invoice_level: T::Boolean,
|
988
|
+
maximum_amount: String,
|
989
|
+
plan_phase_order: T.nilable(Integer),
|
990
|
+
reason: T.nilable(String)
|
991
|
+
}
|
992
|
+
)
|
993
|
+
end
|
994
|
+
def to_hash
|
823
995
|
end
|
824
|
-
def to_hash; end
|
825
996
|
end
|
826
997
|
|
827
998
|
sig do
|
828
|
-
override
|
829
|
-
|
830
|
-
|
831
|
-
|
999
|
+
override.returns(
|
1000
|
+
T::Array[
|
1001
|
+
Orb::Models::SubscriptionCancelResponse::AdjustmentInterval::Adjustment::Variants
|
1002
|
+
]
|
1003
|
+
)
|
1004
|
+
end
|
1005
|
+
def self.variants
|
832
1006
|
end
|
833
|
-
def self.variants; end
|
834
1007
|
end
|
835
1008
|
end
|
836
1009
|
|
837
1010
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
1011
|
+
OrHash =
|
1012
|
+
T.type_alias do
|
1013
|
+
T.any(
|
1014
|
+
Orb::Models::SubscriptionCancelResponse::BillingCycleAnchorConfiguration,
|
1015
|
+
Orb::Internal::AnyHash
|
1016
|
+
)
|
1017
|
+
end
|
1018
|
+
|
838
1019
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
839
1020
|
# number of days in a month is greater than this value, the last day of the month
|
840
1021
|
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
@@ -854,7 +1035,11 @@ module Orb
|
|
854
1035
|
attr_accessor :year
|
855
1036
|
|
856
1037
|
sig do
|
857
|
-
params(
|
1038
|
+
params(
|
1039
|
+
day: Integer,
|
1040
|
+
month: T.nilable(Integer),
|
1041
|
+
year: T.nilable(Integer)
|
1042
|
+
).returns(T.attached_class)
|
858
1043
|
end
|
859
1044
|
def self.new(
|
860
1045
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
@@ -869,15 +1054,43 @@ module Orb
|
|
869
1054
|
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
870
1055
|
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
871
1056
|
year: nil
|
872
|
-
)
|
873
|
-
|
874
|
-
|
1057
|
+
)
|
1058
|
+
end
|
1059
|
+
|
1060
|
+
sig do
|
1061
|
+
override.returns(
|
1062
|
+
{
|
1063
|
+
day: Integer,
|
1064
|
+
month: T.nilable(Integer),
|
1065
|
+
year: T.nilable(Integer)
|
1066
|
+
}
|
1067
|
+
)
|
1068
|
+
end
|
1069
|
+
def to_hash
|
1070
|
+
end
|
875
1071
|
end
|
876
1072
|
|
877
1073
|
module DiscountInterval
|
878
1074
|
extend Orb::Internal::Type::Union
|
879
1075
|
|
1076
|
+
Variants =
|
1077
|
+
T.type_alias do
|
1078
|
+
T.any(
|
1079
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount,
|
1080
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage,
|
1081
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage
|
1082
|
+
)
|
1083
|
+
end
|
1084
|
+
|
880
1085
|
class Amount < Orb::Internal::Type::BaseModel
|
1086
|
+
OrHash =
|
1087
|
+
T.type_alias do
|
1088
|
+
T.any(
|
1089
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Amount,
|
1090
|
+
Orb::Internal::AnyHash
|
1091
|
+
)
|
1092
|
+
end
|
1093
|
+
|
881
1094
|
# Only available if discount_type is `amount`.
|
882
1095
|
sig { returns(String) }
|
883
1096
|
attr_accessor :amount_discount
|
@@ -909,8 +1122,7 @@ module Orb
|
|
909
1122
|
end_date: T.nilable(Time),
|
910
1123
|
start_date: Time,
|
911
1124
|
discount_type: Symbol
|
912
|
-
)
|
913
|
-
.returns(T.attached_class)
|
1125
|
+
).returns(T.attached_class)
|
914
1126
|
end
|
915
1127
|
def self.new(
|
916
1128
|
# Only available if discount_type is `amount`.
|
@@ -924,24 +1136,34 @@ module Orb
|
|
924
1136
|
# The start date of the discount interval.
|
925
1137
|
start_date:,
|
926
1138
|
discount_type: :amount
|
927
|
-
)
|
1139
|
+
)
|
1140
|
+
end
|
1141
|
+
|
928
1142
|
sig do
|
929
|
-
override
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
936
|
-
|
937
|
-
|
938
|
-
|
939
|
-
|
1143
|
+
override.returns(
|
1144
|
+
{
|
1145
|
+
amount_discount: String,
|
1146
|
+
applies_to_price_ids: T::Array[String],
|
1147
|
+
applies_to_price_interval_ids: T::Array[String],
|
1148
|
+
discount_type: Symbol,
|
1149
|
+
end_date: T.nilable(Time),
|
1150
|
+
start_date: Time
|
1151
|
+
}
|
1152
|
+
)
|
1153
|
+
end
|
1154
|
+
def to_hash
|
940
1155
|
end
|
941
|
-
def to_hash; end
|
942
1156
|
end
|
943
1157
|
|
944
1158
|
class Percentage < Orb::Internal::Type::BaseModel
|
1159
|
+
OrHash =
|
1160
|
+
T.type_alias do
|
1161
|
+
T.any(
|
1162
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Percentage,
|
1163
|
+
Orb::Internal::AnyHash
|
1164
|
+
)
|
1165
|
+
end
|
1166
|
+
|
945
1167
|
# The price ids that this discount interval applies to.
|
946
1168
|
sig { returns(T::Array[String]) }
|
947
1169
|
attr_accessor :applies_to_price_ids
|
@@ -974,8 +1196,7 @@ module Orb
|
|
974
1196
|
percentage_discount: Float,
|
975
1197
|
start_date: Time,
|
976
1198
|
discount_type: Symbol
|
977
|
-
)
|
978
|
-
.returns(T.attached_class)
|
1199
|
+
).returns(T.attached_class)
|
979
1200
|
end
|
980
1201
|
def self.new(
|
981
1202
|
# The price ids that this discount interval applies to.
|
@@ -990,24 +1211,34 @@ module Orb
|
|
990
1211
|
# The start date of the discount interval.
|
991
1212
|
start_date:,
|
992
1213
|
discount_type: :percentage
|
993
|
-
)
|
1214
|
+
)
|
1215
|
+
end
|
1216
|
+
|
994
1217
|
sig do
|
995
|
-
override
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1218
|
+
override.returns(
|
1219
|
+
{
|
1220
|
+
applies_to_price_ids: T::Array[String],
|
1221
|
+
applies_to_price_interval_ids: T::Array[String],
|
1222
|
+
discount_type: Symbol,
|
1223
|
+
end_date: T.nilable(Time),
|
1224
|
+
percentage_discount: Float,
|
1225
|
+
start_date: Time
|
1226
|
+
}
|
1227
|
+
)
|
1228
|
+
end
|
1229
|
+
def to_hash
|
1006
1230
|
end
|
1007
|
-
def to_hash; end
|
1008
1231
|
end
|
1009
1232
|
|
1010
1233
|
class Usage < Orb::Internal::Type::BaseModel
|
1234
|
+
OrHash =
|
1235
|
+
T.type_alias do
|
1236
|
+
T.any(
|
1237
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Usage,
|
1238
|
+
Orb::Internal::AnyHash
|
1239
|
+
)
|
1240
|
+
end
|
1241
|
+
|
1011
1242
|
# The price ids that this discount interval applies to.
|
1012
1243
|
sig { returns(T::Array[String]) }
|
1013
1244
|
attr_accessor :applies_to_price_ids
|
@@ -1040,8 +1271,7 @@ module Orb
|
|
1040
1271
|
start_date: Time,
|
1041
1272
|
usage_discount: Float,
|
1042
1273
|
discount_type: Symbol
|
1043
|
-
)
|
1044
|
-
.returns(T.attached_class)
|
1274
|
+
).returns(T.attached_class)
|
1045
1275
|
end
|
1046
1276
|
def self.new(
|
1047
1277
|
# The price ids that this discount interval applies to.
|
@@ -1056,33 +1286,45 @@ module Orb
|
|
1056
1286
|
# discount is for
|
1057
1287
|
usage_discount:,
|
1058
1288
|
discount_type: :usage
|
1059
|
-
)
|
1289
|
+
)
|
1290
|
+
end
|
1291
|
+
|
1060
1292
|
sig do
|
1061
|
-
override
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
1071
|
-
|
1293
|
+
override.returns(
|
1294
|
+
{
|
1295
|
+
applies_to_price_ids: T::Array[String],
|
1296
|
+
applies_to_price_interval_ids: T::Array[String],
|
1297
|
+
discount_type: Symbol,
|
1298
|
+
end_date: T.nilable(Time),
|
1299
|
+
start_date: Time,
|
1300
|
+
usage_discount: Float
|
1301
|
+
}
|
1302
|
+
)
|
1303
|
+
end
|
1304
|
+
def to_hash
|
1072
1305
|
end
|
1073
|
-
def to_hash; end
|
1074
1306
|
end
|
1075
1307
|
|
1076
1308
|
sig do
|
1077
|
-
override
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1309
|
+
override.returns(
|
1310
|
+
T::Array[
|
1311
|
+
Orb::Models::SubscriptionCancelResponse::DiscountInterval::Variants
|
1312
|
+
]
|
1313
|
+
)
|
1314
|
+
end
|
1315
|
+
def self.variants
|
1081
1316
|
end
|
1082
|
-
def self.variants; end
|
1083
1317
|
end
|
1084
1318
|
|
1085
1319
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
1320
|
+
OrHash =
|
1321
|
+
T.type_alias do
|
1322
|
+
T.any(
|
1323
|
+
Orb::Models::SubscriptionCancelResponse::FixedFeeQuantitySchedule,
|
1324
|
+
Orb::Internal::AnyHash
|
1325
|
+
)
|
1326
|
+
end
|
1327
|
+
|
1086
1328
|
sig { returns(T.nilable(Time)) }
|
1087
1329
|
attr_accessor :end_date
|
1088
1330
|
|
@@ -1096,18 +1338,39 @@ module Orb
|
|
1096
1338
|
attr_accessor :start_date
|
1097
1339
|
|
1098
1340
|
sig do
|
1099
|
-
params(
|
1100
|
-
.
|
1341
|
+
params(
|
1342
|
+
end_date: T.nilable(Time),
|
1343
|
+
price_id: String,
|
1344
|
+
quantity: Float,
|
1345
|
+
start_date: Time
|
1346
|
+
).returns(T.attached_class)
|
1347
|
+
end
|
1348
|
+
def self.new(end_date:, price_id:, quantity:, start_date:)
|
1101
1349
|
end
|
1102
|
-
def self.new(end_date:, price_id:, quantity:, start_date:); end
|
1103
1350
|
|
1104
1351
|
sig do
|
1105
|
-
override.returns(
|
1352
|
+
override.returns(
|
1353
|
+
{
|
1354
|
+
end_date: T.nilable(Time),
|
1355
|
+
price_id: String,
|
1356
|
+
quantity: Float,
|
1357
|
+
start_date: Time
|
1358
|
+
}
|
1359
|
+
)
|
1360
|
+
end
|
1361
|
+
def to_hash
|
1106
1362
|
end
|
1107
|
-
def to_hash; end
|
1108
1363
|
end
|
1109
1364
|
|
1110
1365
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
1366
|
+
OrHash =
|
1367
|
+
T.type_alias do
|
1368
|
+
T.any(
|
1369
|
+
Orb::Models::SubscriptionCancelResponse::MaximumInterval,
|
1370
|
+
Orb::Internal::AnyHash
|
1371
|
+
)
|
1372
|
+
end
|
1373
|
+
|
1111
1374
|
# The price ids that this maximum interval applies to.
|
1112
1375
|
sig { returns(T::Array[String]) }
|
1113
1376
|
attr_accessor :applies_to_price_ids
|
@@ -1136,8 +1399,7 @@ module Orb
|
|
1136
1399
|
end_date: T.nilable(Time),
|
1137
1400
|
maximum_amount: String,
|
1138
1401
|
start_date: Time
|
1139
|
-
)
|
1140
|
-
.returns(T.attached_class)
|
1402
|
+
).returns(T.attached_class)
|
1141
1403
|
end
|
1142
1404
|
def self.new(
|
1143
1405
|
# The price ids that this maximum interval applies to.
|
@@ -1151,23 +1413,33 @@ module Orb
|
|
1151
1413
|
maximum_amount:,
|
1152
1414
|
# The start date of the maximum interval.
|
1153
1415
|
start_date:
|
1154
|
-
)
|
1416
|
+
)
|
1417
|
+
end
|
1418
|
+
|
1155
1419
|
sig do
|
1156
|
-
override
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1420
|
+
override.returns(
|
1421
|
+
{
|
1422
|
+
applies_to_price_ids: T::Array[String],
|
1423
|
+
applies_to_price_interval_ids: T::Array[String],
|
1424
|
+
end_date: T.nilable(Time),
|
1425
|
+
maximum_amount: String,
|
1426
|
+
start_date: Time
|
1427
|
+
}
|
1428
|
+
)
|
1429
|
+
end
|
1430
|
+
def to_hash
|
1166
1431
|
end
|
1167
|
-
def to_hash; end
|
1168
1432
|
end
|
1169
1433
|
|
1170
1434
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
1435
|
+
OrHash =
|
1436
|
+
T.type_alias do
|
1437
|
+
T.any(
|
1438
|
+
Orb::Models::SubscriptionCancelResponse::MinimumInterval,
|
1439
|
+
Orb::Internal::AnyHash
|
1440
|
+
)
|
1441
|
+
end
|
1442
|
+
|
1171
1443
|
# The price ids that this minimum interval applies to.
|
1172
1444
|
sig { returns(T::Array[String]) }
|
1173
1445
|
attr_accessor :applies_to_price_ids
|
@@ -1196,8 +1468,7 @@ module Orb
|
|
1196
1468
|
end_date: T.nilable(Time),
|
1197
1469
|
minimum_amount: String,
|
1198
1470
|
start_date: Time
|
1199
|
-
)
|
1200
|
-
.returns(T.attached_class)
|
1471
|
+
).returns(T.attached_class)
|
1201
1472
|
end
|
1202
1473
|
def self.new(
|
1203
1474
|
# The price ids that this minimum interval applies to.
|
@@ -1211,35 +1482,55 @@ module Orb
|
|
1211
1482
|
minimum_amount:,
|
1212
1483
|
# The start date of the minimum interval.
|
1213
1484
|
start_date:
|
1214
|
-
)
|
1485
|
+
)
|
1486
|
+
end
|
1487
|
+
|
1215
1488
|
sig do
|
1216
|
-
override
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1489
|
+
override.returns(
|
1490
|
+
{
|
1491
|
+
applies_to_price_ids: T::Array[String],
|
1492
|
+
applies_to_price_interval_ids: T::Array[String],
|
1493
|
+
end_date: T.nilable(Time),
|
1494
|
+
minimum_amount: String,
|
1495
|
+
start_date: Time
|
1496
|
+
}
|
1497
|
+
)
|
1498
|
+
end
|
1499
|
+
def to_hash
|
1226
1500
|
end
|
1227
|
-
def to_hash; end
|
1228
1501
|
end
|
1229
1502
|
|
1230
1503
|
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1504
|
+
OrHash =
|
1505
|
+
T.type_alias do
|
1506
|
+
T.any(
|
1507
|
+
Orb::Models::SubscriptionCancelResponse::PendingSubscriptionChange,
|
1508
|
+
Orb::Internal::AnyHash
|
1509
|
+
)
|
1510
|
+
end
|
1511
|
+
|
1231
1512
|
sig { returns(String) }
|
1232
1513
|
attr_accessor :id
|
1233
1514
|
|
1234
1515
|
# A pending subscription change if one exists on this subscription.
|
1235
1516
|
sig { params(id: String).returns(T.attached_class) }
|
1236
|
-
def self.new(id:)
|
1517
|
+
def self.new(id:)
|
1518
|
+
end
|
1237
1519
|
|
1238
|
-
sig { override.returns({id: String}) }
|
1239
|
-
def to_hash
|
1520
|
+
sig { override.returns({ id: String }) }
|
1521
|
+
def to_hash
|
1522
|
+
end
|
1240
1523
|
end
|
1241
1524
|
|
1242
1525
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
1526
|
+
OrHash =
|
1527
|
+
T.type_alias do
|
1528
|
+
T.any(
|
1529
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval,
|
1530
|
+
Orb::Internal::AnyHash
|
1531
|
+
)
|
1532
|
+
end
|
1533
|
+
|
1243
1534
|
sig { returns(String) }
|
1244
1535
|
attr_accessor :id
|
1245
1536
|
|
@@ -1272,7 +1563,11 @@ module Orb
|
|
1272
1563
|
# relevant for fixed fees.
|
1273
1564
|
sig do
|
1274
1565
|
returns(
|
1275
|
-
T.nilable(
|
1566
|
+
T.nilable(
|
1567
|
+
T::Array[
|
1568
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition
|
1569
|
+
]
|
1570
|
+
)
|
1276
1571
|
)
|
1277
1572
|
end
|
1278
1573
|
attr_accessor :fixed_fee_quantity_transitions
|
@@ -1290,34 +1585,34 @@ module Orb
|
|
1290
1585
|
sig do
|
1291
1586
|
returns(
|
1292
1587
|
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::
|
1588
|
+
Orb::Price::Unit,
|
1589
|
+
Orb::Price::Package,
|
1590
|
+
Orb::Price::Matrix,
|
1591
|
+
Orb::Price::Tiered,
|
1592
|
+
Orb::Price::TieredBps,
|
1593
|
+
Orb::Price::Bps,
|
1594
|
+
Orb::Price::BulkBps,
|
1595
|
+
Orb::Price::Bulk,
|
1596
|
+
Orb::Price::ThresholdTotalAmount,
|
1597
|
+
Orb::Price::TieredPackage,
|
1598
|
+
Orb::Price::GroupedTiered,
|
1599
|
+
Orb::Price::TieredWithMinimum,
|
1600
|
+
Orb::Price::TieredPackageWithMinimum,
|
1601
|
+
Orb::Price::PackageWithAllocation,
|
1602
|
+
Orb::Price::UnitWithPercent,
|
1603
|
+
Orb::Price::MatrixWithAllocation,
|
1604
|
+
Orb::Price::TieredWithProration,
|
1605
|
+
Orb::Price::UnitWithProration,
|
1606
|
+
Orb::Price::GroupedAllocation,
|
1607
|
+
Orb::Price::GroupedWithProratedMinimum,
|
1608
|
+
Orb::Price::GroupedWithMeteredMinimum,
|
1609
|
+
Orb::Price::MatrixWithDisplayName,
|
1610
|
+
Orb::Price::BulkWithProration,
|
1611
|
+
Orb::Price::GroupedTieredPackage,
|
1612
|
+
Orb::Price::MaxGroupTieredPackage,
|
1613
|
+
Orb::Price::ScalableMatrixWithUnitPricing,
|
1614
|
+
Orb::Price::ScalableMatrixWithTieredPricing,
|
1615
|
+
Orb::Price::CumulativeGroupedBulk
|
1321
1616
|
)
|
1322
1617
|
)
|
1323
1618
|
end
|
@@ -1344,49 +1639,46 @@ module Orb
|
|
1344
1639
|
current_billing_period_start_date: T.nilable(Time),
|
1345
1640
|
end_date: T.nilable(Time),
|
1346
1641
|
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
|
-
),
|
1642
|
+
fixed_fee_quantity_transitions:
|
1643
|
+
T.nilable(
|
1644
|
+
T::Array[
|
1645
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition::OrHash
|
1646
|
+
]
|
1647
|
+
),
|
1648
|
+
price:
|
1649
|
+
T.any(
|
1650
|
+
Orb::Price::Unit::OrHash,
|
1651
|
+
Orb::Price::Package::OrHash,
|
1652
|
+
Orb::Price::Matrix::OrHash,
|
1653
|
+
Orb::Price::Tiered::OrHash,
|
1654
|
+
Orb::Price::TieredBps::OrHash,
|
1655
|
+
Orb::Price::Bps::OrHash,
|
1656
|
+
Orb::Price::BulkBps::OrHash,
|
1657
|
+
Orb::Price::Bulk::OrHash,
|
1658
|
+
Orb::Price::ThresholdTotalAmount::OrHash,
|
1659
|
+
Orb::Price::TieredPackage::OrHash,
|
1660
|
+
Orb::Price::GroupedTiered::OrHash,
|
1661
|
+
Orb::Price::TieredWithMinimum::OrHash,
|
1662
|
+
Orb::Price::TieredPackageWithMinimum::OrHash,
|
1663
|
+
Orb::Price::PackageWithAllocation::OrHash,
|
1664
|
+
Orb::Price::UnitWithPercent::OrHash,
|
1665
|
+
Orb::Price::MatrixWithAllocation::OrHash,
|
1666
|
+
Orb::Price::TieredWithProration::OrHash,
|
1667
|
+
Orb::Price::UnitWithProration::OrHash,
|
1668
|
+
Orb::Price::GroupedAllocation::OrHash,
|
1669
|
+
Orb::Price::GroupedWithProratedMinimum::OrHash,
|
1670
|
+
Orb::Price::GroupedWithMeteredMinimum::OrHash,
|
1671
|
+
Orb::Price::MatrixWithDisplayName::OrHash,
|
1672
|
+
Orb::Price::BulkWithProration::OrHash,
|
1673
|
+
Orb::Price::GroupedTieredPackage::OrHash,
|
1674
|
+
Orb::Price::MaxGroupTieredPackage::OrHash,
|
1675
|
+
Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
|
1676
|
+
Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
|
1677
|
+
Orb::Price::CumulativeGroupedBulk::OrHash
|
1678
|
+
),
|
1386
1679
|
start_date: Time,
|
1387
1680
|
usage_customer_ids: T.nilable(T::Array[String])
|
1388
|
-
)
|
1389
|
-
.returns(T.attached_class)
|
1681
|
+
).returns(T.attached_class)
|
1390
1682
|
end
|
1391
1683
|
def self.new(
|
1392
1684
|
id:,
|
@@ -1425,56 +1717,72 @@ module Orb
|
|
1425
1717
|
# A list of customer IDs whose usage events will be aggregated and billed under
|
1426
1718
|
# this price interval.
|
1427
1719
|
usage_customer_ids:
|
1428
|
-
)
|
1720
|
+
)
|
1721
|
+
end
|
1722
|
+
|
1429
1723
|
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
|
1724
|
+
override.returns(
|
1725
|
+
{
|
1726
|
+
id: String,
|
1727
|
+
billing_cycle_day: Integer,
|
1728
|
+
current_billing_period_end_date: T.nilable(Time),
|
1729
|
+
current_billing_period_start_date: T.nilable(Time),
|
1730
|
+
end_date: T.nilable(Time),
|
1731
|
+
filter: T.nilable(String),
|
1732
|
+
fixed_fee_quantity_transitions:
|
1733
|
+
T.nilable(
|
1734
|
+
T::Array[
|
1735
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition
|
1736
|
+
]
|
1469
1737
|
),
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1738
|
+
price:
|
1739
|
+
T.any(
|
1740
|
+
Orb::Price::Unit,
|
1741
|
+
Orb::Price::Package,
|
1742
|
+
Orb::Price::Matrix,
|
1743
|
+
Orb::Price::Tiered,
|
1744
|
+
Orb::Price::TieredBps,
|
1745
|
+
Orb::Price::Bps,
|
1746
|
+
Orb::Price::BulkBps,
|
1747
|
+
Orb::Price::Bulk,
|
1748
|
+
Orb::Price::ThresholdTotalAmount,
|
1749
|
+
Orb::Price::TieredPackage,
|
1750
|
+
Orb::Price::GroupedTiered,
|
1751
|
+
Orb::Price::TieredWithMinimum,
|
1752
|
+
Orb::Price::TieredPackageWithMinimum,
|
1753
|
+
Orb::Price::PackageWithAllocation,
|
1754
|
+
Orb::Price::UnitWithPercent,
|
1755
|
+
Orb::Price::MatrixWithAllocation,
|
1756
|
+
Orb::Price::TieredWithProration,
|
1757
|
+
Orb::Price::UnitWithProration,
|
1758
|
+
Orb::Price::GroupedAllocation,
|
1759
|
+
Orb::Price::GroupedWithProratedMinimum,
|
1760
|
+
Orb::Price::GroupedWithMeteredMinimum,
|
1761
|
+
Orb::Price::MatrixWithDisplayName,
|
1762
|
+
Orb::Price::BulkWithProration,
|
1763
|
+
Orb::Price::GroupedTieredPackage,
|
1764
|
+
Orb::Price::MaxGroupTieredPackage,
|
1765
|
+
Orb::Price::ScalableMatrixWithUnitPricing,
|
1766
|
+
Orb::Price::ScalableMatrixWithTieredPricing,
|
1767
|
+
Orb::Price::CumulativeGroupedBulk
|
1768
|
+
),
|
1769
|
+
start_date: Time,
|
1770
|
+
usage_customer_ids: T.nilable(T::Array[String])
|
1771
|
+
}
|
1772
|
+
)
|
1773
|
+
end
|
1774
|
+
def to_hash
|
1474
1775
|
end
|
1475
|
-
def to_hash; end
|
1476
1776
|
|
1477
1777
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1778
|
+
OrHash =
|
1779
|
+
T.type_alias do
|
1780
|
+
T.any(
|
1781
|
+
Orb::Models::SubscriptionCancelResponse::PriceInterval::FixedFeeQuantityTransition,
|
1782
|
+
Orb::Internal::AnyHash
|
1783
|
+
)
|
1784
|
+
end
|
1785
|
+
|
1478
1786
|
sig { returns(Time) }
|
1479
1787
|
attr_accessor :effective_date
|
1480
1788
|
|
@@ -1484,15 +1792,35 @@ module Orb
|
|
1484
1792
|
sig { returns(Integer) }
|
1485
1793
|
attr_accessor :quantity
|
1486
1794
|
|
1487
|
-
sig
|
1488
|
-
|
1795
|
+
sig do
|
1796
|
+
params(
|
1797
|
+
effective_date: Time,
|
1798
|
+
price_id: String,
|
1799
|
+
quantity: Integer
|
1800
|
+
).returns(T.attached_class)
|
1801
|
+
end
|
1802
|
+
def self.new(effective_date:, price_id:, quantity:)
|
1803
|
+
end
|
1489
1804
|
|
1490
|
-
sig
|
1491
|
-
|
1805
|
+
sig do
|
1806
|
+
override.returns(
|
1807
|
+
{ effective_date: Time, price_id: String, quantity: Integer }
|
1808
|
+
)
|
1809
|
+
end
|
1810
|
+
def to_hash
|
1811
|
+
end
|
1492
1812
|
end
|
1493
1813
|
end
|
1494
1814
|
|
1495
1815
|
class RedeemedCoupon < Orb::Internal::Type::BaseModel
|
1816
|
+
OrHash =
|
1817
|
+
T.type_alias do
|
1818
|
+
T.any(
|
1819
|
+
Orb::Models::SubscriptionCancelResponse::RedeemedCoupon,
|
1820
|
+
Orb::Internal::AnyHash
|
1821
|
+
)
|
1822
|
+
end
|
1823
|
+
|
1496
1824
|
sig { returns(String) }
|
1497
1825
|
attr_accessor :coupon_id
|
1498
1826
|
|
@@ -1503,54 +1831,104 @@ module Orb
|
|
1503
1831
|
attr_accessor :start_date
|
1504
1832
|
|
1505
1833
|
sig do
|
1506
|
-
params(
|
1834
|
+
params(
|
1835
|
+
coupon_id: String,
|
1836
|
+
end_date: T.nilable(Time),
|
1837
|
+
start_date: Time
|
1838
|
+
).returns(T.attached_class)
|
1839
|
+
end
|
1840
|
+
def self.new(coupon_id:, end_date:, start_date:)
|
1507
1841
|
end
|
1508
|
-
def self.new(coupon_id:, end_date:, start_date:); end
|
1509
1842
|
|
1510
|
-
sig
|
1511
|
-
|
1843
|
+
sig do
|
1844
|
+
override.returns(
|
1845
|
+
{ coupon_id: String, end_date: T.nilable(Time), start_date: Time }
|
1846
|
+
)
|
1847
|
+
end
|
1848
|
+
def to_hash
|
1849
|
+
end
|
1512
1850
|
end
|
1513
1851
|
|
1514
1852
|
module Status
|
1515
1853
|
extend Orb::Internal::Type::Enum
|
1516
1854
|
|
1517
|
-
TaggedSymbol =
|
1855
|
+
TaggedSymbol =
|
1856
|
+
T.type_alias do
|
1857
|
+
T.all(Symbol, Orb::Models::SubscriptionCancelResponse::Status)
|
1858
|
+
end
|
1518
1859
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1519
1860
|
|
1520
|
-
ACTIVE =
|
1521
|
-
|
1522
|
-
|
1861
|
+
ACTIVE =
|
1862
|
+
T.let(
|
1863
|
+
:active,
|
1864
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1865
|
+
)
|
1866
|
+
ENDED =
|
1867
|
+
T.let(
|
1868
|
+
:ended,
|
1869
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1870
|
+
)
|
1871
|
+
UPCOMING =
|
1872
|
+
T.let(
|
1873
|
+
:upcoming,
|
1874
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1875
|
+
)
|
1523
1876
|
|
1524
|
-
sig
|
1525
|
-
|
1877
|
+
sig do
|
1878
|
+
override.returns(
|
1879
|
+
T::Array[
|
1880
|
+
Orb::Models::SubscriptionCancelResponse::Status::TaggedSymbol
|
1881
|
+
]
|
1882
|
+
)
|
1883
|
+
end
|
1884
|
+
def self.values
|
1885
|
+
end
|
1526
1886
|
end
|
1527
1887
|
|
1528
1888
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
1889
|
+
OrHash =
|
1890
|
+
T.type_alias do
|
1891
|
+
T.any(
|
1892
|
+
Orb::Models::SubscriptionCancelResponse::TrialInfo,
|
1893
|
+
Orb::Internal::AnyHash
|
1894
|
+
)
|
1895
|
+
end
|
1896
|
+
|
1529
1897
|
sig { returns(T.nilable(Time)) }
|
1530
1898
|
attr_accessor :end_date
|
1531
1899
|
|
1532
1900
|
sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
|
1533
|
-
def self.new(end_date:)
|
1901
|
+
def self.new(end_date:)
|
1902
|
+
end
|
1534
1903
|
|
1535
|
-
sig { override.returns({end_date: T.nilable(Time)}) }
|
1536
|
-
def to_hash
|
1904
|
+
sig { override.returns({ end_date: T.nilable(Time) }) }
|
1905
|
+
def to_hash
|
1906
|
+
end
|
1537
1907
|
end
|
1538
1908
|
|
1539
1909
|
class ChangedResources < Orb::Internal::Type::BaseModel
|
1910
|
+
OrHash =
|
1911
|
+
T.type_alias do
|
1912
|
+
T.any(
|
1913
|
+
Orb::Models::SubscriptionCancelResponse::ChangedResources,
|
1914
|
+
Orb::Internal::AnyHash
|
1915
|
+
)
|
1916
|
+
end
|
1917
|
+
|
1540
1918
|
# The credit notes that were created as part of this operation.
|
1541
|
-
sig { returns(T::Array[Orb::
|
1919
|
+
sig { returns(T::Array[Orb::CreditNote]) }
|
1542
1920
|
attr_accessor :created_credit_notes
|
1543
1921
|
|
1544
1922
|
# The invoices that were created as part of this operation.
|
1545
|
-
sig { returns(T::Array[Orb::
|
1923
|
+
sig { returns(T::Array[Orb::Invoice]) }
|
1546
1924
|
attr_accessor :created_invoices
|
1547
1925
|
|
1548
1926
|
# The credit notes that were voided as part of this operation.
|
1549
|
-
sig { returns(T::Array[Orb::
|
1927
|
+
sig { returns(T::Array[Orb::CreditNote]) }
|
1550
1928
|
attr_accessor :voided_credit_notes
|
1551
1929
|
|
1552
1930
|
# The invoices that were voided as part of this operation.
|
1553
|
-
sig { returns(T::Array[Orb::
|
1931
|
+
sig { returns(T::Array[Orb::Invoice]) }
|
1554
1932
|
attr_accessor :voided_invoices
|
1555
1933
|
|
1556
1934
|
# The resources that were changed as part of this operation. Only present when
|
@@ -1558,12 +1936,11 @@ module Orb
|
|
1558
1936
|
# `include_changed_resources` parameter was passed in the request.
|
1559
1937
|
sig do
|
1560
1938
|
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)
|
1939
|
+
created_credit_notes: T::Array[Orb::CreditNote::OrHash],
|
1940
|
+
created_invoices: T::Array[Orb::Invoice::OrHash],
|
1941
|
+
voided_credit_notes: T::Array[Orb::CreditNote::OrHash],
|
1942
|
+
voided_invoices: T::Array[Orb::Invoice::OrHash]
|
1943
|
+
).returns(T.attached_class)
|
1567
1944
|
end
|
1568
1945
|
def self.new(
|
1569
1946
|
# The credit notes that were created as part of this operation.
|
@@ -1574,19 +1951,21 @@ module Orb
|
|
1574
1951
|
voided_credit_notes:,
|
1575
1952
|
# The invoices that were voided as part of this operation.
|
1576
1953
|
voided_invoices:
|
1577
|
-
)
|
1954
|
+
)
|
1955
|
+
end
|
1956
|
+
|
1578
1957
|
sig do
|
1579
|
-
override
|
1580
|
-
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
|
1958
|
+
override.returns(
|
1959
|
+
{
|
1960
|
+
created_credit_notes: T::Array[Orb::CreditNote],
|
1961
|
+
created_invoices: T::Array[Orb::Invoice],
|
1962
|
+
voided_credit_notes: T::Array[Orb::CreditNote],
|
1963
|
+
voided_invoices: T::Array[Orb::Invoice]
|
1964
|
+
}
|
1965
|
+
)
|
1966
|
+
end
|
1967
|
+
def to_hash
|
1588
1968
|
end
|
1589
|
-
def to_hash; end
|
1590
1969
|
end
|
1591
1970
|
end
|
1592
1971
|
end
|