orb-billing 0.1.0.pre.alpha.38 → 0.1.1
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/README.md +10 -2
- data/lib/orb/client.rb +4 -0
- data/lib/orb/internal/transport/base_client.rb +2 -2
- data/lib/orb/internal/transport/pooled_net_requester.rb +15 -6
- data/lib/orb/internal/type/array_of.rb +12 -2
- data/lib/orb/internal/type/base_model.rb +23 -22
- data/lib/orb/internal/type/boolean.rb +5 -1
- data/lib/orb/internal/type/converter.rb +62 -39
- data/lib/orb/internal/type/enum.rb +13 -9
- data/lib/orb/internal/type/hash_of.rb +6 -2
- data/lib/orb/internal/type/io_like.rb +75 -0
- data/lib/orb/internal/type/request_parameters.rb +11 -2
- data/lib/orb/internal/type/union.rb +7 -3
- data/lib/orb/internal/type/unknown.rb +5 -1
- data/lib/orb/internal/util.rb +81 -26
- data/lib/orb/models/alert.rb +9 -9
- data/lib/orb/models/alert_create_for_customer_params.rb +3 -3
- data/lib/orb/models/alert_create_for_external_customer_params.rb +3 -3
- data/lib/orb/models/alert_create_for_subscription_params.rb +3 -3
- data/lib/orb/models/alert_list_params.rb +5 -5
- data/lib/orb/models/alert_update_params.rb +3 -3
- data/lib/orb/models/amount_discount.rb +1 -1
- data/lib/orb/models/billable_metric.rb +7 -7
- data/lib/orb/models/coupon.rb +7 -7
- data/lib/orb/models/coupon_create_params.rb +2 -2
- data/lib/orb/models/coupon_list_params.rb +2 -2
- data/lib/orb/models/coupons/subscription_list_params.rb +1 -1
- data/lib/orb/models/credit_note.rb +1 -1
- data/lib/orb/models/credit_note_list_params.rb +5 -5
- data/lib/orb/models/customer.rb +232 -232
- data/lib/orb/models/customer_create_params.rb +223 -223
- data/lib/orb/models/customer_list_params.rb +5 -5
- data/lib/orb/models/customer_update_by_external_id_params.rb +224 -224
- data/lib/orb/models/customer_update_params.rb +224 -224
- data/lib/orb/models/customers/balance_transaction_create_response.rb +2 -2
- data/lib/orb/models/customers/balance_transaction_list_params.rb +5 -5
- data/lib/orb/models/customers/balance_transaction_list_response.rb +2 -2
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +6 -6
- data/lib/orb/models/customers/cost_list_params.rb +6 -6
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +2 -2
- data/lib/orb/models/customers/credit_list_params.rb +2 -2
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +20 -20
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +20 -20
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +5 -5
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +22 -22
- data/lib/orb/models/customers/credits/ledger_list_params.rb +5 -5
- data/lib/orb/models/customers/credits/ledger_list_response.rb +22 -22
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +8 -8
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_create_params.rb +8 -8
- data/lib/orb/models/customers/credits/top_up_create_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +7 -7
- data/lib/orb/models/customers/credits/top_up_list_params.rb +1 -1
- data/lib/orb/models/customers/credits/top_up_list_response.rb +7 -7
- data/lib/orb/models/dimensional_price_group.rb +7 -7
- data/lib/orb/models/dimensional_price_group_create_params.rb +2 -2
- data/lib/orb/models/dimensional_price_group_list_params.rb +1 -1
- data/lib/orb/models/event_ingest_params.rb +7 -7
- data/lib/orb/models/event_ingest_response.rb +4 -4
- data/lib/orb/models/event_search_params.rb +5 -5
- data/lib/orb/models/event_search_response.rb +8 -8
- data/lib/orb/models/event_update_params.rb +4 -4
- data/lib/orb/models/events/backfill_close_response.rb +7 -7
- data/lib/orb/models/events/backfill_create_params.rb +11 -11
- data/lib/orb/models/events/backfill_create_response.rb +7 -7
- data/lib/orb/models/events/backfill_fetch_response.rb +7 -7
- data/lib/orb/models/events/backfill_list_params.rb +1 -1
- data/lib/orb/models/events/backfill_list_response.rb +7 -7
- data/lib/orb/models/events/backfill_revert_response.rb +7 -7
- data/lib/orb/models/events/event_volumes.rb +1 -1
- data/lib/orb/models/events/volume_list_params.rb +7 -7
- data/lib/orb/models/invoice.rb +270 -270
- data/lib/orb/models/invoice_create_params.rb +12 -11
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +266 -266
- data/lib/orb/models/invoice_issue_params.rb +4 -4
- data/lib/orb/models/invoice_line_item_create_params.rb +1 -1
- data/lib/orb/models/invoice_line_item_create_response.rb +27 -27
- data/lib/orb/models/invoice_list_params.rb +12 -12
- data/lib/orb/models/invoice_update_params.rb +2 -2
- data/lib/orb/models/item.rb +2 -2
- data/lib/orb/models/item_list_params.rb +1 -1
- data/lib/orb/models/metric_create_params.rb +2 -2
- data/lib/orb/models/metric_list_params.rb +5 -5
- data/lib/orb/models/metric_update_params.rb +2 -2
- data/lib/orb/models/percentage_discount.rb +2 -2
- data/lib/orb/models/plan.rb +35 -35
- data/lib/orb/models/plan_create_params.rb +267 -267
- data/lib/orb/models/plan_list_params.rb +5 -5
- data/lib/orb/models/plan_update_params.rb +4 -4
- data/lib/orb/models/plans/external_plan_id_update_params.rb +4 -4
- data/lib/orb/models/price.rb +158 -158
- data/lib/orb/models/price_create_params.rb +20 -20
- data/lib/orb/models/price_evaluate_params.rb +4 -4
- data/lib/orb/models/price_list_params.rb +1 -1
- data/lib/orb/models/price_update_params.rb +2 -2
- data/lib/orb/models/prices/external_price_id_update_params.rb +2 -2
- data/lib/orb/models/subscription.rb +114 -87
- data/lib/orb/models/subscription_cancel_params.rb +3 -3
- data/lib/orb/models/subscription_cancel_response.rb +150 -72
- data/lib/orb/models/subscription_change_apply_params.rb +33 -0
- data/lib/orb/models/subscription_change_apply_response.rb +1372 -0
- data/lib/orb/models/subscription_change_cancel_params.rb +19 -0
- data/lib/orb/models/subscription_change_cancel_response.rb +1372 -0
- data/lib/orb/models/subscription_change_retrieve_params.rb +19 -0
- data/lib/orb/models/subscription_change_retrieve_response.rb +1372 -0
- data/lib/orb/models/subscription_create_params.rb +641 -641
- data/lib/orb/models/subscription_create_response.rb +150 -72
- data/lib/orb/models/subscription_fetch_costs_params.rb +6 -6
- data/lib/orb/models/subscription_fetch_schedule_params.rb +5 -5
- data/lib/orb/models/subscription_fetch_schedule_response.rb +2 -2
- data/lib/orb/models/subscription_fetch_usage_params.rb +8 -8
- data/lib/orb/models/subscription_list_params.rb +5 -5
- data/lib/orb/models/subscription_price_intervals_params.rb +323 -323
- data/lib/orb/models/subscription_price_intervals_response.rb +152 -72
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +651 -651
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +152 -72
- data/lib/orb/models/subscription_trigger_phase_params.rb +3 -3
- data/lib/orb/models/subscription_trigger_phase_response.rb +152 -72
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +152 -72
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +153 -73
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +152 -72
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +8 -8
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +152 -72
- data/lib/orb/models/subscription_update_params.rb +10 -10
- data/lib/orb/models/subscription_update_trial_params.rb +3 -3
- data/lib/orb/models/subscription_update_trial_response.rb +152 -72
- data/lib/orb/models/trial_discount.rb +1 -1
- data/lib/orb/models/usage_discount.rb +2 -2
- data/lib/orb/request_options.rb +7 -7
- data/lib/orb/resources/alerts.rb +38 -38
- data/lib/orb/resources/coupons/subscriptions.rb +3 -3
- data/lib/orb/resources/coupons.rb +9 -9
- data/lib/orb/resources/credit_notes.rb +8 -8
- data/lib/orb/resources/customers/balance_transactions.rb +26 -26
- data/lib/orb/resources/customers/costs.rb +232 -232
- data/lib/orb/resources/customers/credits/ledger.rb +344 -344
- data/lib/orb/resources/customers/credits/top_ups.rb +12 -12
- data/lib/orb/resources/customers/credits.rb +8 -8
- data/lib/orb/resources/customers.rb +59 -59
- data/lib/orb/resources/dimensional_price_groups.rb +6 -6
- data/lib/orb/resources/events/backfills.rb +49 -49
- data/lib/orb/resources/events/volume.rb +10 -10
- data/lib/orb/resources/events.rb +295 -295
- data/lib/orb/resources/invoice_line_items.rb +1 -1
- data/lib/orb/resources/invoices.rb +38 -38
- data/lib/orb/resources/items.rb +1 -1
- data/lib/orb/resources/metrics.rb +11 -11
- data/lib/orb/resources/plans/external_plan_id.rb +14 -14
- data/lib/orb/resources/plans.rb +22 -22
- data/lib/orb/resources/prices/external_price_id.rb +4 -4
- data/lib/orb/resources/prices.rb +30 -30
- data/lib/orb/resources/subscription_changes.rb +87 -0
- data/lib/orb/resources/subscriptions.rb +813 -813
- data/lib/orb/resources/top_level.rb +4 -4
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +8 -0
- data/rbi/lib/orb/client.rbi +5 -4
- data/rbi/lib/orb/errors.rbi +3 -6
- data/rbi/lib/orb/internal/page.rbi +3 -6
- data/rbi/lib/orb/internal/transport/base_client.rbi +13 -27
- data/rbi/lib/orb/internal/transport/pooled_net_requester.rbi +8 -14
- data/rbi/lib/orb/internal/type/array_of.rbi +14 -18
- data/rbi/lib/orb/internal/type/base_model.rbi +51 -66
- data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
- data/rbi/lib/orb/internal/type/boolean.rbi +12 -10
- data/rbi/lib/orb/internal/type/converter.rbi +44 -37
- data/rbi/lib/orb/internal/type/enum.rbi +24 -21
- data/rbi/lib/orb/internal/type/hash_of.rbi +13 -18
- data/rbi/lib/orb/internal/type/io_like.rbi +49 -0
- data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
- data/rbi/lib/orb/internal/type/union.rbi +19 -21
- data/rbi/lib/orb/internal/type/unknown.rbi +10 -9
- data/rbi/lib/orb/internal/util.rbi +67 -70
- data/rbi/lib/orb/internal.rbi +1 -1
- data/rbi/lib/orb/models/alert.rbi +21 -33
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +8 -13
- data/rbi/lib/orb/models/alert_disable_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_enable_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_list_params.rbi +3 -6
- data/rbi/lib/orb/models/alert_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/alert_update_params.rbi +7 -11
- data/rbi/lib/orb/models/amount_discount.rbi +4 -7
- data/rbi/lib/orb/models/billable_metric.rbi +10 -13
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +1 -2
- data/rbi/lib/orb/models/coupon.rbi +9 -11
- data/rbi/lib/orb/models/coupon_archive_params.rbi +2 -4
- data/rbi/lib/orb/models/coupon_create_params.rbi +8 -14
- data/rbi/lib/orb/models/coupon_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/coupon_list_params.rbi +3 -4
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +3 -5
- data/rbi/lib/orb/models/credit_note.rbi +22 -45
- data/rbi/lib/orb/models/credit_note_create_params.rbi +5 -10
- data/rbi/lib/orb/models/credit_note_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/credit_note_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customer.rbi +256 -281
- data/rbi/lib/orb/models/customer_create_params.rbi +251 -276
- data/rbi/lib/orb/models/customer_delete_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +2 -4
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +252 -277
- data/rbi/lib/orb/models/customer_update_params.rbi +252 -277
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +3 -6
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +10 -19
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +3 -6
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +10 -19
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +8 -10
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +6 -12
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +8 -10
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +6 -12
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +3 -4
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +2 -4
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +3 -4
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +26 -33
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +79 -136
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +26 -33
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +78 -135
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +5 -10
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +79 -136
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +5 -10
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +74 -131
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +13 -19
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +13 -19
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +2 -4
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +3 -5
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +12 -18
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +3 -5
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +12 -18
- data/rbi/lib/orb/models/dimensional_price_group.rbi +8 -9
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +4 -7
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +3 -5
- data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +2 -4
- data/rbi/lib/orb/models/dimensional_price_groups.rbi +2 -4
- data/rbi/lib/orb/models/discount.rbi +1 -2
- data/rbi/lib/orb/models/evaluate_price_group.rbi +3 -6
- data/rbi/lib/orb/models/event_deprecate_params.rbi +2 -4
- data/rbi/lib/orb/models/event_deprecate_response.rbi +2 -4
- data/rbi/lib/orb/models/event_ingest_params.rbi +10 -13
- data/rbi/lib/orb/models/event_ingest_response.rbi +10 -16
- data/rbi/lib/orb/models/event_search_params.rbi +7 -9
- data/rbi/lib/orb/models/event_search_response.rbi +11 -14
- data/rbi/lib/orb/models/event_update_params.rbi +5 -6
- data/rbi/lib/orb/models/event_update_response.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_close_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +13 -16
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +3 -5
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +10 -14
- data/rbi/lib/orb/models/events/backfill_revert_params.rbi +2 -4
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +10 -14
- data/rbi/lib/orb/models/events/event_volumes.rbi +5 -9
- data/rbi/lib/orb/models/events/volume_list_params.rbi +9 -11
- data/rbi/lib/orb/models/invoice.rbi +388 -465
- data/rbi/lib/orb/models/invoice_create_params.rbi +19 -26
- data/rbi/lib/orb/models/invoice_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +381 -460
- data/rbi/lib/orb/models/invoice_issue_params.rbi +6 -8
- data/rbi/lib/orb/models/invoice_level_discount.rbi +1 -2
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +3 -5
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +101 -143
- data/rbi/lib/orb/models/invoice_list_params.rbi +8 -13
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_pay_params.rbi +2 -4
- data/rbi/lib/orb/models/invoice_update_params.rbi +4 -6
- data/rbi/lib/orb/models/invoice_void_params.rbi +2 -4
- data/rbi/lib/orb/models/item.rbi +7 -12
- data/rbi/lib/orb/models/item_create_params.rbi +2 -4
- data/rbi/lib/orb/models/item_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/item_list_params.rbi +3 -5
- data/rbi/lib/orb/models/item_update_params.rbi +5 -10
- data/rbi/lib/orb/models/metric_create_params.rbi +4 -6
- data/rbi/lib/orb/models/metric_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/metric_list_params.rbi +3 -6
- data/rbi/lib/orb/models/metric_update_params.rbi +4 -6
- data/rbi/lib/orb/models/pagination_metadata.rbi +2 -4
- data/rbi/lib/orb/models/percentage_discount.rbi +5 -8
- data/rbi/lib/orb/models/plan.rbi +180 -219
- data/rbi/lib/orb/models/plan_create_params.rbi +670 -951
- data/rbi/lib/orb/models/plan_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/plan_list_params.rbi +4 -8
- data/rbi/lib/orb/models/plan_update_params.rbi +6 -8
- data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +6 -8
- data/rbi/lib/orb/models/price.rbi +827 -1494
- data/rbi/lib/orb/models/price_create_params.rbi +60 -101
- data/rbi/lib/orb/models/price_evaluate_params.rbi +6 -9
- data/rbi/lib/orb/models/price_evaluate_response.rbi +2 -4
- data/rbi/lib/orb/models/price_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/price_list_params.rbi +3 -5
- data/rbi/lib/orb/models/price_update_params.rbi +4 -6
- data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +4 -6
- data/rbi/lib/orb/models/subscription.rbi +167 -187
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +5 -7
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_change_apply_params.rbi +40 -0
- data/rbi/lib/orb/models/subscription_change_apply_response.rbi +1554 -0
- data/rbi/lib/orb/models/subscription_change_cancel_params.rbi +18 -0
- data/rbi/lib/orb/models/subscription_change_cancel_response.rbi +1565 -0
- data/rbi/lib/orb/models/subscription_change_retrieve_params.rbi +18 -0
- data/rbi/lib/orb/models/subscription_change_retrieve_response.rbi +1581 -0
- data/rbi/lib/orb/models/subscription_create_params.rbi +1372 -1968
- data/rbi/lib/orb/models/subscription_create_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +8 -10
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +6 -12
- data/rbi/lib/orb/models/subscription_fetch_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +3 -6
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +6 -10
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +12 -17
- data/rbi/lib/orb/models/subscription_list_params.rbi +4 -8
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +772 -1124
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +228 -178
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +1396 -1993
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +5 -7
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +265 -199
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +2 -4
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +264 -198
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +11 -15
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +238 -182
- data/rbi/lib/orb/models/subscription_update_params.rbi +12 -15
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +6 -9
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +224 -178
- data/rbi/lib/orb/models/subscription_usage.rbi +24 -43
- data/rbi/lib/orb/models/subscriptions.rbi +2 -4
- data/rbi/lib/orb/models/top_level_ping_params.rbi +2 -4
- data/rbi/lib/orb/models/top_level_ping_response.rbi +2 -4
- data/rbi/lib/orb/models/trial_discount.rbi +4 -8
- data/rbi/lib/orb/models/usage_discount.rbi +5 -8
- data/rbi/lib/orb/request_options.rbi +9 -11
- data/rbi/lib/orb/resources/alerts.rbi +44 -60
- data/rbi/lib/orb/resources/coupons/subscriptions.rbi +6 -9
- data/rbi/lib/orb/resources/coupons.rbi +18 -25
- data/rbi/lib/orb/resources/credit_notes.rbi +9 -15
- data/rbi/lib/orb/resources/customers/balance_transactions.rbi +26 -31
- data/rbi/lib/orb/resources/customers/costs.rbi +241 -246
- data/rbi/lib/orb/resources/customers/credits/ledger.rbi +387 -396
- data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +29 -40
- data/rbi/lib/orb/resources/customers/credits.rbi +15 -20
- data/rbi/lib/orb/resources/customers.rbi +407 -417
- data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +2 -4
- data/rbi/lib/orb/resources/dimensional_price_groups.rbi +13 -19
- data/rbi/lib/orb/resources/events/backfills.rbi +61 -69
- data/rbi/lib/orb/resources/events/volume.rbi +19 -22
- data/rbi/lib/orb/resources/events.rbi +311 -319
- data/rbi/lib/orb/resources/invoice_line_items.rbi +4 -7
- data/rbi/lib/orb/resources/invoices.rbi +62 -76
- data/rbi/lib/orb/resources/items.rbi +7 -14
- data/rbi/lib/orb/resources/metrics.rbi +17 -25
- data/rbi/lib/orb/resources/plans/external_plan_id.rbi +21 -25
- data/rbi/lib/orb/resources/plans.rbi +63 -71
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +9 -13
- data/rbi/lib/orb/resources/prices.rbi +77 -87
- data/rbi/lib/orb/resources/subscription_changes.rbi +61 -0
- data/rbi/lib/orb/resources/subscriptions.rbi +933 -963
- data/rbi/lib/orb/resources/top_level.rbi +6 -8
- data/sig/orb/client.rbs +2 -0
- data/sig/orb/internal/transport/pooled_net_requester.rbs +1 -1
- data/sig/orb/internal/type/array_of.rbs +5 -2
- data/sig/orb/internal/type/base_model.rbs +5 -2
- data/sig/orb/internal/type/boolean.rbs +5 -2
- data/sig/orb/internal/type/converter.rbs +11 -5
- data/sig/orb/internal/type/enum.rbs +5 -2
- data/sig/orb/internal/type/hash_of.rbs +5 -2
- data/sig/orb/internal/type/io_like.rbs +23 -0
- data/sig/orb/internal/type/union.rbs +5 -2
- data/sig/orb/internal/type/unknown.rbs +5 -2
- data/sig/orb/internal/util.rbs +17 -2
- data/sig/orb/models/subscription.rbs +14 -0
- data/sig/orb/models/subscription_cancel_response.rbs +47 -2
- data/sig/orb/models/subscription_change_apply_params.rbs +24 -0
- data/sig/orb/models/subscription_change_apply_response.rbs +784 -0
- data/sig/orb/models/subscription_change_cancel_params.rbs +15 -0
- data/sig/orb/models/subscription_change_cancel_response.rbs +784 -0
- data/sig/orb/models/subscription_change_retrieve_params.rbs +15 -0
- data/sig/orb/models/subscription_change_retrieve_response.rbs +784 -0
- data/sig/orb/models/subscription_create_response.rbs +47 -2
- data/sig/orb/models/subscription_price_intervals_response.rbs +47 -2
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +47 -2
- data/sig/orb/models/subscription_trigger_phase_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +47 -2
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +47 -2
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +47 -2
- data/sig/orb/models/subscription_update_trial_response.rbs +47 -2
- data/sig/orb/resources/customers.rbs +2 -2
- data/sig/orb/resources/subscription_changes.rbs +24 -0
- metadata +28 -4
@@ -7,18 +7,18 @@ module Orb
|
|
7
7
|
attr_accessor :id
|
8
8
|
|
9
9
|
# The current plan phase that is active, only if the subscription's plan has
|
10
|
-
#
|
10
|
+
# phases.
|
11
11
|
sig { returns(T.nilable(Integer)) }
|
12
12
|
attr_accessor :active_plan_phase_order
|
13
13
|
|
14
14
|
# The adjustment intervals for this subscription sorted by the start_date of the
|
15
|
-
#
|
15
|
+
# adjustment interval.
|
16
16
|
sig { returns(T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval]) }
|
17
17
|
attr_accessor :adjustment_intervals
|
18
18
|
|
19
19
|
# Determines whether issued invoices for this subscription will automatically be
|
20
|
-
#
|
21
|
-
#
|
20
|
+
# charged with the saved payment method on the due date. This property defaults to
|
21
|
+
# the plan's behavior. If null, defaults to the customer's setting.
|
22
22
|
sig { returns(T.nilable(T::Boolean)) }
|
23
23
|
attr_accessor :auto_collection
|
24
24
|
|
@@ -41,9 +41,9 @@ module Orb
|
|
41
41
|
attr_writer :billing_cycle_anchor_configuration
|
42
42
|
|
43
43
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
44
|
-
#
|
45
|
-
#
|
46
|
-
#
|
44
|
+
# number of days in a month is greater than this value, the last day of the month
|
45
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
46
|
+
# period begins on the 30th.
|
47
47
|
sig { returns(Integer) }
|
48
48
|
attr_accessor :billing_cycle_day
|
49
49
|
|
@@ -51,35 +51,35 @@ module Orb
|
|
51
51
|
attr_accessor :created_at
|
52
52
|
|
53
53
|
# The end of the current billing period. This is an exclusive timestamp, such that
|
54
|
-
#
|
55
|
-
#
|
54
|
+
# the instant returned is not part of the billing period. Set to null for
|
55
|
+
# subscriptions that are not currently active.
|
56
56
|
sig { returns(T.nilable(Time)) }
|
57
57
|
attr_accessor :current_billing_period_end_date
|
58
58
|
|
59
59
|
# The start date of the current billing period. This is an inclusive timestamp;
|
60
|
-
#
|
61
|
-
#
|
60
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
61
|
+
# if the subscription is not currently active.
|
62
62
|
sig { returns(T.nilable(Time)) }
|
63
63
|
attr_accessor :current_billing_period_start_date
|
64
64
|
|
65
65
|
# A customer is a buyer of your products, and the other party to the billing
|
66
|
-
#
|
66
|
+
# relationship.
|
67
67
|
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
71
|
-
#
|
72
|
-
#
|
73
|
-
#
|
68
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
69
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
70
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
71
|
+
# `external_customer_id` with your own identifier. See
|
72
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
73
|
+
# information about how these aliases work in Orb.
|
74
74
|
#
|
75
|
-
#
|
76
|
-
#
|
77
|
-
#
|
75
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
76
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
77
|
+
# `payment_provider` enum field to express this mapping.
|
78
78
|
#
|
79
|
-
#
|
80
|
-
#
|
81
|
-
#
|
82
|
-
#
|
79
|
+
# A customer also has a timezone (from the standard
|
80
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
81
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
82
|
+
# information on what this timezone parameter influences within Orb.
|
83
83
|
sig { returns(Orb::Models::Customer) }
|
84
84
|
attr_reader :customer
|
85
85
|
|
@@ -87,7 +87,7 @@ module Orb
|
|
87
87
|
attr_writer :customer
|
88
88
|
|
89
89
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
90
|
-
#
|
90
|
+
# is not provided, it is determined by the plan configuration.
|
91
91
|
sig { returns(T.nilable(String)) }
|
92
92
|
attr_accessor :default_invoice_memo
|
93
93
|
|
@@ -95,11 +95,11 @@ module Orb
|
|
95
95
|
sig do
|
96
96
|
returns(
|
97
97
|
T::Array[
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
98
|
+
T.any(
|
99
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval,
|
100
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval,
|
101
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval
|
102
|
+
)
|
103
103
|
]
|
104
104
|
)
|
105
105
|
end
|
@@ -124,9 +124,9 @@ module Orb
|
|
124
124
|
attr_accessor :maximum_intervals
|
125
125
|
|
126
126
|
# User specified key-value pairs for the resource. If not present, this defaults
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
127
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
128
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
129
|
+
# `null`.
|
130
130
|
sig { returns(T::Hash[Symbol, String]) }
|
131
131
|
attr_accessor :metadata
|
132
132
|
|
@@ -135,16 +135,37 @@ module Orb
|
|
135
135
|
attr_accessor :minimum_intervals
|
136
136
|
|
137
137
|
# Determines the difference between the invoice issue date for subscription
|
138
|
-
#
|
139
|
-
#
|
140
|
-
#
|
138
|
+
# invoices as the date that they are due. A value of `0` here represents that the
|
139
|
+
# invoice is due on issue, whereas a value of `30` represents that the customer
|
140
|
+
# has a month to pay the invoice.
|
141
141
|
sig { returns(Integer) }
|
142
142
|
attr_accessor :net_terms
|
143
143
|
|
144
|
+
# A pending subscription change if one exists on this subscription.
|
145
|
+
sig do
|
146
|
+
returns(
|
147
|
+
T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PendingSubscriptionChange)
|
148
|
+
)
|
149
|
+
end
|
150
|
+
attr_reader :pending_subscription_change
|
151
|
+
|
152
|
+
sig do
|
153
|
+
params(
|
154
|
+
pending_subscription_change: T.nilable(
|
155
|
+
T.any(
|
156
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PendingSubscriptionChange,
|
157
|
+
Orb::Internal::AnyHash
|
158
|
+
)
|
159
|
+
)
|
160
|
+
)
|
161
|
+
.void
|
162
|
+
end
|
163
|
+
attr_writer :pending_subscription_change
|
164
|
+
|
144
165
|
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
145
|
-
#
|
146
|
-
#
|
147
|
-
#
|
166
|
+
# subscribed to by a customer. Plans define the billing behavior of the
|
167
|
+
# subscription. You can see more about how to configure prices in the
|
168
|
+
# [Price resource](/reference/price).
|
148
169
|
sig { returns(Orb::Models::Plan) }
|
149
170
|
attr_reader :plan
|
150
171
|
|
@@ -192,15 +213,34 @@ module Orb
|
|
192
213
|
end
|
193
214
|
attr_writer :trial_info
|
194
215
|
|
216
|
+
# The resources that were changed as part of this operation. Only present when
|
217
|
+
# fetched through the subscription changes API or if the
|
218
|
+
# `include_changed_resources` parameter was passed in the request.
|
219
|
+
sig { returns(T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::ChangedResources)) }
|
220
|
+
attr_reader :changed_resources
|
221
|
+
|
222
|
+
sig do
|
223
|
+
params(
|
224
|
+
changed_resources: T.nilable(
|
225
|
+
T.any(
|
226
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::ChangedResources,
|
227
|
+
Orb::Internal::AnyHash
|
228
|
+
)
|
229
|
+
)
|
230
|
+
)
|
231
|
+
.void
|
232
|
+
end
|
233
|
+
attr_writer :changed_resources
|
234
|
+
|
195
235
|
sig do
|
196
236
|
params(
|
197
237
|
id: String,
|
198
238
|
active_plan_phase_order: T.nilable(Integer),
|
199
239
|
adjustment_intervals: T::Array[
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
240
|
+
T.any(
|
241
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval,
|
242
|
+
Orb::Internal::AnyHash
|
243
|
+
)
|
204
244
|
],
|
205
245
|
auto_collection: T.nilable(T::Boolean),
|
206
246
|
billing_cycle_anchor_configuration: T.any(
|
@@ -214,41 +254,47 @@ module Orb
|
|
214
254
|
customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
|
215
255
|
default_invoice_memo: T.nilable(String),
|
216
256
|
discount_intervals: T::Array[
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
257
|
+
T.any(
|
258
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval,
|
259
|
+
Orb::Internal::AnyHash,
|
260
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval,
|
261
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval
|
262
|
+
)
|
223
263
|
],
|
224
264
|
end_date: T.nilable(Time),
|
225
265
|
fixed_fee_quantity_schedule: T::Array[
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
266
|
+
T.any(
|
267
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule,
|
268
|
+
Orb::Internal::AnyHash
|
269
|
+
)
|
230
270
|
],
|
231
271
|
invoicing_threshold: T.nilable(String),
|
232
272
|
maximum_intervals: T::Array[
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
273
|
+
T.any(
|
274
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MaximumInterval,
|
275
|
+
Orb::Internal::AnyHash
|
276
|
+
)
|
237
277
|
],
|
238
278
|
metadata: T::Hash[Symbol, String],
|
239
279
|
minimum_intervals: T::Array[
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
280
|
+
T.any(
|
281
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval,
|
282
|
+
Orb::Internal::AnyHash
|
283
|
+
)
|
244
284
|
],
|
245
285
|
net_terms: Integer,
|
286
|
+
pending_subscription_change: T.nilable(
|
287
|
+
T.any(
|
288
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PendingSubscriptionChange,
|
289
|
+
Orb::Internal::AnyHash
|
290
|
+
)
|
291
|
+
),
|
246
292
|
plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash),
|
247
293
|
price_intervals: T::Array[
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
294
|
+
T.any(
|
295
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval,
|
296
|
+
Orb::Internal::AnyHash
|
297
|
+
)
|
252
298
|
],
|
253
299
|
redeemed_coupon: T.nilable(
|
254
300
|
T.any(
|
@@ -261,6 +307,12 @@ module Orb
|
|
261
307
|
trial_info: T.any(
|
262
308
|
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo,
|
263
309
|
Orb::Internal::AnyHash
|
310
|
+
),
|
311
|
+
changed_resources: T.nilable(
|
312
|
+
T.any(
|
313
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::ChangedResources,
|
314
|
+
Orb::Internal::AnyHash
|
315
|
+
)
|
264
316
|
)
|
265
317
|
)
|
266
318
|
.returns(T.attached_class)
|
@@ -285,15 +337,15 @@ module Orb
|
|
285
337
|
metadata:,
|
286
338
|
minimum_intervals:,
|
287
339
|
net_terms:,
|
340
|
+
pending_subscription_change:,
|
288
341
|
plan:,
|
289
342
|
price_intervals:,
|
290
343
|
redeemed_coupon:,
|
291
344
|
start_date:,
|
292
345
|
status:,
|
293
|
-
trial_info
|
294
|
-
|
295
|
-
end
|
296
|
-
|
346
|
+
trial_info:,
|
347
|
+
changed_resources: nil
|
348
|
+
); end
|
297
349
|
sig do
|
298
350
|
override
|
299
351
|
.returns(
|
@@ -310,11 +362,11 @@ module Orb
|
|
310
362
|
customer: Orb::Models::Customer,
|
311
363
|
default_invoice_memo: T.nilable(String),
|
312
364
|
discount_intervals: T::Array[
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
365
|
+
T.any(
|
366
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval,
|
367
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval,
|
368
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval
|
369
|
+
)
|
318
370
|
],
|
319
371
|
end_date: T.nilable(Time),
|
320
372
|
fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::FixedFeeQuantitySchedule],
|
@@ -323,17 +375,18 @@ module Orb
|
|
323
375
|
metadata: T::Hash[Symbol, String],
|
324
376
|
minimum_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::MinimumInterval],
|
325
377
|
net_terms: Integer,
|
378
|
+
pending_subscription_change: T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PendingSubscriptionChange),
|
326
379
|
plan: Orb::Models::Plan,
|
327
380
|
price_intervals: T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval],
|
328
381
|
redeemed_coupon: T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::RedeemedCoupon),
|
329
382
|
start_date: Time,
|
330
383
|
status: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::Status::TaggedSymbol,
|
331
|
-
trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo
|
384
|
+
trial_info: Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::TrialInfo,
|
385
|
+
changed_resources: T.nilable(Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::ChangedResources)
|
332
386
|
}
|
333
387
|
)
|
334
388
|
end
|
335
|
-
def to_hash
|
336
|
-
end
|
389
|
+
def to_hash; end
|
337
390
|
|
338
391
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
339
392
|
sig { returns(String) }
|
@@ -381,8 +434,7 @@ module Orb
|
|
381
434
|
)
|
382
435
|
.returns(T.attached_class)
|
383
436
|
end
|
384
|
-
def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
|
385
|
-
end
|
437
|
+
def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:); end
|
386
438
|
|
387
439
|
sig do
|
388
440
|
override
|
@@ -402,8 +454,7 @@ module Orb
|
|
402
454
|
}
|
403
455
|
)
|
404
456
|
end
|
405
|
-
def to_hash
|
406
|
-
end
|
457
|
+
def to_hash; end
|
407
458
|
|
408
459
|
module Adjustment
|
409
460
|
extend Orb::Internal::Type::Union
|
@@ -420,7 +471,7 @@ module Orb
|
|
420
471
|
attr_accessor :applies_to_price_ids
|
421
472
|
|
422
473
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
423
|
-
#
|
474
|
+
# that apply to only one price.
|
424
475
|
sig { returns(T::Boolean) }
|
425
476
|
attr_accessor :is_invoice_level
|
426
477
|
|
@@ -433,7 +484,7 @@ module Orb
|
|
433
484
|
attr_accessor :reason
|
434
485
|
|
435
486
|
# The number of usage units by which to discount the price this adjustment applies
|
436
|
-
#
|
487
|
+
# to in a given billing period.
|
437
488
|
sig { returns(Float) }
|
438
489
|
attr_accessor :usage_discount
|
439
490
|
|
@@ -457,9 +508,7 @@ module Orb
|
|
457
508
|
reason:,
|
458
509
|
usage_discount:,
|
459
510
|
adjustment_type: :usage_discount
|
460
|
-
)
|
461
|
-
end
|
462
|
-
|
511
|
+
); end
|
463
512
|
sig do
|
464
513
|
override
|
465
514
|
.returns(
|
@@ -474,8 +523,7 @@ module Orb
|
|
474
523
|
}
|
475
524
|
)
|
476
525
|
end
|
477
|
-
def to_hash
|
478
|
-
end
|
526
|
+
def to_hash; end
|
479
527
|
end
|
480
528
|
|
481
529
|
class PlanPhaseAmountDiscountAdjustment < Orb::Internal::Type::BaseModel
|
@@ -486,7 +534,7 @@ module Orb
|
|
486
534
|
attr_accessor :adjustment_type
|
487
535
|
|
488
536
|
# The amount by which to discount the prices this adjustment applies to in a given
|
489
|
-
#
|
537
|
+
# billing period.
|
490
538
|
sig { returns(String) }
|
491
539
|
attr_accessor :amount_discount
|
492
540
|
|
@@ -495,7 +543,7 @@ module Orb
|
|
495
543
|
attr_accessor :applies_to_price_ids
|
496
544
|
|
497
545
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
498
|
-
#
|
546
|
+
# that apply to only one price.
|
499
547
|
sig { returns(T::Boolean) }
|
500
548
|
attr_accessor :is_invoice_level
|
501
549
|
|
@@ -527,9 +575,7 @@ module Orb
|
|
527
575
|
plan_phase_order:,
|
528
576
|
reason:,
|
529
577
|
adjustment_type: :amount_discount
|
530
|
-
)
|
531
|
-
end
|
532
|
-
|
578
|
+
); end
|
533
579
|
sig do
|
534
580
|
override
|
535
581
|
.returns(
|
@@ -544,8 +590,7 @@ module Orb
|
|
544
590
|
}
|
545
591
|
)
|
546
592
|
end
|
547
|
-
def to_hash
|
548
|
-
end
|
593
|
+
def to_hash; end
|
549
594
|
end
|
550
595
|
|
551
596
|
class PlanPhasePercentageDiscountAdjustment < Orb::Internal::Type::BaseModel
|
@@ -560,12 +605,12 @@ module Orb
|
|
560
605
|
attr_accessor :applies_to_price_ids
|
561
606
|
|
562
607
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
563
|
-
#
|
608
|
+
# that apply to only one price.
|
564
609
|
sig { returns(T::Boolean) }
|
565
610
|
attr_accessor :is_invoice_level
|
566
611
|
|
567
612
|
# The percentage (as a value between 0 and 1) by which to discount the price
|
568
|
-
#
|
613
|
+
# intervals this adjustment applies to in a given billing period.
|
569
614
|
sig { returns(Float) }
|
570
615
|
attr_accessor :percentage_discount
|
571
616
|
|
@@ -597,9 +642,7 @@ module Orb
|
|
597
642
|
plan_phase_order:,
|
598
643
|
reason:,
|
599
644
|
adjustment_type: :percentage_discount
|
600
|
-
)
|
601
|
-
end
|
602
|
-
|
645
|
+
); end
|
603
646
|
sig do
|
604
647
|
override
|
605
648
|
.returns(
|
@@ -614,8 +657,7 @@ module Orb
|
|
614
657
|
}
|
615
658
|
)
|
616
659
|
end
|
617
|
-
def to_hash
|
618
|
-
end
|
660
|
+
def to_hash; end
|
619
661
|
end
|
620
662
|
|
621
663
|
class PlanPhaseMinimumAdjustment < Orb::Internal::Type::BaseModel
|
@@ -630,7 +672,7 @@ module Orb
|
|
630
672
|
attr_accessor :applies_to_price_ids
|
631
673
|
|
632
674
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
633
|
-
#
|
675
|
+
# that apply to only one price.
|
634
676
|
sig { returns(T::Boolean) }
|
635
677
|
attr_accessor :is_invoice_level
|
636
678
|
|
@@ -639,7 +681,7 @@ module Orb
|
|
639
681
|
attr_accessor :item_id
|
640
682
|
|
641
683
|
# The minimum amount to charge in a given billing period for the prices this
|
642
|
-
#
|
684
|
+
# adjustment applies to.
|
643
685
|
sig { returns(String) }
|
644
686
|
attr_accessor :minimum_amount
|
645
687
|
|
@@ -673,9 +715,7 @@ module Orb
|
|
673
715
|
plan_phase_order:,
|
674
716
|
reason:,
|
675
717
|
adjustment_type: :minimum
|
676
|
-
)
|
677
|
-
end
|
678
|
-
|
718
|
+
); end
|
679
719
|
sig do
|
680
720
|
override
|
681
721
|
.returns(
|
@@ -691,8 +731,7 @@ module Orb
|
|
691
731
|
}
|
692
732
|
)
|
693
733
|
end
|
694
|
-
def to_hash
|
695
|
-
end
|
734
|
+
def to_hash; end
|
696
735
|
end
|
697
736
|
|
698
737
|
class PlanPhaseMaximumAdjustment < Orb::Internal::Type::BaseModel
|
@@ -707,12 +746,12 @@ module Orb
|
|
707
746
|
attr_accessor :applies_to_price_ids
|
708
747
|
|
709
748
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
710
|
-
#
|
749
|
+
# that apply to only one price.
|
711
750
|
sig { returns(T::Boolean) }
|
712
751
|
attr_accessor :is_invoice_level
|
713
752
|
|
714
753
|
# The maximum amount to charge in a given billing period for the prices this
|
715
|
-
#
|
754
|
+
# adjustment applies to.
|
716
755
|
sig { returns(String) }
|
717
756
|
attr_accessor :maximum_amount
|
718
757
|
|
@@ -744,9 +783,7 @@ module Orb
|
|
744
783
|
plan_phase_order:,
|
745
784
|
reason:,
|
746
785
|
adjustment_type: :maximum
|
747
|
-
)
|
748
|
-
end
|
749
|
-
|
786
|
+
); end
|
750
787
|
sig do
|
751
788
|
override
|
752
789
|
.returns(
|
@@ -761,8 +798,7 @@ module Orb
|
|
761
798
|
}
|
762
799
|
)
|
763
800
|
end
|
764
|
-
def to_hash
|
765
|
-
end
|
801
|
+
def to_hash; end
|
766
802
|
end
|
767
803
|
|
768
804
|
sig do
|
@@ -771,39 +807,36 @@ module Orb
|
|
771
807
|
[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]
|
772
808
|
)
|
773
809
|
end
|
774
|
-
def self.variants
|
775
|
-
end
|
810
|
+
def self.variants; end
|
776
811
|
end
|
777
812
|
end
|
778
813
|
|
779
814
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
780
815
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
781
|
-
#
|
782
|
-
#
|
783
|
-
#
|
816
|
+
# number of days in a month is greater than this value, the last day of the month
|
817
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
818
|
+
# period begins on the 30th.
|
784
819
|
sig { returns(Integer) }
|
785
820
|
attr_accessor :day
|
786
821
|
|
787
822
|
# The month on which the billing cycle is anchored (e.g. a quarterly price
|
788
|
-
#
|
789
|
-
#
|
823
|
+
# anchored in February would have cycles starting February, May, August, and
|
824
|
+
# November).
|
790
825
|
sig { returns(T.nilable(Integer)) }
|
791
826
|
attr_accessor :month
|
792
827
|
|
793
828
|
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
794
|
-
#
|
829
|
+
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
795
830
|
sig { returns(T.nilable(Integer)) }
|
796
831
|
attr_accessor :year
|
797
832
|
|
798
833
|
sig do
|
799
834
|
params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
|
800
835
|
end
|
801
|
-
def self.new(day:, month: nil, year: nil)
|
802
|
-
end
|
836
|
+
def self.new(day:, month: nil, year: nil); end
|
803
837
|
|
804
838
|
sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
|
805
|
-
def to_hash
|
806
|
-
end
|
839
|
+
def to_hash; end
|
807
840
|
end
|
808
841
|
|
809
842
|
module DiscountInterval
|
@@ -851,9 +884,7 @@ module Orb
|
|
851
884
|
end_date:,
|
852
885
|
start_date:,
|
853
886
|
discount_type: :amount
|
854
|
-
)
|
855
|
-
end
|
856
|
-
|
887
|
+
); end
|
857
888
|
sig do
|
858
889
|
override
|
859
890
|
.returns(
|
@@ -867,8 +898,7 @@ module Orb
|
|
867
898
|
}
|
868
899
|
)
|
869
900
|
end
|
870
|
-
def to_hash
|
871
|
-
end
|
901
|
+
def to_hash; end
|
872
902
|
end
|
873
903
|
|
874
904
|
class PercentageDiscountInterval < Orb::Internal::Type::BaseModel
|
@@ -888,7 +918,7 @@ module Orb
|
|
888
918
|
attr_accessor :end_date
|
889
919
|
|
890
920
|
# Only available if discount_type is `percentage`.This is a number between 0
|
891
|
-
#
|
921
|
+
# and 1.
|
892
922
|
sig { returns(Float) }
|
893
923
|
attr_accessor :percentage_discount
|
894
924
|
|
@@ -914,9 +944,7 @@ module Orb
|
|
914
944
|
percentage_discount:,
|
915
945
|
start_date:,
|
916
946
|
discount_type: :percentage
|
917
|
-
)
|
918
|
-
end
|
919
|
-
|
947
|
+
); end
|
920
948
|
sig do
|
921
949
|
override
|
922
950
|
.returns(
|
@@ -930,8 +958,7 @@ module Orb
|
|
930
958
|
}
|
931
959
|
)
|
932
960
|
end
|
933
|
-
def to_hash
|
934
|
-
end
|
961
|
+
def to_hash; end
|
935
962
|
end
|
936
963
|
|
937
964
|
class UsageDiscountInterval < Orb::Internal::Type::BaseModel
|
@@ -955,7 +982,7 @@ module Orb
|
|
955
982
|
attr_accessor :start_date
|
956
983
|
|
957
984
|
# Only available if discount_type is `usage`. Number of usage units that this
|
958
|
-
#
|
985
|
+
# discount is for
|
959
986
|
sig { returns(Float) }
|
960
987
|
attr_accessor :usage_discount
|
961
988
|
|
@@ -977,9 +1004,7 @@ module Orb
|
|
977
1004
|
start_date:,
|
978
1005
|
usage_discount:,
|
979
1006
|
discount_type: :usage
|
980
|
-
)
|
981
|
-
end
|
982
|
-
|
1007
|
+
); end
|
983
1008
|
sig do
|
984
1009
|
override
|
985
1010
|
.returns(
|
@@ -993,8 +1018,7 @@ module Orb
|
|
993
1018
|
}
|
994
1019
|
)
|
995
1020
|
end
|
996
|
-
def to_hash
|
997
|
-
end
|
1021
|
+
def to_hash; end
|
998
1022
|
end
|
999
1023
|
|
1000
1024
|
sig do
|
@@ -1003,8 +1027,7 @@ module Orb
|
|
1003
1027
|
[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::DiscountInterval::UsageDiscountInterval]
|
1004
1028
|
)
|
1005
1029
|
end
|
1006
|
-
def self.variants
|
1007
|
-
end
|
1030
|
+
def self.variants; end
|
1008
1031
|
end
|
1009
1032
|
|
1010
1033
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
@@ -1024,14 +1047,12 @@ module Orb
|
|
1024
1047
|
params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
|
1025
1048
|
.returns(T.attached_class)
|
1026
1049
|
end
|
1027
|
-
def self.new(end_date:, price_id:, quantity:, start_date:)
|
1028
|
-
end
|
1050
|
+
def self.new(end_date:, price_id:, quantity:, start_date:); end
|
1029
1051
|
|
1030
1052
|
sig do
|
1031
1053
|
override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
|
1032
1054
|
end
|
1033
|
-
def to_hash
|
1034
|
-
end
|
1055
|
+
def to_hash; end
|
1035
1056
|
end
|
1036
1057
|
|
1037
1058
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
@@ -1048,7 +1069,7 @@ module Orb
|
|
1048
1069
|
attr_accessor :end_date
|
1049
1070
|
|
1050
1071
|
# The maximum amount to charge in a given billing period for the price intervals
|
1051
|
-
#
|
1072
|
+
# this transform applies to.
|
1052
1073
|
sig { returns(String) }
|
1053
1074
|
attr_accessor :maximum_amount
|
1054
1075
|
|
@@ -1087,8 +1108,7 @@ module Orb
|
|
1087
1108
|
}
|
1088
1109
|
)
|
1089
1110
|
end
|
1090
|
-
def to_hash
|
1091
|
-
end
|
1111
|
+
def to_hash; end
|
1092
1112
|
end
|
1093
1113
|
|
1094
1114
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
@@ -1105,7 +1125,7 @@ module Orb
|
|
1105
1125
|
attr_accessor :end_date
|
1106
1126
|
|
1107
1127
|
# The minimum amount to charge in a given billing period for the price intervals
|
1108
|
-
#
|
1128
|
+
# this minimum applies to.
|
1109
1129
|
sig { returns(String) }
|
1110
1130
|
attr_accessor :minimum_amount
|
1111
1131
|
|
@@ -1144,8 +1164,19 @@ module Orb
|
|
1144
1164
|
}
|
1145
1165
|
)
|
1146
1166
|
end
|
1147
|
-
def to_hash
|
1148
|
-
|
1167
|
+
def to_hash; end
|
1168
|
+
end
|
1169
|
+
|
1170
|
+
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1171
|
+
sig { returns(String) }
|
1172
|
+
attr_accessor :id
|
1173
|
+
|
1174
|
+
# A pending subscription change if one exists on this subscription.
|
1175
|
+
sig { params(id: String).returns(T.attached_class) }
|
1176
|
+
def self.new(id:); end
|
1177
|
+
|
1178
|
+
sig { override.returns({id: String}) }
|
1179
|
+
def to_hash; end
|
1149
1180
|
end
|
1150
1181
|
|
1151
1182
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
@@ -1157,19 +1188,19 @@ module Orb
|
|
1157
1188
|
attr_accessor :billing_cycle_day
|
1158
1189
|
|
1159
1190
|
# The end of the current billing period. This is an exclusive timestamp, such that
|
1160
|
-
#
|
1161
|
-
#
|
1191
|
+
# the instant returned is exactly the end of the billing period. Set to null if
|
1192
|
+
# this price interval is not currently active.
|
1162
1193
|
sig { returns(T.nilable(Time)) }
|
1163
1194
|
attr_accessor :current_billing_period_end_date
|
1164
1195
|
|
1165
1196
|
# The start date of the current billing period. This is an inclusive timestamp;
|
1166
|
-
#
|
1167
|
-
#
|
1197
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
1198
|
+
# if this price interval is not currently active.
|
1168
1199
|
sig { returns(T.nilable(Time)) }
|
1169
1200
|
attr_accessor :current_billing_period_start_date
|
1170
1201
|
|
1171
1202
|
# The end date of the price interval. This is the date that Orb stops billing for
|
1172
|
-
#
|
1203
|
+
# this price.
|
1173
1204
|
sig { returns(T.nilable(Time)) }
|
1174
1205
|
attr_accessor :end_date
|
1175
1206
|
|
@@ -1178,12 +1209,12 @@ module Orb
|
|
1178
1209
|
attr_accessor :filter
|
1179
1210
|
|
1180
1211
|
# The fixed fee quantity transitions for this price interval. This is only
|
1181
|
-
#
|
1212
|
+
# relevant for fixed fees.
|
1182
1213
|
sig do
|
1183
1214
|
returns(
|
1184
1215
|
T.nilable(
|
1185
1216
|
T::Array[
|
1186
|
-
|
1217
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition
|
1187
1218
|
]
|
1188
1219
|
)
|
1189
1220
|
)
|
@@ -1191,15 +1222,15 @@ module Orb
|
|
1191
1222
|
attr_accessor :fixed_fee_quantity_transitions
|
1192
1223
|
|
1193
1224
|
# The Price resource represents a price that can be billed on a subscription,
|
1194
|
-
#
|
1195
|
-
#
|
1225
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1226
|
+
# take a quantity and determine an amount to bill.
|
1196
1227
|
#
|
1197
|
-
#
|
1198
|
-
#
|
1199
|
-
#
|
1228
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1229
|
+
# is serialized differently in a given Price object. The model_type field
|
1230
|
+
# determines the key for the configuration object that is present.
|
1200
1231
|
#
|
1201
|
-
#
|
1202
|
-
#
|
1232
|
+
# For more on the types of prices, see
|
1233
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1203
1234
|
sig do
|
1204
1235
|
returns(
|
1205
1236
|
T.any(
|
@@ -1237,18 +1268,18 @@ module Orb
|
|
1237
1268
|
attr_accessor :price
|
1238
1269
|
|
1239
1270
|
# The start date of the price interval. This is the date that Orb starts billing
|
1240
|
-
#
|
1271
|
+
# for this price.
|
1241
1272
|
sig { returns(Time) }
|
1242
1273
|
attr_accessor :start_date
|
1243
1274
|
|
1244
1275
|
# A list of customer IDs whose usage events will be aggregated and billed under
|
1245
|
-
#
|
1276
|
+
# this price interval.
|
1246
1277
|
sig { returns(T.nilable(T::Array[String])) }
|
1247
1278
|
attr_accessor :usage_customer_ids
|
1248
1279
|
|
1249
1280
|
# The Price Interval resource represents a period of time for which a price will
|
1250
|
-
#
|
1251
|
-
#
|
1281
|
+
# bill on a subscription. A subscription’s price intervals define its billing
|
1282
|
+
# behavior.
|
1252
1283
|
sig do
|
1253
1284
|
params(
|
1254
1285
|
id: String,
|
@@ -1259,10 +1290,10 @@ module Orb
|
|
1259
1290
|
filter: T.nilable(String),
|
1260
1291
|
fixed_fee_quantity_transitions: T.nilable(
|
1261
1292
|
T::Array[
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1293
|
+
T.any(
|
1294
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition,
|
1295
|
+
Orb::Internal::AnyHash
|
1296
|
+
)
|
1266
1297
|
]
|
1267
1298
|
),
|
1268
1299
|
price: T.any(
|
@@ -1312,9 +1343,7 @@ module Orb
|
|
1312
1343
|
price:,
|
1313
1344
|
start_date:,
|
1314
1345
|
usage_customer_ids:
|
1315
|
-
)
|
1316
|
-
end
|
1317
|
-
|
1346
|
+
); end
|
1318
1347
|
sig do
|
1319
1348
|
override
|
1320
1349
|
.returns(
|
@@ -1327,7 +1356,7 @@ module Orb
|
|
1327
1356
|
filter: T.nilable(String),
|
1328
1357
|
fixed_fee_quantity_transitions: T.nilable(
|
1329
1358
|
T::Array[
|
1330
|
-
|
1359
|
+
Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::PriceInterval::FixedFeeQuantityTransition
|
1331
1360
|
]
|
1332
1361
|
),
|
1333
1362
|
price: T.any(
|
@@ -1365,8 +1394,7 @@ module Orb
|
|
1365
1394
|
}
|
1366
1395
|
)
|
1367
1396
|
end
|
1368
|
-
def to_hash
|
1369
|
-
end
|
1397
|
+
def to_hash; end
|
1370
1398
|
|
1371
1399
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1372
1400
|
sig { returns(Time) }
|
@@ -1379,12 +1407,10 @@ module Orb
|
|
1379
1407
|
attr_accessor :quantity
|
1380
1408
|
|
1381
1409
|
sig { params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class) }
|
1382
|
-
def self.new(effective_date:, price_id:, quantity:)
|
1383
|
-
end
|
1410
|
+
def self.new(effective_date:, price_id:, quantity:); end
|
1384
1411
|
|
1385
1412
|
sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
|
1386
|
-
def to_hash
|
1387
|
-
end
|
1413
|
+
def to_hash; end
|
1388
1414
|
end
|
1389
1415
|
end
|
1390
1416
|
|
@@ -1401,12 +1427,10 @@ module Orb
|
|
1401
1427
|
sig do
|
1402
1428
|
params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
|
1403
1429
|
end
|
1404
|
-
def self.new(coupon_id:, end_date:, start_date:)
|
1405
|
-
end
|
1430
|
+
def self.new(coupon_id:, end_date:, start_date:); end
|
1406
1431
|
|
1407
1432
|
sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
|
1408
|
-
def to_hash
|
1409
|
-
end
|
1433
|
+
def to_hash; end
|
1410
1434
|
end
|
1411
1435
|
|
1412
1436
|
module Status
|
@@ -1436,8 +1460,7 @@ module Orb
|
|
1436
1460
|
T::Array[Orb::Models::SubscriptionUnscheduleFixedFeeQuantityUpdatesResponse::Status::TaggedSymbol]
|
1437
1461
|
)
|
1438
1462
|
end
|
1439
|
-
def self.values
|
1440
|
-
end
|
1463
|
+
def self.values; end
|
1441
1464
|
end
|
1442
1465
|
|
1443
1466
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
@@ -1445,12 +1468,55 @@ module Orb
|
|
1445
1468
|
attr_accessor :end_date
|
1446
1469
|
|
1447
1470
|
sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
|
1448
|
-
def self.new(end_date:)
|
1449
|
-
end
|
1471
|
+
def self.new(end_date:); end
|
1450
1472
|
|
1451
1473
|
sig { override.returns({end_date: T.nilable(Time)}) }
|
1452
|
-
def to_hash
|
1474
|
+
def to_hash; end
|
1475
|
+
end
|
1476
|
+
|
1477
|
+
class ChangedResources < Orb::Internal::Type::BaseModel
|
1478
|
+
# The credit notes that were created as part of this operation.
|
1479
|
+
sig { returns(T::Array[Orb::Models::CreditNote]) }
|
1480
|
+
attr_accessor :created_credit_notes
|
1481
|
+
|
1482
|
+
# The invoices that were created as part of this operation.
|
1483
|
+
sig { returns(T::Array[Orb::Models::Invoice]) }
|
1484
|
+
attr_accessor :created_invoices
|
1485
|
+
|
1486
|
+
# The credit notes that were voided as part of this operation.
|
1487
|
+
sig { returns(T::Array[Orb::Models::CreditNote]) }
|
1488
|
+
attr_accessor :voided_credit_notes
|
1489
|
+
|
1490
|
+
# The invoices that were voided as part of this operation.
|
1491
|
+
sig { returns(T::Array[Orb::Models::Invoice]) }
|
1492
|
+
attr_accessor :voided_invoices
|
1493
|
+
|
1494
|
+
# The resources that were changed as part of this operation. Only present when
|
1495
|
+
# fetched through the subscription changes API or if the
|
1496
|
+
# `include_changed_resources` parameter was passed in the request.
|
1497
|
+
sig do
|
1498
|
+
params(
|
1499
|
+
created_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
|
1500
|
+
created_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)],
|
1501
|
+
voided_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
|
1502
|
+
voided_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)]
|
1503
|
+
)
|
1504
|
+
.returns(T.attached_class)
|
1505
|
+
end
|
1506
|
+
def self.new(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:); end
|
1507
|
+
|
1508
|
+
sig do
|
1509
|
+
override
|
1510
|
+
.returns(
|
1511
|
+
{
|
1512
|
+
created_credit_notes: T::Array[Orb::Models::CreditNote],
|
1513
|
+
created_invoices: T::Array[Orb::Models::Invoice],
|
1514
|
+
voided_credit_notes: T::Array[Orb::Models::CreditNote],
|
1515
|
+
voided_invoices: T::Array[Orb::Models::Invoice]
|
1516
|
+
}
|
1517
|
+
)
|
1453
1518
|
end
|
1519
|
+
def to_hash; end
|
1454
1520
|
end
|
1455
1521
|
end
|
1456
1522
|
end
|