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,14 @@
|
|
3
3
|
module Orb
|
4
4
|
module Models
|
5
5
|
class SubscriptionTriggerPhaseResponse < Orb::Internal::Type::BaseModel
|
6
|
+
OrHash =
|
7
|
+
T.type_alias do
|
8
|
+
T.any(
|
9
|
+
Orb::Models::SubscriptionTriggerPhaseResponse,
|
10
|
+
Orb::Internal::AnyHash
|
11
|
+
)
|
12
|
+
end
|
13
|
+
|
6
14
|
sig { returns(String) }
|
7
15
|
attr_accessor :id
|
8
16
|
|
@@ -13,7 +21,13 @@ module Orb
|
|
13
21
|
|
14
22
|
# The adjustment intervals for this subscription sorted by the start_date of the
|
15
23
|
# adjustment interval.
|
16
|
-
sig
|
24
|
+
sig do
|
25
|
+
returns(
|
26
|
+
T::Array[
|
27
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval
|
28
|
+
]
|
29
|
+
)
|
30
|
+
end
|
17
31
|
attr_accessor :adjustment_intervals
|
18
32
|
|
19
33
|
# Determines whether issued invoices for this subscription will automatically be
|
@@ -22,17 +36,18 @@ module Orb
|
|
22
36
|
sig { returns(T.nilable(T::Boolean)) }
|
23
37
|
attr_accessor :auto_collection
|
24
38
|
|
25
|
-
sig
|
39
|
+
sig do
|
40
|
+
returns(
|
41
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration
|
42
|
+
)
|
43
|
+
end
|
26
44
|
attr_reader :billing_cycle_anchor_configuration
|
27
45
|
|
28
46
|
sig do
|
29
47
|
params(
|
30
|
-
billing_cycle_anchor_configuration:
|
31
|
-
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration
|
32
|
-
|
33
|
-
)
|
34
|
-
)
|
35
|
-
.void
|
48
|
+
billing_cycle_anchor_configuration:
|
49
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration::OrHash
|
50
|
+
).void
|
36
51
|
end
|
37
52
|
attr_writer :billing_cycle_anchor_configuration
|
38
53
|
|
@@ -76,10 +91,10 @@ module Orb
|
|
76
91
|
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
77
92
|
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
78
93
|
# information on what this timezone parameter influences within Orb.
|
79
|
-
sig { returns(Orb::
|
94
|
+
sig { returns(Orb::Customer) }
|
80
95
|
attr_reader :customer
|
81
96
|
|
82
|
-
sig { params(customer:
|
97
|
+
sig { params(customer: Orb::Customer::OrHash).void }
|
83
98
|
attr_writer :customer
|
84
99
|
|
85
100
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
@@ -105,14 +120,26 @@ module Orb
|
|
105
120
|
sig { returns(T.nilable(Time)) }
|
106
121
|
attr_accessor :end_date
|
107
122
|
|
108
|
-
sig
|
123
|
+
sig do
|
124
|
+
returns(
|
125
|
+
T::Array[
|
126
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule
|
127
|
+
]
|
128
|
+
)
|
129
|
+
end
|
109
130
|
attr_accessor :fixed_fee_quantity_schedule
|
110
131
|
|
111
132
|
sig { returns(T.nilable(String)) }
|
112
133
|
attr_accessor :invoicing_threshold
|
113
134
|
|
114
135
|
# The maximum intervals for this subscription sorted by the start_date.
|
115
|
-
sig
|
136
|
+
sig do
|
137
|
+
returns(
|
138
|
+
T::Array[
|
139
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval
|
140
|
+
]
|
141
|
+
)
|
142
|
+
end
|
116
143
|
attr_accessor :maximum_intervals
|
117
144
|
|
118
145
|
# User specified key-value pairs for the resource. If not present, this defaults
|
@@ -123,7 +150,13 @@ module Orb
|
|
123
150
|
attr_accessor :metadata
|
124
151
|
|
125
152
|
# The minimum intervals for this subscription sorted by the start_date.
|
126
|
-
sig
|
153
|
+
sig do
|
154
|
+
returns(
|
155
|
+
T::Array[
|
156
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval
|
157
|
+
]
|
158
|
+
)
|
159
|
+
end
|
127
160
|
attr_accessor :minimum_intervals
|
128
161
|
|
129
162
|
# Determines the difference between the invoice issue date for subscription
|
@@ -134,16 +167,22 @@ module Orb
|
|
134
167
|
attr_accessor :net_terms
|
135
168
|
|
136
169
|
# A pending subscription change if one exists on this subscription.
|
137
|
-
sig
|
170
|
+
sig do
|
171
|
+
returns(
|
172
|
+
T.nilable(
|
173
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange
|
174
|
+
)
|
175
|
+
)
|
176
|
+
end
|
138
177
|
attr_reader :pending_subscription_change
|
139
178
|
|
140
179
|
sig do
|
141
180
|
params(
|
142
|
-
pending_subscription_change:
|
143
|
-
T.
|
144
|
-
|
145
|
-
|
146
|
-
|
181
|
+
pending_subscription_change:
|
182
|
+
T.nilable(
|
183
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange::OrHash
|
184
|
+
)
|
185
|
+
).void
|
147
186
|
end
|
148
187
|
attr_writer :pending_subscription_change
|
149
188
|
|
@@ -151,24 +190,36 @@ module Orb
|
|
151
190
|
# subscribed to by a customer. Plans define the billing behavior of the
|
152
191
|
# subscription. You can see more about how to configure prices in the
|
153
192
|
# [Price resource](/reference/price).
|
154
|
-
sig { returns(Orb::
|
193
|
+
sig { returns(Orb::Plan) }
|
155
194
|
attr_reader :plan
|
156
195
|
|
157
|
-
sig { params(plan:
|
196
|
+
sig { params(plan: Orb::Plan::OrHash).void }
|
158
197
|
attr_writer :plan
|
159
198
|
|
160
199
|
# The price intervals for this subscription.
|
161
|
-
sig
|
200
|
+
sig do
|
201
|
+
returns(
|
202
|
+
T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]
|
203
|
+
)
|
204
|
+
end
|
162
205
|
attr_accessor :price_intervals
|
163
206
|
|
164
|
-
sig
|
207
|
+
sig do
|
208
|
+
returns(
|
209
|
+
T.nilable(
|
210
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon
|
211
|
+
)
|
212
|
+
)
|
213
|
+
end
|
165
214
|
attr_reader :redeemed_coupon
|
166
215
|
|
167
216
|
sig do
|
168
217
|
params(
|
169
|
-
redeemed_coupon:
|
170
|
-
|
171
|
-
|
218
|
+
redeemed_coupon:
|
219
|
+
T.nilable(
|
220
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon::OrHash
|
221
|
+
)
|
222
|
+
).void
|
172
223
|
end
|
173
224
|
attr_writer :redeemed_coupon
|
174
225
|
|
@@ -176,7 +227,11 @@ module Orb
|
|
176
227
|
sig { returns(Time) }
|
177
228
|
attr_accessor :start_date
|
178
229
|
|
179
|
-
sig
|
230
|
+
sig do
|
231
|
+
returns(
|
232
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol
|
233
|
+
)
|
234
|
+
end
|
180
235
|
attr_accessor :status
|
181
236
|
|
182
237
|
sig { returns(Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo) }
|
@@ -184,23 +239,31 @@ module Orb
|
|
184
239
|
|
185
240
|
sig do
|
186
241
|
params(
|
187
|
-
trial_info:
|
188
|
-
|
189
|
-
|
242
|
+
trial_info:
|
243
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo::OrHash
|
244
|
+
).void
|
190
245
|
end
|
191
246
|
attr_writer :trial_info
|
192
247
|
|
193
248
|
# The resources that were changed as part of this operation. Only present when
|
194
249
|
# fetched through the subscription changes API or if the
|
195
250
|
# `include_changed_resources` parameter was passed in the request.
|
196
|
-
sig
|
251
|
+
sig do
|
252
|
+
returns(
|
253
|
+
T.nilable(
|
254
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources
|
255
|
+
)
|
256
|
+
)
|
257
|
+
end
|
197
258
|
attr_reader :changed_resources
|
198
259
|
|
199
260
|
sig do
|
200
261
|
params(
|
201
|
-
changed_resources:
|
202
|
-
|
203
|
-
|
262
|
+
changed_resources:
|
263
|
+
T.nilable(
|
264
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources::OrHash
|
265
|
+
)
|
266
|
+
).void
|
204
267
|
end
|
205
268
|
attr_writer :changed_resources
|
206
269
|
|
@@ -208,45 +271,66 @@ module Orb
|
|
208
271
|
params(
|
209
272
|
id: String,
|
210
273
|
active_plan_phase_order: T.nilable(Integer),
|
211
|
-
adjustment_intervals:
|
274
|
+
adjustment_intervals:
|
275
|
+
T::Array[
|
276
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::OrHash
|
277
|
+
],
|
212
278
|
auto_collection: T.nilable(T::Boolean),
|
213
|
-
billing_cycle_anchor_configuration:
|
214
|
-
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration,
|
215
|
-
Orb::Internal::AnyHash
|
216
|
-
),
|
279
|
+
billing_cycle_anchor_configuration:
|
280
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration::OrHash,
|
217
281
|
billing_cycle_day: Integer,
|
218
282
|
created_at: Time,
|
219
283
|
current_billing_period_end_date: T.nilable(Time),
|
220
284
|
current_billing_period_start_date: T.nilable(Time),
|
221
|
-
customer:
|
285
|
+
customer: Orb::Customer::OrHash,
|
222
286
|
default_invoice_memo: T.nilable(String),
|
223
|
-
discount_intervals:
|
224
|
-
T
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
287
|
+
discount_intervals:
|
288
|
+
T::Array[
|
289
|
+
T.any(
|
290
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount::OrHash,
|
291
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage::OrHash,
|
292
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage::OrHash
|
293
|
+
)
|
294
|
+
],
|
231
295
|
end_date: T.nilable(Time),
|
232
|
-
fixed_fee_quantity_schedule:
|
296
|
+
fixed_fee_quantity_schedule:
|
297
|
+
T::Array[
|
298
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule::OrHash
|
299
|
+
],
|
233
300
|
invoicing_threshold: T.nilable(String),
|
234
|
-
maximum_intervals:
|
301
|
+
maximum_intervals:
|
302
|
+
T::Array[
|
303
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval::OrHash
|
304
|
+
],
|
235
305
|
metadata: T::Hash[Symbol, String],
|
236
|
-
minimum_intervals:
|
306
|
+
minimum_intervals:
|
307
|
+
T::Array[
|
308
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval::OrHash
|
309
|
+
],
|
237
310
|
net_terms: Integer,
|
238
|
-
pending_subscription_change:
|
239
|
-
T.
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
311
|
+
pending_subscription_change:
|
312
|
+
T.nilable(
|
313
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange::OrHash
|
314
|
+
),
|
315
|
+
plan: Orb::Plan::OrHash,
|
316
|
+
price_intervals:
|
317
|
+
T::Array[
|
318
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::OrHash
|
319
|
+
],
|
320
|
+
redeemed_coupon:
|
321
|
+
T.nilable(
|
322
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon::OrHash
|
323
|
+
),
|
244
324
|
start_date: Time,
|
245
|
-
status:
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
325
|
+
status:
|
326
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::OrSymbol,
|
327
|
+
trial_info:
|
328
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo::OrHash,
|
329
|
+
changed_resources:
|
330
|
+
T.nilable(
|
331
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources::OrHash
|
332
|
+
)
|
333
|
+
).returns(T.attached_class)
|
250
334
|
end
|
251
335
|
def self.new(
|
252
336
|
id:,
|
@@ -335,50 +419,88 @@ module Orb
|
|
335
419
|
# fetched through the subscription changes API or if the
|
336
420
|
# `include_changed_resources` parameter was passed in the request.
|
337
421
|
changed_resources: nil
|
338
|
-
)
|
422
|
+
)
|
423
|
+
end
|
424
|
+
|
339
425
|
sig do
|
340
|
-
override
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
426
|
+
override.returns(
|
427
|
+
{
|
428
|
+
id: String,
|
429
|
+
active_plan_phase_order: T.nilable(Integer),
|
430
|
+
adjustment_intervals:
|
431
|
+
T::Array[
|
432
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval
|
433
|
+
],
|
434
|
+
auto_collection: T.nilable(T::Boolean),
|
435
|
+
billing_cycle_anchor_configuration:
|
436
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration,
|
437
|
+
billing_cycle_day: Integer,
|
438
|
+
created_at: Time,
|
439
|
+
current_billing_period_end_date: T.nilable(Time),
|
440
|
+
current_billing_period_start_date: T.nilable(Time),
|
441
|
+
customer: Orb::Customer,
|
442
|
+
default_invoice_memo: T.nilable(String),
|
443
|
+
discount_intervals:
|
444
|
+
T::Array[
|
355
445
|
T.any(
|
356
446
|
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount,
|
357
447
|
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage,
|
358
448
|
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage
|
359
449
|
)
|
360
450
|
],
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
451
|
+
end_date: T.nilable(Time),
|
452
|
+
fixed_fee_quantity_schedule:
|
453
|
+
T::Array[
|
454
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule
|
455
|
+
],
|
456
|
+
invoicing_threshold: T.nilable(String),
|
457
|
+
maximum_intervals:
|
458
|
+
T::Array[
|
459
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval
|
460
|
+
],
|
461
|
+
metadata: T::Hash[Symbol, String],
|
462
|
+
minimum_intervals:
|
463
|
+
T::Array[
|
464
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval
|
465
|
+
],
|
466
|
+
net_terms: Integer,
|
467
|
+
pending_subscription_change:
|
468
|
+
T.nilable(
|
469
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange
|
470
|
+
),
|
471
|
+
plan: Orb::Plan,
|
472
|
+
price_intervals:
|
473
|
+
T::Array[
|
474
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval
|
475
|
+
],
|
476
|
+
redeemed_coupon:
|
477
|
+
T.nilable(
|
478
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon
|
479
|
+
),
|
480
|
+
start_date: Time,
|
481
|
+
status:
|
482
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol,
|
483
|
+
trial_info:
|
484
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo,
|
485
|
+
changed_resources:
|
486
|
+
T.nilable(
|
487
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources
|
488
|
+
)
|
489
|
+
}
|
490
|
+
)
|
491
|
+
end
|
492
|
+
def to_hash
|
378
493
|
end
|
379
|
-
def to_hash; end
|
380
494
|
|
381
495
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
496
|
+
OrHash =
|
497
|
+
T.type_alias do
|
498
|
+
T.any(
|
499
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval,
|
500
|
+
Orb::Internal::AnyHash
|
501
|
+
)
|
502
|
+
end
|
503
|
+
|
382
504
|
sig { returns(String) }
|
383
505
|
attr_accessor :id
|
384
506
|
|
@@ -410,19 +532,18 @@ module Orb
|
|
410
532
|
sig do
|
411
533
|
params(
|
412
534
|
id: String,
|
413
|
-
adjustment:
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
535
|
+
adjustment:
|
536
|
+
T.any(
|
537
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount::OrHash,
|
538
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount::OrHash,
|
539
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount::OrHash,
|
540
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum::OrHash,
|
541
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum::OrHash
|
542
|
+
),
|
421
543
|
applies_to_price_interval_ids: T::Array[String],
|
422
544
|
end_date: T.nilable(Time),
|
423
545
|
start_date: Time
|
424
|
-
)
|
425
|
-
.returns(T.attached_class)
|
546
|
+
).returns(T.attached_class)
|
426
547
|
end
|
427
548
|
def self.new(
|
428
549
|
id:,
|
@@ -433,31 +554,53 @@ module Orb
|
|
433
554
|
end_date:,
|
434
555
|
# The start date of the adjustment interval.
|
435
556
|
start_date:
|
436
|
-
)
|
557
|
+
)
|
558
|
+
end
|
559
|
+
|
437
560
|
sig do
|
438
|
-
override
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
561
|
+
override.returns(
|
562
|
+
{
|
563
|
+
id: String,
|
564
|
+
adjustment:
|
565
|
+
T.any(
|
443
566
|
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
444
567
|
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
445
568
|
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
446
569
|
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum,
|
447
570
|
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum
|
448
571
|
),
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
572
|
+
applies_to_price_interval_ids: T::Array[String],
|
573
|
+
end_date: T.nilable(Time),
|
574
|
+
start_date: Time
|
575
|
+
}
|
576
|
+
)
|
577
|
+
end
|
578
|
+
def to_hash
|
454
579
|
end
|
455
|
-
def to_hash; end
|
456
580
|
|
457
581
|
module Adjustment
|
458
582
|
extend Orb::Internal::Type::Union
|
459
583
|
|
584
|
+
Variants =
|
585
|
+
T.type_alias do
|
586
|
+
T.any(
|
587
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
588
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
589
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
590
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum,
|
591
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum
|
592
|
+
)
|
593
|
+
end
|
594
|
+
|
460
595
|
class UsageDiscount < Orb::Internal::Type::BaseModel
|
596
|
+
OrHash =
|
597
|
+
T.type_alias do
|
598
|
+
T.any(
|
599
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::UsageDiscount,
|
600
|
+
Orb::Internal::AnyHash
|
601
|
+
)
|
602
|
+
end
|
603
|
+
|
461
604
|
sig { returns(String) }
|
462
605
|
attr_accessor :id
|
463
606
|
|
@@ -495,8 +638,7 @@ module Orb
|
|
495
638
|
reason: T.nilable(String),
|
496
639
|
usage_discount: Float,
|
497
640
|
adjustment_type: Symbol
|
498
|
-
)
|
499
|
-
.returns(T.attached_class)
|
641
|
+
).returns(T.attached_class)
|
500
642
|
end
|
501
643
|
def self.new(
|
502
644
|
id:,
|
@@ -513,25 +655,35 @@ module Orb
|
|
513
655
|
# to in a given billing period.
|
514
656
|
usage_discount:,
|
515
657
|
adjustment_type: :usage_discount
|
516
|
-
)
|
658
|
+
)
|
659
|
+
end
|
660
|
+
|
517
661
|
sig do
|
518
|
-
override
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
662
|
+
override.returns(
|
663
|
+
{
|
664
|
+
id: String,
|
665
|
+
adjustment_type: Symbol,
|
666
|
+
applies_to_price_ids: T::Array[String],
|
667
|
+
is_invoice_level: T::Boolean,
|
668
|
+
plan_phase_order: T.nilable(Integer),
|
669
|
+
reason: T.nilable(String),
|
670
|
+
usage_discount: Float
|
671
|
+
}
|
672
|
+
)
|
673
|
+
end
|
674
|
+
def to_hash
|
530
675
|
end
|
531
|
-
def to_hash; end
|
532
676
|
end
|
533
677
|
|
534
678
|
class AmountDiscount < Orb::Internal::Type::BaseModel
|
679
|
+
OrHash =
|
680
|
+
T.type_alias do
|
681
|
+
T.any(
|
682
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::AmountDiscount,
|
683
|
+
Orb::Internal::AnyHash
|
684
|
+
)
|
685
|
+
end
|
686
|
+
|
535
687
|
sig { returns(String) }
|
536
688
|
attr_accessor :id
|
537
689
|
|
@@ -569,8 +721,7 @@ module Orb
|
|
569
721
|
plan_phase_order: T.nilable(Integer),
|
570
722
|
reason: T.nilable(String),
|
571
723
|
adjustment_type: Symbol
|
572
|
-
)
|
573
|
-
.returns(T.attached_class)
|
724
|
+
).returns(T.attached_class)
|
574
725
|
end
|
575
726
|
def self.new(
|
576
727
|
id:,
|
@@ -587,25 +738,35 @@ module Orb
|
|
587
738
|
# The reason for the adjustment.
|
588
739
|
reason:,
|
589
740
|
adjustment_type: :amount_discount
|
590
|
-
)
|
741
|
+
)
|
742
|
+
end
|
743
|
+
|
591
744
|
sig do
|
592
|
-
override
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
745
|
+
override.returns(
|
746
|
+
{
|
747
|
+
id: String,
|
748
|
+
adjustment_type: Symbol,
|
749
|
+
amount_discount: String,
|
750
|
+
applies_to_price_ids: T::Array[String],
|
751
|
+
is_invoice_level: T::Boolean,
|
752
|
+
plan_phase_order: T.nilable(Integer),
|
753
|
+
reason: T.nilable(String)
|
754
|
+
}
|
755
|
+
)
|
756
|
+
end
|
757
|
+
def to_hash
|
604
758
|
end
|
605
|
-
def to_hash; end
|
606
759
|
end
|
607
760
|
|
608
761
|
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
762
|
+
OrHash =
|
763
|
+
T.type_alias do
|
764
|
+
T.any(
|
765
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PercentageDiscount,
|
766
|
+
Orb::Internal::AnyHash
|
767
|
+
)
|
768
|
+
end
|
769
|
+
|
609
770
|
sig { returns(String) }
|
610
771
|
attr_accessor :id
|
611
772
|
|
@@ -643,8 +804,7 @@ module Orb
|
|
643
804
|
plan_phase_order: T.nilable(Integer),
|
644
805
|
reason: T.nilable(String),
|
645
806
|
adjustment_type: Symbol
|
646
|
-
)
|
647
|
-
.returns(T.attached_class)
|
807
|
+
).returns(T.attached_class)
|
648
808
|
end
|
649
809
|
def self.new(
|
650
810
|
id:,
|
@@ -661,25 +821,35 @@ module Orb
|
|
661
821
|
# The reason for the adjustment.
|
662
822
|
reason:,
|
663
823
|
adjustment_type: :percentage_discount
|
664
|
-
)
|
824
|
+
)
|
825
|
+
end
|
826
|
+
|
665
827
|
sig do
|
666
|
-
override
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
828
|
+
override.returns(
|
829
|
+
{
|
830
|
+
id: String,
|
831
|
+
adjustment_type: Symbol,
|
832
|
+
applies_to_price_ids: T::Array[String],
|
833
|
+
is_invoice_level: T::Boolean,
|
834
|
+
percentage_discount: Float,
|
835
|
+
plan_phase_order: T.nilable(Integer),
|
836
|
+
reason: T.nilable(String)
|
837
|
+
}
|
838
|
+
)
|
839
|
+
end
|
840
|
+
def to_hash
|
678
841
|
end
|
679
|
-
def to_hash; end
|
680
842
|
end
|
681
843
|
|
682
844
|
class Minimum < Orb::Internal::Type::BaseModel
|
845
|
+
OrHash =
|
846
|
+
T.type_alias do
|
847
|
+
T.any(
|
848
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Minimum,
|
849
|
+
Orb::Internal::AnyHash
|
850
|
+
)
|
851
|
+
end
|
852
|
+
|
683
853
|
sig { returns(String) }
|
684
854
|
attr_accessor :id
|
685
855
|
|
@@ -722,8 +892,7 @@ module Orb
|
|
722
892
|
plan_phase_order: T.nilable(Integer),
|
723
893
|
reason: T.nilable(String),
|
724
894
|
adjustment_type: Symbol
|
725
|
-
)
|
726
|
-
.returns(T.attached_class)
|
895
|
+
).returns(T.attached_class)
|
727
896
|
end
|
728
897
|
def self.new(
|
729
898
|
id:,
|
@@ -742,26 +911,36 @@ module Orb
|
|
742
911
|
# The reason for the adjustment.
|
743
912
|
reason:,
|
744
913
|
adjustment_type: :minimum
|
745
|
-
)
|
914
|
+
)
|
915
|
+
end
|
916
|
+
|
746
917
|
sig do
|
747
|
-
override
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
918
|
+
override.returns(
|
919
|
+
{
|
920
|
+
id: String,
|
921
|
+
adjustment_type: Symbol,
|
922
|
+
applies_to_price_ids: T::Array[String],
|
923
|
+
is_invoice_level: T::Boolean,
|
924
|
+
item_id: String,
|
925
|
+
minimum_amount: String,
|
926
|
+
plan_phase_order: T.nilable(Integer),
|
927
|
+
reason: T.nilable(String)
|
928
|
+
}
|
929
|
+
)
|
930
|
+
end
|
931
|
+
def to_hash
|
760
932
|
end
|
761
|
-
def to_hash; end
|
762
933
|
end
|
763
934
|
|
764
935
|
class Maximum < Orb::Internal::Type::BaseModel
|
936
|
+
OrHash =
|
937
|
+
T.type_alias do
|
938
|
+
T.any(
|
939
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Maximum,
|
940
|
+
Orb::Internal::AnyHash
|
941
|
+
)
|
942
|
+
end
|
943
|
+
|
765
944
|
sig { returns(String) }
|
766
945
|
attr_accessor :id
|
767
946
|
|
@@ -799,8 +978,7 @@ module Orb
|
|
799
978
|
plan_phase_order: T.nilable(Integer),
|
800
979
|
reason: T.nilable(String),
|
801
980
|
adjustment_type: Symbol
|
802
|
-
)
|
803
|
-
.returns(T.attached_class)
|
981
|
+
).returns(T.attached_class)
|
804
982
|
end
|
805
983
|
def self.new(
|
806
984
|
id:,
|
@@ -817,35 +995,47 @@ module Orb
|
|
817
995
|
# The reason for the adjustment.
|
818
996
|
reason:,
|
819
997
|
adjustment_type: :maximum
|
820
|
-
)
|
998
|
+
)
|
999
|
+
end
|
1000
|
+
|
821
1001
|
sig do
|
822
|
-
override
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
831
|
-
|
832
|
-
|
833
|
-
|
1002
|
+
override.returns(
|
1003
|
+
{
|
1004
|
+
id: String,
|
1005
|
+
adjustment_type: Symbol,
|
1006
|
+
applies_to_price_ids: T::Array[String],
|
1007
|
+
is_invoice_level: T::Boolean,
|
1008
|
+
maximum_amount: String,
|
1009
|
+
plan_phase_order: T.nilable(Integer),
|
1010
|
+
reason: T.nilable(String)
|
1011
|
+
}
|
1012
|
+
)
|
1013
|
+
end
|
1014
|
+
def to_hash
|
834
1015
|
end
|
835
|
-
def to_hash; end
|
836
1016
|
end
|
837
1017
|
|
838
1018
|
sig do
|
839
|
-
override
|
840
|
-
|
841
|
-
|
842
|
-
|
1019
|
+
override.returns(
|
1020
|
+
T::Array[
|
1021
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::Variants
|
1022
|
+
]
|
1023
|
+
)
|
1024
|
+
end
|
1025
|
+
def self.variants
|
843
1026
|
end
|
844
|
-
def self.variants; end
|
845
1027
|
end
|
846
1028
|
end
|
847
1029
|
|
848
1030
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
1031
|
+
OrHash =
|
1032
|
+
T.type_alias do
|
1033
|
+
T.any(
|
1034
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration,
|
1035
|
+
Orb::Internal::AnyHash
|
1036
|
+
)
|
1037
|
+
end
|
1038
|
+
|
849
1039
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
850
1040
|
# number of days in a month is greater than this value, the last day of the month
|
851
1041
|
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
@@ -865,7 +1055,11 @@ module Orb
|
|
865
1055
|
attr_accessor :year
|
866
1056
|
|
867
1057
|
sig do
|
868
|
-
params(
|
1058
|
+
params(
|
1059
|
+
day: Integer,
|
1060
|
+
month: T.nilable(Integer),
|
1061
|
+
year: T.nilable(Integer)
|
1062
|
+
).returns(T.attached_class)
|
869
1063
|
end
|
870
1064
|
def self.new(
|
871
1065
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
@@ -880,15 +1074,43 @@ module Orb
|
|
880
1074
|
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
881
1075
|
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
882
1076
|
year: nil
|
883
|
-
)
|
884
|
-
|
885
|
-
|
1077
|
+
)
|
1078
|
+
end
|
1079
|
+
|
1080
|
+
sig do
|
1081
|
+
override.returns(
|
1082
|
+
{
|
1083
|
+
day: Integer,
|
1084
|
+
month: T.nilable(Integer),
|
1085
|
+
year: T.nilable(Integer)
|
1086
|
+
}
|
1087
|
+
)
|
1088
|
+
end
|
1089
|
+
def to_hash
|
1090
|
+
end
|
886
1091
|
end
|
887
1092
|
|
888
1093
|
module DiscountInterval
|
889
1094
|
extend Orb::Internal::Type::Union
|
890
1095
|
|
1096
|
+
Variants =
|
1097
|
+
T.type_alias do
|
1098
|
+
T.any(
|
1099
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount,
|
1100
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage,
|
1101
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage
|
1102
|
+
)
|
1103
|
+
end
|
1104
|
+
|
891
1105
|
class Amount < Orb::Internal::Type::BaseModel
|
1106
|
+
OrHash =
|
1107
|
+
T.type_alias do
|
1108
|
+
T.any(
|
1109
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Amount,
|
1110
|
+
Orb::Internal::AnyHash
|
1111
|
+
)
|
1112
|
+
end
|
1113
|
+
|
892
1114
|
# Only available if discount_type is `amount`.
|
893
1115
|
sig { returns(String) }
|
894
1116
|
attr_accessor :amount_discount
|
@@ -920,8 +1142,7 @@ module Orb
|
|
920
1142
|
end_date: T.nilable(Time),
|
921
1143
|
start_date: Time,
|
922
1144
|
discount_type: Symbol
|
923
|
-
)
|
924
|
-
.returns(T.attached_class)
|
1145
|
+
).returns(T.attached_class)
|
925
1146
|
end
|
926
1147
|
def self.new(
|
927
1148
|
# Only available if discount_type is `amount`.
|
@@ -935,24 +1156,34 @@ module Orb
|
|
935
1156
|
# The start date of the discount interval.
|
936
1157
|
start_date:,
|
937
1158
|
discount_type: :amount
|
938
|
-
)
|
1159
|
+
)
|
1160
|
+
end
|
1161
|
+
|
939
1162
|
sig do
|
940
|
-
override
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
1163
|
+
override.returns(
|
1164
|
+
{
|
1165
|
+
amount_discount: String,
|
1166
|
+
applies_to_price_ids: T::Array[String],
|
1167
|
+
applies_to_price_interval_ids: T::Array[String],
|
1168
|
+
discount_type: Symbol,
|
1169
|
+
end_date: T.nilable(Time),
|
1170
|
+
start_date: Time
|
1171
|
+
}
|
1172
|
+
)
|
1173
|
+
end
|
1174
|
+
def to_hash
|
951
1175
|
end
|
952
|
-
def to_hash; end
|
953
1176
|
end
|
954
1177
|
|
955
1178
|
class Percentage < Orb::Internal::Type::BaseModel
|
1179
|
+
OrHash =
|
1180
|
+
T.type_alias do
|
1181
|
+
T.any(
|
1182
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Percentage,
|
1183
|
+
Orb::Internal::AnyHash
|
1184
|
+
)
|
1185
|
+
end
|
1186
|
+
|
956
1187
|
# The price ids that this discount interval applies to.
|
957
1188
|
sig { returns(T::Array[String]) }
|
958
1189
|
attr_accessor :applies_to_price_ids
|
@@ -985,8 +1216,7 @@ module Orb
|
|
985
1216
|
percentage_discount: Float,
|
986
1217
|
start_date: Time,
|
987
1218
|
discount_type: Symbol
|
988
|
-
)
|
989
|
-
.returns(T.attached_class)
|
1219
|
+
).returns(T.attached_class)
|
990
1220
|
end
|
991
1221
|
def self.new(
|
992
1222
|
# The price ids that this discount interval applies to.
|
@@ -1001,24 +1231,34 @@ module Orb
|
|
1001
1231
|
# The start date of the discount interval.
|
1002
1232
|
start_date:,
|
1003
1233
|
discount_type: :percentage
|
1004
|
-
)
|
1234
|
+
)
|
1235
|
+
end
|
1236
|
+
|
1005
1237
|
sig do
|
1006
|
-
override
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1238
|
+
override.returns(
|
1239
|
+
{
|
1240
|
+
applies_to_price_ids: T::Array[String],
|
1241
|
+
applies_to_price_interval_ids: T::Array[String],
|
1242
|
+
discount_type: Symbol,
|
1243
|
+
end_date: T.nilable(Time),
|
1244
|
+
percentage_discount: Float,
|
1245
|
+
start_date: Time
|
1246
|
+
}
|
1247
|
+
)
|
1248
|
+
end
|
1249
|
+
def to_hash
|
1017
1250
|
end
|
1018
|
-
def to_hash; end
|
1019
1251
|
end
|
1020
1252
|
|
1021
1253
|
class Usage < Orb::Internal::Type::BaseModel
|
1254
|
+
OrHash =
|
1255
|
+
T.type_alias do
|
1256
|
+
T.any(
|
1257
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Usage,
|
1258
|
+
Orb::Internal::AnyHash
|
1259
|
+
)
|
1260
|
+
end
|
1261
|
+
|
1022
1262
|
# The price ids that this discount interval applies to.
|
1023
1263
|
sig { returns(T::Array[String]) }
|
1024
1264
|
attr_accessor :applies_to_price_ids
|
@@ -1051,8 +1291,7 @@ module Orb
|
|
1051
1291
|
start_date: Time,
|
1052
1292
|
usage_discount: Float,
|
1053
1293
|
discount_type: Symbol
|
1054
|
-
)
|
1055
|
-
.returns(T.attached_class)
|
1294
|
+
).returns(T.attached_class)
|
1056
1295
|
end
|
1057
1296
|
def self.new(
|
1058
1297
|
# The price ids that this discount interval applies to.
|
@@ -1067,33 +1306,45 @@ module Orb
|
|
1067
1306
|
# discount is for
|
1068
1307
|
usage_discount:,
|
1069
1308
|
discount_type: :usage
|
1070
|
-
)
|
1309
|
+
)
|
1310
|
+
end
|
1311
|
+
|
1071
1312
|
sig do
|
1072
|
-
override
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1313
|
+
override.returns(
|
1314
|
+
{
|
1315
|
+
applies_to_price_ids: T::Array[String],
|
1316
|
+
applies_to_price_interval_ids: T::Array[String],
|
1317
|
+
discount_type: Symbol,
|
1318
|
+
end_date: T.nilable(Time),
|
1319
|
+
start_date: Time,
|
1320
|
+
usage_discount: Float
|
1321
|
+
}
|
1322
|
+
)
|
1323
|
+
end
|
1324
|
+
def to_hash
|
1083
1325
|
end
|
1084
|
-
def to_hash; end
|
1085
1326
|
end
|
1086
1327
|
|
1087
1328
|
sig do
|
1088
|
-
override
|
1089
|
-
|
1090
|
-
|
1091
|
-
|
1329
|
+
override.returns(
|
1330
|
+
T::Array[
|
1331
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::Variants
|
1332
|
+
]
|
1333
|
+
)
|
1334
|
+
end
|
1335
|
+
def self.variants
|
1092
1336
|
end
|
1093
|
-
def self.variants; end
|
1094
1337
|
end
|
1095
1338
|
|
1096
1339
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
1340
|
+
OrHash =
|
1341
|
+
T.type_alias do
|
1342
|
+
T.any(
|
1343
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule,
|
1344
|
+
Orb::Internal::AnyHash
|
1345
|
+
)
|
1346
|
+
end
|
1347
|
+
|
1097
1348
|
sig { returns(T.nilable(Time)) }
|
1098
1349
|
attr_accessor :end_date
|
1099
1350
|
|
@@ -1107,18 +1358,39 @@ module Orb
|
|
1107
1358
|
attr_accessor :start_date
|
1108
1359
|
|
1109
1360
|
sig do
|
1110
|
-
params(
|
1111
|
-
.
|
1361
|
+
params(
|
1362
|
+
end_date: T.nilable(Time),
|
1363
|
+
price_id: String,
|
1364
|
+
quantity: Float,
|
1365
|
+
start_date: Time
|
1366
|
+
).returns(T.attached_class)
|
1367
|
+
end
|
1368
|
+
def self.new(end_date:, price_id:, quantity:, start_date:)
|
1112
1369
|
end
|
1113
|
-
def self.new(end_date:, price_id:, quantity:, start_date:); end
|
1114
1370
|
|
1115
1371
|
sig do
|
1116
|
-
override.returns(
|
1372
|
+
override.returns(
|
1373
|
+
{
|
1374
|
+
end_date: T.nilable(Time),
|
1375
|
+
price_id: String,
|
1376
|
+
quantity: Float,
|
1377
|
+
start_date: Time
|
1378
|
+
}
|
1379
|
+
)
|
1380
|
+
end
|
1381
|
+
def to_hash
|
1117
1382
|
end
|
1118
|
-
def to_hash; end
|
1119
1383
|
end
|
1120
1384
|
|
1121
1385
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
1386
|
+
OrHash =
|
1387
|
+
T.type_alias do
|
1388
|
+
T.any(
|
1389
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval,
|
1390
|
+
Orb::Internal::AnyHash
|
1391
|
+
)
|
1392
|
+
end
|
1393
|
+
|
1122
1394
|
# The price ids that this maximum interval applies to.
|
1123
1395
|
sig { returns(T::Array[String]) }
|
1124
1396
|
attr_accessor :applies_to_price_ids
|
@@ -1147,8 +1419,7 @@ module Orb
|
|
1147
1419
|
end_date: T.nilable(Time),
|
1148
1420
|
maximum_amount: String,
|
1149
1421
|
start_date: Time
|
1150
|
-
)
|
1151
|
-
.returns(T.attached_class)
|
1422
|
+
).returns(T.attached_class)
|
1152
1423
|
end
|
1153
1424
|
def self.new(
|
1154
1425
|
# The price ids that this maximum interval applies to.
|
@@ -1162,23 +1433,33 @@ module Orb
|
|
1162
1433
|
maximum_amount:,
|
1163
1434
|
# The start date of the maximum interval.
|
1164
1435
|
start_date:
|
1165
|
-
)
|
1436
|
+
)
|
1437
|
+
end
|
1438
|
+
|
1166
1439
|
sig do
|
1167
|
-
override
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1440
|
+
override.returns(
|
1441
|
+
{
|
1442
|
+
applies_to_price_ids: T::Array[String],
|
1443
|
+
applies_to_price_interval_ids: T::Array[String],
|
1444
|
+
end_date: T.nilable(Time),
|
1445
|
+
maximum_amount: String,
|
1446
|
+
start_date: Time
|
1447
|
+
}
|
1448
|
+
)
|
1449
|
+
end
|
1450
|
+
def to_hash
|
1177
1451
|
end
|
1178
|
-
def to_hash; end
|
1179
1452
|
end
|
1180
1453
|
|
1181
1454
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
1455
|
+
OrHash =
|
1456
|
+
T.type_alias do
|
1457
|
+
T.any(
|
1458
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval,
|
1459
|
+
Orb::Internal::AnyHash
|
1460
|
+
)
|
1461
|
+
end
|
1462
|
+
|
1182
1463
|
# The price ids that this minimum interval applies to.
|
1183
1464
|
sig { returns(T::Array[String]) }
|
1184
1465
|
attr_accessor :applies_to_price_ids
|
@@ -1207,8 +1488,7 @@ module Orb
|
|
1207
1488
|
end_date: T.nilable(Time),
|
1208
1489
|
minimum_amount: String,
|
1209
1490
|
start_date: Time
|
1210
|
-
)
|
1211
|
-
.returns(T.attached_class)
|
1491
|
+
).returns(T.attached_class)
|
1212
1492
|
end
|
1213
1493
|
def self.new(
|
1214
1494
|
# The price ids that this minimum interval applies to.
|
@@ -1222,35 +1502,55 @@ module Orb
|
|
1222
1502
|
minimum_amount:,
|
1223
1503
|
# The start date of the minimum interval.
|
1224
1504
|
start_date:
|
1225
|
-
)
|
1505
|
+
)
|
1506
|
+
end
|
1507
|
+
|
1226
1508
|
sig do
|
1227
|
-
override
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
|
1509
|
+
override.returns(
|
1510
|
+
{
|
1511
|
+
applies_to_price_ids: T::Array[String],
|
1512
|
+
applies_to_price_interval_ids: T::Array[String],
|
1513
|
+
end_date: T.nilable(Time),
|
1514
|
+
minimum_amount: String,
|
1515
|
+
start_date: Time
|
1516
|
+
}
|
1517
|
+
)
|
1518
|
+
end
|
1519
|
+
def to_hash
|
1237
1520
|
end
|
1238
|
-
def to_hash; end
|
1239
1521
|
end
|
1240
1522
|
|
1241
1523
|
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1524
|
+
OrHash =
|
1525
|
+
T.type_alias do
|
1526
|
+
T.any(
|
1527
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PendingSubscriptionChange,
|
1528
|
+
Orb::Internal::AnyHash
|
1529
|
+
)
|
1530
|
+
end
|
1531
|
+
|
1242
1532
|
sig { returns(String) }
|
1243
1533
|
attr_accessor :id
|
1244
1534
|
|
1245
1535
|
# A pending subscription change if one exists on this subscription.
|
1246
1536
|
sig { params(id: String).returns(T.attached_class) }
|
1247
|
-
def self.new(id:)
|
1537
|
+
def self.new(id:)
|
1538
|
+
end
|
1248
1539
|
|
1249
|
-
sig { override.returns({id: String}) }
|
1250
|
-
def to_hash
|
1540
|
+
sig { override.returns({ id: String }) }
|
1541
|
+
def to_hash
|
1542
|
+
end
|
1251
1543
|
end
|
1252
1544
|
|
1253
1545
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
1546
|
+
OrHash =
|
1547
|
+
T.type_alias do
|
1548
|
+
T.any(
|
1549
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval,
|
1550
|
+
Orb::Internal::AnyHash
|
1551
|
+
)
|
1552
|
+
end
|
1553
|
+
|
1254
1554
|
sig { returns(String) }
|
1255
1555
|
attr_accessor :id
|
1256
1556
|
|
@@ -1284,7 +1584,9 @@ module Orb
|
|
1284
1584
|
sig do
|
1285
1585
|
returns(
|
1286
1586
|
T.nilable(
|
1287
|
-
T::Array[
|
1587
|
+
T::Array[
|
1588
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition
|
1589
|
+
]
|
1288
1590
|
)
|
1289
1591
|
)
|
1290
1592
|
end
|
@@ -1303,34 +1605,34 @@ module Orb
|
|
1303
1605
|
sig do
|
1304
1606
|
returns(
|
1305
1607
|
T.any(
|
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::
|
1321
|
-
Orb::
|
1322
|
-
Orb::
|
1323
|
-
Orb::
|
1324
|
-
Orb::
|
1325
|
-
Orb::
|
1326
|
-
Orb::
|
1327
|
-
Orb::
|
1328
|
-
Orb::
|
1329
|
-
Orb::
|
1330
|
-
Orb::
|
1331
|
-
Orb::
|
1332
|
-
Orb::
|
1333
|
-
Orb::
|
1608
|
+
Orb::Price::Unit,
|
1609
|
+
Orb::Price::Package,
|
1610
|
+
Orb::Price::Matrix,
|
1611
|
+
Orb::Price::Tiered,
|
1612
|
+
Orb::Price::TieredBps,
|
1613
|
+
Orb::Price::Bps,
|
1614
|
+
Orb::Price::BulkBps,
|
1615
|
+
Orb::Price::Bulk,
|
1616
|
+
Orb::Price::ThresholdTotalAmount,
|
1617
|
+
Orb::Price::TieredPackage,
|
1618
|
+
Orb::Price::GroupedTiered,
|
1619
|
+
Orb::Price::TieredWithMinimum,
|
1620
|
+
Orb::Price::TieredPackageWithMinimum,
|
1621
|
+
Orb::Price::PackageWithAllocation,
|
1622
|
+
Orb::Price::UnitWithPercent,
|
1623
|
+
Orb::Price::MatrixWithAllocation,
|
1624
|
+
Orb::Price::TieredWithProration,
|
1625
|
+
Orb::Price::UnitWithProration,
|
1626
|
+
Orb::Price::GroupedAllocation,
|
1627
|
+
Orb::Price::GroupedWithProratedMinimum,
|
1628
|
+
Orb::Price::GroupedWithMeteredMinimum,
|
1629
|
+
Orb::Price::MatrixWithDisplayName,
|
1630
|
+
Orb::Price::BulkWithProration,
|
1631
|
+
Orb::Price::GroupedTieredPackage,
|
1632
|
+
Orb::Price::MaxGroupTieredPackage,
|
1633
|
+
Orb::Price::ScalableMatrixWithUnitPricing,
|
1634
|
+
Orb::Price::ScalableMatrixWithTieredPricing,
|
1635
|
+
Orb::Price::CumulativeGroupedBulk
|
1334
1636
|
)
|
1335
1637
|
)
|
1336
1638
|
end
|
@@ -1357,49 +1659,46 @@ module Orb
|
|
1357
1659
|
current_billing_period_start_date: T.nilable(Time),
|
1358
1660
|
end_date: T.nilable(Time),
|
1359
1661
|
filter: T.nilable(String),
|
1360
|
-
fixed_fee_quantity_transitions:
|
1361
|
-
T
|
1362
|
-
T
|
1363
|
-
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
Orb::Models::Price::CumulativeGroupedBulk
|
1398
|
-
),
|
1662
|
+
fixed_fee_quantity_transitions:
|
1663
|
+
T.nilable(
|
1664
|
+
T::Array[
|
1665
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition::OrHash
|
1666
|
+
]
|
1667
|
+
),
|
1668
|
+
price:
|
1669
|
+
T.any(
|
1670
|
+
Orb::Price::Unit::OrHash,
|
1671
|
+
Orb::Price::Package::OrHash,
|
1672
|
+
Orb::Price::Matrix::OrHash,
|
1673
|
+
Orb::Price::Tiered::OrHash,
|
1674
|
+
Orb::Price::TieredBps::OrHash,
|
1675
|
+
Orb::Price::Bps::OrHash,
|
1676
|
+
Orb::Price::BulkBps::OrHash,
|
1677
|
+
Orb::Price::Bulk::OrHash,
|
1678
|
+
Orb::Price::ThresholdTotalAmount::OrHash,
|
1679
|
+
Orb::Price::TieredPackage::OrHash,
|
1680
|
+
Orb::Price::GroupedTiered::OrHash,
|
1681
|
+
Orb::Price::TieredWithMinimum::OrHash,
|
1682
|
+
Orb::Price::TieredPackageWithMinimum::OrHash,
|
1683
|
+
Orb::Price::PackageWithAllocation::OrHash,
|
1684
|
+
Orb::Price::UnitWithPercent::OrHash,
|
1685
|
+
Orb::Price::MatrixWithAllocation::OrHash,
|
1686
|
+
Orb::Price::TieredWithProration::OrHash,
|
1687
|
+
Orb::Price::UnitWithProration::OrHash,
|
1688
|
+
Orb::Price::GroupedAllocation::OrHash,
|
1689
|
+
Orb::Price::GroupedWithProratedMinimum::OrHash,
|
1690
|
+
Orb::Price::GroupedWithMeteredMinimum::OrHash,
|
1691
|
+
Orb::Price::MatrixWithDisplayName::OrHash,
|
1692
|
+
Orb::Price::BulkWithProration::OrHash,
|
1693
|
+
Orb::Price::GroupedTieredPackage::OrHash,
|
1694
|
+
Orb::Price::MaxGroupTieredPackage::OrHash,
|
1695
|
+
Orb::Price::ScalableMatrixWithUnitPricing::OrHash,
|
1696
|
+
Orb::Price::ScalableMatrixWithTieredPricing::OrHash,
|
1697
|
+
Orb::Price::CumulativeGroupedBulk::OrHash
|
1698
|
+
),
|
1399
1699
|
start_date: Time,
|
1400
1700
|
usage_customer_ids: T.nilable(T::Array[String])
|
1401
|
-
)
|
1402
|
-
.returns(T.attached_class)
|
1701
|
+
).returns(T.attached_class)
|
1403
1702
|
end
|
1404
1703
|
def self.new(
|
1405
1704
|
id:,
|
@@ -1438,58 +1737,72 @@ module Orb
|
|
1438
1737
|
# A list of customer IDs whose usage events will be aggregated and billed under
|
1439
1738
|
# this price interval.
|
1440
1739
|
usage_customer_ids:
|
1441
|
-
)
|
1740
|
+
)
|
1741
|
+
end
|
1742
|
+
|
1442
1743
|
sig do
|
1443
|
-
override
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
|
1451
|
-
|
1452
|
-
|
1453
|
-
T::Array[
|
1744
|
+
override.returns(
|
1745
|
+
{
|
1746
|
+
id: String,
|
1747
|
+
billing_cycle_day: Integer,
|
1748
|
+
current_billing_period_end_date: T.nilable(Time),
|
1749
|
+
current_billing_period_start_date: T.nilable(Time),
|
1750
|
+
end_date: T.nilable(Time),
|
1751
|
+
filter: T.nilable(String),
|
1752
|
+
fixed_fee_quantity_transitions:
|
1753
|
+
T.nilable(
|
1754
|
+
T::Array[
|
1755
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition
|
1756
|
+
]
|
1454
1757
|
),
|
1455
|
-
|
1456
|
-
|
1457
|
-
Orb::
|
1458
|
-
Orb::
|
1459
|
-
Orb::
|
1460
|
-
Orb::
|
1461
|
-
Orb::
|
1462
|
-
Orb::
|
1463
|
-
Orb::
|
1464
|
-
Orb::
|
1465
|
-
Orb::
|
1466
|
-
Orb::
|
1467
|
-
Orb::
|
1468
|
-
Orb::
|
1469
|
-
Orb::
|
1470
|
-
Orb::
|
1471
|
-
Orb::
|
1472
|
-
Orb::
|
1473
|
-
Orb::
|
1474
|
-
Orb::
|
1475
|
-
Orb::
|
1476
|
-
Orb::
|
1477
|
-
Orb::
|
1478
|
-
Orb::
|
1479
|
-
Orb::
|
1480
|
-
Orb::
|
1481
|
-
Orb::
|
1482
|
-
Orb::
|
1483
|
-
Orb::
|
1758
|
+
price:
|
1759
|
+
T.any(
|
1760
|
+
Orb::Price::Unit,
|
1761
|
+
Orb::Price::Package,
|
1762
|
+
Orb::Price::Matrix,
|
1763
|
+
Orb::Price::Tiered,
|
1764
|
+
Orb::Price::TieredBps,
|
1765
|
+
Orb::Price::Bps,
|
1766
|
+
Orb::Price::BulkBps,
|
1767
|
+
Orb::Price::Bulk,
|
1768
|
+
Orb::Price::ThresholdTotalAmount,
|
1769
|
+
Orb::Price::TieredPackage,
|
1770
|
+
Orb::Price::GroupedTiered,
|
1771
|
+
Orb::Price::TieredWithMinimum,
|
1772
|
+
Orb::Price::TieredPackageWithMinimum,
|
1773
|
+
Orb::Price::PackageWithAllocation,
|
1774
|
+
Orb::Price::UnitWithPercent,
|
1775
|
+
Orb::Price::MatrixWithAllocation,
|
1776
|
+
Orb::Price::TieredWithProration,
|
1777
|
+
Orb::Price::UnitWithProration,
|
1778
|
+
Orb::Price::GroupedAllocation,
|
1779
|
+
Orb::Price::GroupedWithProratedMinimum,
|
1780
|
+
Orb::Price::GroupedWithMeteredMinimum,
|
1781
|
+
Orb::Price::MatrixWithDisplayName,
|
1782
|
+
Orb::Price::BulkWithProration,
|
1783
|
+
Orb::Price::GroupedTieredPackage,
|
1784
|
+
Orb::Price::MaxGroupTieredPackage,
|
1785
|
+
Orb::Price::ScalableMatrixWithUnitPricing,
|
1786
|
+
Orb::Price::ScalableMatrixWithTieredPricing,
|
1787
|
+
Orb::Price::CumulativeGroupedBulk
|
1484
1788
|
),
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1789
|
+
start_date: Time,
|
1790
|
+
usage_customer_ids: T.nilable(T::Array[String])
|
1791
|
+
}
|
1792
|
+
)
|
1793
|
+
end
|
1794
|
+
def to_hash
|
1489
1795
|
end
|
1490
|
-
def to_hash; end
|
1491
1796
|
|
1492
1797
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1798
|
+
OrHash =
|
1799
|
+
T.type_alias do
|
1800
|
+
T.any(
|
1801
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition,
|
1802
|
+
Orb::Internal::AnyHash
|
1803
|
+
)
|
1804
|
+
end
|
1805
|
+
|
1493
1806
|
sig { returns(Time) }
|
1494
1807
|
attr_accessor :effective_date
|
1495
1808
|
|
@@ -1499,15 +1812,35 @@ module Orb
|
|
1499
1812
|
sig { returns(Integer) }
|
1500
1813
|
attr_accessor :quantity
|
1501
1814
|
|
1502
|
-
sig
|
1503
|
-
|
1815
|
+
sig do
|
1816
|
+
params(
|
1817
|
+
effective_date: Time,
|
1818
|
+
price_id: String,
|
1819
|
+
quantity: Integer
|
1820
|
+
).returns(T.attached_class)
|
1821
|
+
end
|
1822
|
+
def self.new(effective_date:, price_id:, quantity:)
|
1823
|
+
end
|
1504
1824
|
|
1505
|
-
sig
|
1506
|
-
|
1825
|
+
sig do
|
1826
|
+
override.returns(
|
1827
|
+
{ effective_date: Time, price_id: String, quantity: Integer }
|
1828
|
+
)
|
1829
|
+
end
|
1830
|
+
def to_hash
|
1831
|
+
end
|
1507
1832
|
end
|
1508
1833
|
end
|
1509
1834
|
|
1510
1835
|
class RedeemedCoupon < Orb::Internal::Type::BaseModel
|
1836
|
+
OrHash =
|
1837
|
+
T.type_alias do
|
1838
|
+
T.any(
|
1839
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon,
|
1840
|
+
Orb::Internal::AnyHash
|
1841
|
+
)
|
1842
|
+
end
|
1843
|
+
|
1511
1844
|
sig { returns(String) }
|
1512
1845
|
attr_accessor :coupon_id
|
1513
1846
|
|
@@ -1518,54 +1851,104 @@ module Orb
|
|
1518
1851
|
attr_accessor :start_date
|
1519
1852
|
|
1520
1853
|
sig do
|
1521
|
-
params(
|
1854
|
+
params(
|
1855
|
+
coupon_id: String,
|
1856
|
+
end_date: T.nilable(Time),
|
1857
|
+
start_date: Time
|
1858
|
+
).returns(T.attached_class)
|
1859
|
+
end
|
1860
|
+
def self.new(coupon_id:, end_date:, start_date:)
|
1522
1861
|
end
|
1523
|
-
def self.new(coupon_id:, end_date:, start_date:); end
|
1524
1862
|
|
1525
|
-
sig
|
1526
|
-
|
1863
|
+
sig do
|
1864
|
+
override.returns(
|
1865
|
+
{ coupon_id: String, end_date: T.nilable(Time), start_date: Time }
|
1866
|
+
)
|
1867
|
+
end
|
1868
|
+
def to_hash
|
1869
|
+
end
|
1527
1870
|
end
|
1528
1871
|
|
1529
1872
|
module Status
|
1530
1873
|
extend Orb::Internal::Type::Enum
|
1531
1874
|
|
1532
|
-
TaggedSymbol =
|
1875
|
+
TaggedSymbol =
|
1876
|
+
T.type_alias do
|
1877
|
+
T.all(Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::Status)
|
1878
|
+
end
|
1533
1879
|
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1534
1880
|
|
1535
|
-
ACTIVE =
|
1536
|
-
|
1537
|
-
|
1881
|
+
ACTIVE =
|
1882
|
+
T.let(
|
1883
|
+
:active,
|
1884
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol
|
1885
|
+
)
|
1886
|
+
ENDED =
|
1887
|
+
T.let(
|
1888
|
+
:ended,
|
1889
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol
|
1890
|
+
)
|
1891
|
+
UPCOMING =
|
1892
|
+
T.let(
|
1893
|
+
:upcoming,
|
1894
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol
|
1895
|
+
)
|
1538
1896
|
|
1539
|
-
sig
|
1540
|
-
|
1897
|
+
sig do
|
1898
|
+
override.returns(
|
1899
|
+
T::Array[
|
1900
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol
|
1901
|
+
]
|
1902
|
+
)
|
1903
|
+
end
|
1904
|
+
def self.values
|
1905
|
+
end
|
1541
1906
|
end
|
1542
1907
|
|
1543
1908
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
1909
|
+
OrHash =
|
1910
|
+
T.type_alias do
|
1911
|
+
T.any(
|
1912
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo,
|
1913
|
+
Orb::Internal::AnyHash
|
1914
|
+
)
|
1915
|
+
end
|
1916
|
+
|
1544
1917
|
sig { returns(T.nilable(Time)) }
|
1545
1918
|
attr_accessor :end_date
|
1546
1919
|
|
1547
1920
|
sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
|
1548
|
-
def self.new(end_date:)
|
1921
|
+
def self.new(end_date:)
|
1922
|
+
end
|
1549
1923
|
|
1550
|
-
sig { override.returns({end_date: T.nilable(Time)}) }
|
1551
|
-
def to_hash
|
1924
|
+
sig { override.returns({ end_date: T.nilable(Time) }) }
|
1925
|
+
def to_hash
|
1926
|
+
end
|
1552
1927
|
end
|
1553
1928
|
|
1554
1929
|
class ChangedResources < Orb::Internal::Type::BaseModel
|
1930
|
+
OrHash =
|
1931
|
+
T.type_alias do
|
1932
|
+
T.any(
|
1933
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::ChangedResources,
|
1934
|
+
Orb::Internal::AnyHash
|
1935
|
+
)
|
1936
|
+
end
|
1937
|
+
|
1555
1938
|
# The credit notes that were created as part of this operation.
|
1556
|
-
sig { returns(T::Array[Orb::
|
1939
|
+
sig { returns(T::Array[Orb::CreditNote]) }
|
1557
1940
|
attr_accessor :created_credit_notes
|
1558
1941
|
|
1559
1942
|
# The invoices that were created as part of this operation.
|
1560
|
-
sig { returns(T::Array[Orb::
|
1943
|
+
sig { returns(T::Array[Orb::Invoice]) }
|
1561
1944
|
attr_accessor :created_invoices
|
1562
1945
|
|
1563
1946
|
# The credit notes that were voided as part of this operation.
|
1564
|
-
sig { returns(T::Array[Orb::
|
1947
|
+
sig { returns(T::Array[Orb::CreditNote]) }
|
1565
1948
|
attr_accessor :voided_credit_notes
|
1566
1949
|
|
1567
1950
|
# The invoices that were voided as part of this operation.
|
1568
|
-
sig { returns(T::Array[Orb::
|
1951
|
+
sig { returns(T::Array[Orb::Invoice]) }
|
1569
1952
|
attr_accessor :voided_invoices
|
1570
1953
|
|
1571
1954
|
# The resources that were changed as part of this operation. Only present when
|
@@ -1573,12 +1956,11 @@ module Orb
|
|
1573
1956
|
# `include_changed_resources` parameter was passed in the request.
|
1574
1957
|
sig do
|
1575
1958
|
params(
|
1576
|
-
created_credit_notes: T::Array[
|
1577
|
-
created_invoices: T::Array[
|
1578
|
-
voided_credit_notes: T::Array[
|
1579
|
-
voided_invoices: T::Array[
|
1580
|
-
)
|
1581
|
-
.returns(T.attached_class)
|
1959
|
+
created_credit_notes: T::Array[Orb::CreditNote::OrHash],
|
1960
|
+
created_invoices: T::Array[Orb::Invoice::OrHash],
|
1961
|
+
voided_credit_notes: T::Array[Orb::CreditNote::OrHash],
|
1962
|
+
voided_invoices: T::Array[Orb::Invoice::OrHash]
|
1963
|
+
).returns(T.attached_class)
|
1582
1964
|
end
|
1583
1965
|
def self.new(
|
1584
1966
|
# The credit notes that were created as part of this operation.
|
@@ -1589,19 +1971,21 @@ module Orb
|
|
1589
1971
|
voided_credit_notes:,
|
1590
1972
|
# The invoices that were voided as part of this operation.
|
1591
1973
|
voided_invoices:
|
1592
|
-
)
|
1974
|
+
)
|
1975
|
+
end
|
1976
|
+
|
1593
1977
|
sig do
|
1594
|
-
override
|
1595
|
-
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
|
1602
|
-
|
1978
|
+
override.returns(
|
1979
|
+
{
|
1980
|
+
created_credit_notes: T::Array[Orb::CreditNote],
|
1981
|
+
created_invoices: T::Array[Orb::Invoice],
|
1982
|
+
voided_credit_notes: T::Array[Orb::CreditNote],
|
1983
|
+
voided_invoices: T::Array[Orb::Invoice]
|
1984
|
+
}
|
1985
|
+
)
|
1986
|
+
end
|
1987
|
+
def to_hash
|
1603
1988
|
end
|
1604
|
-
def to_hash; end
|
1605
1989
|
end
|
1606
1990
|
end
|
1607
1991
|
end
|