orb-billing 0.2.0 → 0.3.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/CHANGELOG.md +67 -0
- data/README.md +63 -53
- data/lib/orb/client.rb +4 -4
- data/lib/orb/errors.rb +9 -9
- data/lib/orb/file_part.rb +55 -0
- data/lib/orb/internal/page.rb +7 -11
- data/lib/orb/internal/transport/base_client.rb +10 -10
- data/lib/orb/internal/transport/pooled_net_requester.rb +2 -2
- data/lib/orb/internal/type/array_of.rb +11 -0
- data/lib/orb/internal/type/base_model.rb +33 -23
- data/lib/orb/internal/type/base_page.rb +9 -1
- data/lib/orb/internal/type/boolean.rb +14 -11
- data/lib/orb/internal/type/converter.rb +4 -1
- data/lib/orb/internal/type/enum.rb +19 -16
- data/lib/orb/internal/type/{io_like.rb → file_input.rb} +33 -15
- data/lib/orb/internal/type/hash_of.rb +11 -0
- data/lib/orb/internal/type/request_parameters.rb +3 -10
- data/lib/orb/internal/type/union.rb +10 -1
- data/lib/orb/internal/type/unknown.rb +14 -11
- data/lib/orb/internal/util.rb +88 -64
- data/lib/orb/internal.rb +0 -1
- data/lib/orb/models/alert.rb +68 -71
- data/lib/orb/models/alert_create_for_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_external_customer_params.rb +20 -25
- data/lib/orb/models/alert_create_for_subscription_params.rb +20 -25
- data/lib/orb/models/alert_disable_params.rb +5 -9
- data/lib/orb/models/alert_enable_params.rb +5 -9
- data/lib/orb/models/alert_list_params.rb +26 -36
- data/lib/orb/models/alert_retrieve_params.rb +3 -8
- data/lib/orb/models/alert_update_params.rb +14 -18
- data/lib/orb/models/amount_discount.rb +14 -14
- data/lib/orb/models/billable_metric.rb +23 -20
- data/lib/orb/models/billing_cycle_relative_date.rb +2 -5
- data/lib/orb/models/coupon.rb +28 -21
- data/lib/orb/models/coupon_archive_params.rb +3 -8
- data/lib/orb/models/coupon_create_params.rb +29 -34
- data/lib/orb/models/coupon_fetch_params.rb +3 -8
- data/lib/orb/models/coupon_list_params.rb +17 -17
- data/lib/orb/models/coupons/subscription_list_params.rb +12 -15
- data/lib/orb/models/credit_note.rb +100 -166
- data/lib/orb/models/credit_note_create_params.rb +15 -23
- data/lib/orb/models/credit_note_fetch_params.rb +3 -8
- data/lib/orb/models/credit_note_list_params.rb +20 -30
- data/lib/orb/models/customer.rb +224 -271
- data/lib/orb/models/customer_create_params.rb +216 -257
- data/lib/orb/models/customer_delete_params.rb +3 -8
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +3 -8
- data/lib/orb/models/customer_fetch_params.rb +3 -8
- data/lib/orb/models/customer_list_params.rb +20 -30
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +3 -8
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +3 -8
- data/lib/orb/models/customer_update_by_external_id_params.rb +212 -257
- data/lib/orb/models/customer_update_params.rb +212 -255
- data/lib/orb/models/customers/balance_transaction_create_params.rb +11 -16
- data/lib/orb/models/customers/balance_transaction_create_response.rb +33 -51
- data/lib/orb/models/customers/balance_transaction_list_params.rb +20 -30
- data/lib/orb/models/customers/balance_transaction_list_response.rb +33 -51
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +23 -27
- data/lib/orb/models/customers/cost_list_params.rb +17 -17
- data/lib/orb/models/customers/cost_list_response.rb +23 -27
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +10 -17
- data/lib/orb/models/customers/credit_list_params.rb +18 -22
- data/lib/orb/models/customers/credit_list_response.rb +10 -17
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +64 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +384 -491
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +63 -66
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +384 -498
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +33 -48
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +384 -494
- data/lib/orb/models/customers/credits/ledger_list_params.rb +32 -48
- data/lib/orb/models/customers/credits/ledger_list_response.rb +383 -501
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +47 -50
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_create_params.rb +46 -50
- data/lib/orb/models/customers/credits/top_up_create_response.rb +42 -46
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +4 -9
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +43 -46
- data/lib/orb/models/customers/credits/top_up_list_params.rb +12 -15
- data/lib/orb/models/customers/credits/top_up_list_response.rb +42 -46
- data/lib/orb/models/dimensional_price_group.rb +21 -15
- data/lib/orb/models/dimensional_price_group_create_params.rb +17 -23
- data/lib/orb/models/dimensional_price_group_list_params.rb +12 -15
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +3 -8
- data/lib/orb/models/dimensional_price_groups.rb +3 -7
- data/lib/orb/models/discount.rb +2 -3
- data/lib/orb/models/evaluate_price_group.rb +8 -11
- data/lib/orb/models/event_deprecate_params.rb +3 -8
- data/lib/orb/models/event_deprecate_response.rb +2 -6
- data/lib/orb/models/event_ingest_params.rb +33 -27
- data/lib/orb/models/event_ingest_response.rb +23 -24
- data/lib/orb/models/event_search_params.rb +15 -11
- data/lib/orb/models/event_search_response.rb +27 -22
- data/lib/orb/models/event_update_params.rb +19 -13
- data/lib/orb/models/event_update_response.rb +2 -6
- data/lib/orb/models/events/backfill_close_params.rb +3 -8
- data/lib/orb/models/events/backfill_close_response.rb +34 -39
- data/lib/orb/models/events/backfill_create_params.rb +28 -32
- data/lib/orb/models/events/backfill_create_response.rb +34 -39
- data/lib/orb/models/events/backfill_fetch_params.rb +3 -8
- data/lib/orb/models/events/backfill_fetch_response.rb +34 -39
- data/lib/orb/models/events/backfill_list_params.rb +12 -15
- data/lib/orb/models/events/backfill_list_response.rb +34 -39
- data/lib/orb/models/events/backfill_revert_params.rb +3 -8
- data/lib/orb/models/events/backfill_revert_response.rb +34 -39
- data/lib/orb/models/events/event_volumes.rb +11 -17
- data/lib/orb/models/events/volume_list_params.rb +19 -22
- data/lib/orb/models/invoice.rb +619 -681
- data/lib/orb/models/invoice_create_params.rb +52 -61
- data/lib/orb/models/invoice_fetch_params.rb +3 -8
- data/lib/orb/models/invoice_fetch_upcoming_params.rb +4 -9
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +618 -669
- data/lib/orb/models/invoice_issue_params.rb +10 -14
- data/lib/orb/models/invoice_level_discount.rb +2 -3
- data/lib/orb/models/invoice_line_item_create_params.rb +19 -14
- data/lib/orb/models/invoice_line_item_create_response.rb +281 -306
- data/lib/orb/models/invoice_list_params.rb +51 -66
- data/lib/orb/models/invoice_mark_paid_params.rb +9 -11
- data/lib/orb/models/invoice_pay_params.rb +3 -8
- data/lib/orb/models/invoice_update_params.rb +9 -9
- data/lib/orb/models/invoice_void_params.rb +3 -8
- data/lib/orb/models/item.rb +14 -25
- data/lib/orb/models/item_create_params.rb +5 -9
- data/lib/orb/models/item_fetch_params.rb +3 -8
- data/lib/orb/models/item_list_params.rb +12 -15
- data/lib/orb/models/item_update_params.rb +10 -22
- data/lib/orb/models/metric_create_params.rb +17 -13
- data/lib/orb/models/metric_fetch_params.rb +3 -8
- data/lib/orb/models/metric_list_params.rb +20 -30
- data/lib/orb/models/metric_update_params.rb +9 -9
- data/lib/orb/models/pagination_metadata.rb +3 -7
- data/lib/orb/models/percentage_discount.rb +15 -14
- data/lib/orb/models/plan.rb +259 -291
- data/lib/orb/models/plan_create_params.rb +2070 -2466
- data/lib/orb/models/plan_fetch_params.rb +3 -8
- data/lib/orb/models/plan_list_params.rb +25 -42
- data/lib/orb/models/plan_update_params.rb +12 -10
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +3 -8
- data/lib/orb/models/plans/external_plan_id_update_params.rb +12 -10
- data/lib/orb/models/price.rb +3842 -5005
- data/lib/orb/models/price_create_params.rb +203 -244
- data/lib/orb/models/price_evaluate_params.rb +21 -30
- data/lib/orb/models/price_evaluate_response.rb +2 -6
- data/lib/orb/models/price_fetch_params.rb +3 -8
- data/lib/orb/models/price_list_params.rb +12 -15
- data/lib/orb/models/price_update_params.rb +9 -9
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +3 -8
- data/lib/orb/models/prices/external_price_id_update_params.rb +9 -9
- data/lib/orb/models/subscription.rb +360 -405
- data/lib/orb/models/subscription_cancel_params.rb +16 -16
- data/lib/orb/models/subscription_cancel_response.rb +358 -399
- data/lib/orb/models/subscription_change_apply_params.rb +7 -10
- data/lib/orb/models/subscription_change_apply_response.rb +384 -418
- data/lib/orb/models/subscription_change_cancel_params.rb +3 -8
- data/lib/orb/models/subscription_change_cancel_response.rb +384 -417
- data/lib/orb/models/subscription_change_retrieve_params.rb +3 -8
- data/lib/orb/models/subscription_change_retrieve_response.rb +385 -417
- data/lib/orb/models/subscription_create_params.rb +4735 -5417
- data/lib/orb/models/subscription_create_response.rb +358 -399
- data/lib/orb/models/subscription_fetch_costs_params.rb +17 -17
- data/lib/orb/models/subscription_fetch_costs_response.rb +23 -27
- data/lib/orb/models/subscription_fetch_params.rb +3 -8
- data/lib/orb/models/subscription_fetch_schedule_params.rb +20 -30
- data/lib/orb/models/subscription_fetch_schedule_response.rb +15 -17
- data/lib/orb/models/subscription_fetch_usage_params.rb +32 -43
- data/lib/orb/models/subscription_list_params.rb +28 -41
- data/lib/orb/models/subscription_price_intervals_params.rb +2560 -3040
- data/lib/orb/models/subscription_price_intervals_response.rb +361 -399
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +4728 -5411
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +361 -398
- data/lib/orb/models/subscription_trigger_phase_params.rb +12 -10
- data/lib/orb/models/subscription_trigger_phase_response.rb +360 -399
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +361 -398
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +5 -9
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +362 -396
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +3 -8
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +362 -396
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +22 -33
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +361 -398
- data/lib/orb/models/subscription_update_params.rb +21 -23
- data/lib/orb/models/subscription_update_trial_params.rb +15 -18
- data/lib/orb/models/subscription_update_trial_response.rb +360 -399
- data/lib/orb/models/subscription_usage.rb +37 -80
- data/lib/orb/models/subscriptions.rb +3 -7
- data/lib/orb/models/top_level_ping_params.rb +3 -8
- data/lib/orb/models/top_level_ping_response.rb +2 -6
- data/lib/orb/models/trial_discount.rb +16 -24
- data/lib/orb/models/usage_discount.rb +15 -14
- data/lib/orb/models.rb +220 -0
- data/lib/orb/request_options.rb +4 -6
- data/lib/orb/resources/alerts.rb +48 -17
- data/lib/orb/resources/coupons/subscriptions.rb +9 -2
- data/lib/orb/resources/coupons.rb +26 -8
- data/lib/orb/resources/credit_notes.rb +17 -4
- data/lib/orb/resources/customers/balance_transactions.rb +18 -3
- data/lib/orb/resources/customers/costs.rb +26 -8
- data/lib/orb/resources/customers/credits/ledger.rb +112 -32
- data/lib/orb/resources/customers/credits/top_ups.rb +67 -20
- data/lib/orb/resources/customers/credits.rb +28 -8
- data/lib/orb/resources/customers.rb +138 -39
- data/lib/orb/resources/dimensional_price_groups.rb +19 -4
- data/lib/orb/resources/events/backfills.rb +32 -9
- data/lib/orb/resources/events/volume.rb +14 -4
- data/lib/orb/resources/events.rb +40 -11
- data/lib/orb/resources/invoice_line_items.rb +16 -6
- data/lib/orb/resources/invoices.rb +77 -17
- data/lib/orb/resources/items.rb +10 -3
- data/lib/orb/resources/metrics.rb +33 -8
- data/lib/orb/resources/plans/external_plan_id.rb +10 -2
- data/lib/orb/resources/plans.rb +47 -11
- data/lib/orb/resources/prices/external_price_id.rb +9 -3
- data/lib/orb/resources/prices.rb +101 -26
- data/lib/orb/resources/subscription_changes.rb +5 -2
- data/lib/orb/resources/subscriptions.rb +292 -78
- data/lib/orb/version.rb +1 -1
- data/lib/orb.rb +2 -10
- data/rbi/{lib/orb → orb}/client.rbi +4 -4
- data/rbi/{lib/orb → orb}/errors.rbi +1 -1
- data/rbi/orb/file_part.rbi +34 -0
- data/rbi/{lib/orb → orb}/internal/transport/base_client.rbi +19 -5
- data/rbi/{lib/orb → orb}/internal/type/array_of.rbi +3 -0
- data/rbi/{lib/orb → orb}/internal/type/base_model.rbi +7 -1
- data/rbi/{lib/orb → orb}/internal/type/base_page.rbi +2 -0
- data/rbi/{lib/orb → orb}/internal/type/enum.rbi +3 -6
- data/rbi/{lib/orb/internal/type/io_like.rbi → orb/internal/type/file_input.rbi} +5 -2
- data/rbi/{lib/orb → orb}/internal/type/hash_of.rbi +3 -0
- data/rbi/{lib/orb → orb}/internal/type/request_parameters.rbi +1 -1
- data/rbi/{lib/orb → orb}/internal/type/union.rbi +3 -0
- data/rbi/{lib/orb → orb}/internal/util.rbi +28 -19
- data/rbi/{lib/orb → orb}/internal.rbi +0 -1
- data/rbi/{lib/orb → orb}/models/alert.rbi +28 -8
- data/rbi/{lib/orb → orb}/models/alert_create_for_customer_params.rbi +16 -6
- data/rbi/{lib/orb → orb}/models/alert_create_for_external_customer_params.rbi +16 -6
- data/rbi/{lib/orb → orb}/models/alert_create_for_subscription_params.rbi +16 -6
- data/rbi/{lib/orb → orb}/models/alert_disable_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/alert_enable_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/alert_list_params.rbi +6 -0
- data/rbi/{lib/orb → orb}/models/alert_update_params.rbi +11 -4
- data/rbi/{lib/orb → orb}/models/amount_discount.rbi +10 -4
- data/rbi/{lib/orb → orb}/models/billable_metric.rbi +16 -3
- data/rbi/{lib/orb → orb}/models/billing_cycle_relative_date.rbi +1 -1
- data/rbi/{lib/orb → orb}/models/coupon.rbi +10 -3
- data/rbi/{lib/orb → orb}/models/coupon_create_params.rbi +15 -12
- data/rbi/{lib/orb → orb}/models/coupon_list_params.rbi +13 -3
- data/rbi/{lib/orb → orb}/models/coupons/subscription_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/credit_note.rbi +44 -12
- data/rbi/{lib/orb → orb}/models/credit_note_create_params.rbi +15 -6
- data/rbi/{lib/orb → orb}/models/credit_note_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/customer.rbi +130 -11
- data/rbi/{lib/orb → orb}/models/customer_create_params.rbi +151 -17
- data/rbi/{lib/orb → orb}/models/customer_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/customer_update_by_external_id_params.rbi +149 -17
- data/rbi/{lib/orb → orb}/models/customer_update_params.rbi +149 -17
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_create_params.rbi +8 -4
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_create_response.rbi +18 -8
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/customers/balance_transaction_list_response.rbi +18 -8
- data/rbi/{lib/orb → orb}/models/customers/cost_list_by_external_id_params.rbi +9 -5
- data/rbi/orb/models/customers/cost_list_by_external_id_response.rbi +225 -0
- data/rbi/{lib/orb → orb}/models/customers/cost_list_params.rbi +9 -5
- data/rbi/orb/models/customers/cost_list_response.rbi +223 -0
- data/rbi/{lib/orb → orb}/models/customers/credit_list_by_external_id_params.rbi +13 -3
- data/rbi/{lib/orb → orb}/models/customers/credit_list_by_external_id_response.rbi +1 -2
- data/rbi/{lib/orb → orb}/models/customers/credit_list_params.rbi +13 -3
- data/rbi/{lib/orb → orb}/models/customers/credit_list_response.rbi +1 -2
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +40 -18
- data/rbi/{lib/orb/models/customers/credits/ledger_create_entry_response.rbi → orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi} +157 -170
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_create_entry_params.rbi +40 -6
- data/rbi/{lib/orb/models/customers/credits/ledger_list_response.rbi → orb/models/customers/credits/ledger_create_entry_response.rbi} +149 -196
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_list_by_external_id_params.rbi +6 -16
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_list_by_external_id_response.rbi +148 -229
- data/rbi/{lib/orb → orb}/models/customers/credits/ledger_list_params.rbi +6 -4
- data/rbi/{lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi → orb/models/customers/credits/ledger_list_response.rbi} +149 -343
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_by_external_id_params.rbi +27 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_by_external_id_response.rbi +25 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_params.rbi +27 -4
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_create_response.rbi +25 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_by_external_id_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_by_external_id_response.rbi +25 -10
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/customers/credits/top_up_list_response.rbi +25 -4
- data/rbi/{lib/orb → orb}/models/dimensional_price_group.rbi +11 -3
- data/rbi/{lib/orb → orb}/models/dimensional_price_group_create_params.rbi +4 -0
- data/rbi/{lib/orb → orb}/models/dimensional_price_group_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/evaluate_price_group.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/event_deprecate_response.rbi +4 -2
- data/rbi/{lib/orb → orb}/models/event_ingest_params.rbi +22 -5
- data/rbi/{lib/orb → orb}/models/event_ingest_response.rbi +15 -4
- data/rbi/{lib/orb → orb}/models/event_search_params.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/event_search_response.rbi +14 -3
- data/rbi/{lib/orb → orb}/models/event_update_params.rbi +10 -3
- data/rbi/{lib/orb → orb}/models/event_update_response.rbi +4 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_close_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_create_params.rbi +18 -0
- data/rbi/{lib/orb → orb}/models/events/backfill_create_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_fetch_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_list_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/backfill_revert_response.rbi +14 -2
- data/rbi/{lib/orb → orb}/models/events/event_volumes.rbi +8 -4
- data/rbi/{lib/orb → orb}/models/events/volume_list_params.rbi +18 -2
- data/rbi/{lib/orb → orb}/models/invoice.rbi +513 -202
- data/rbi/{lib/orb → orb}/models/invoice_create_params.rbi +38 -6
- data/rbi/{lib/orb → orb}/models/invoice_fetch_upcoming_response.rbi +513 -216
- data/rbi/{lib/orb → orb}/models/invoice_issue_params.rbi +9 -2
- data/rbi/{lib/orb → orb}/models/invoice_line_item_create_params.rbi +16 -2
- data/rbi/{lib/orb → orb}/models/invoice_line_item_create_response.rbi +279 -182
- data/rbi/{lib/orb → orb}/models/invoice_list_params.rbi +9 -2
- data/rbi/{lib/orb → orb}/models/invoice_mark_paid_params.rbi +9 -2
- data/rbi/{lib/orb → orb}/models/invoice_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/item.rbi +1 -2
- data/rbi/{lib/orb → orb}/models/item_create_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/item_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/item_update_params.rbi +1 -8
- data/rbi/{lib/orb → orb}/models/metric_create_params.rbi +15 -2
- data/rbi/{lib/orb → orb}/models/metric_list_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/metric_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/percentage_discount.rbi +11 -4
- data/rbi/{lib/orb → orb}/models/plan.rbi +207 -120
- data/rbi/{lib/orb → orb}/models/plan_create_params.rbi +1971 -2414
- data/rbi/{lib/orb → orb}/models/plan_list_params.rbi +5 -1
- data/rbi/{lib/orb → orb}/models/plan_update_params.rbi +11 -2
- data/rbi/{lib/orb → orb}/models/plans/external_plan_id_update_params.rbi +11 -2
- data/rbi/{lib/orb → orb}/models/price.rbi +2594 -2957
- data/rbi/{lib/orb → orb}/models/price_create_params.rbi +137 -53
- data/rbi/{lib/orb → orb}/models/price_evaluate_params.rbi +10 -0
- data/rbi/{lib/orb → orb}/models/price_list_params.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/price_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/prices/external_price_id_update_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/subscription.rbi +292 -129
- data/rbi/{lib/orb → orb}/models/subscription_cancel_params.rbi +8 -5
- data/rbi/{lib/orb → orb}/models/subscription_cancel_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_change_apply_params.rbi +7 -2
- data/rbi/{lib/orb → orb}/models/subscription_change_apply_response.rbi +317 -136
- data/rbi/{lib/orb → orb}/models/subscription_change_cancel_response.rbi +317 -136
- data/rbi/{lib/orb → orb}/models/subscription_change_retrieve_response.rbi +317 -136
- data/rbi/{lib/orb → orb}/models/subscription_create_params.rbi +4271 -4270
- data/rbi/{lib/orb → orb}/models/subscription_create_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_fetch_costs_params.rbi +9 -5
- data/rbi/orb/models/subscription_fetch_costs_response.rbi +221 -0
- data/rbi/{lib/orb → orb}/models/subscription_fetch_schedule_params.rbi +3 -0
- data/rbi/{lib/orb → orb}/models/subscription_fetch_schedule_response.rbi +8 -2
- data/rbi/{lib/orb → orb}/models/subscription_fetch_usage_params.rbi +13 -4
- data/rbi/{lib/orb → orb}/models/subscription_list_params.rbi +4 -2
- data/rbi/{lib/orb → orb}/models/subscription_price_intervals_params.rbi +2354 -2317
- data/rbi/{lib/orb → orb}/models/subscription_price_intervals_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_schedule_plan_change_params.rbi +4280 -3758
- data/rbi/{lib/orb → orb}/models/subscription_schedule_plan_change_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_trigger_phase_params.rbi +10 -2
- data/rbi/{lib/orb → orb}/models/subscription_trigger_phase_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_cancellation_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +5 -2
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +305 -138
- data/rbi/{lib/orb → orb}/models/subscription_unschedule_pending_plan_changes_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_update_fixed_fee_quantity_params.rbi +11 -2
- data/rbi/{lib/orb → orb}/models/subscription_update_fixed_fee_quantity_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_update_params.rbi +15 -0
- data/rbi/{lib/orb → orb}/models/subscription_update_trial_params.rbi +11 -5
- data/rbi/{lib/orb → orb}/models/subscription_update_trial_response.rbi +305 -132
- data/rbi/{lib/orb → orb}/models/subscription_usage.rbi +2 -16
- data/rbi/{lib/orb → orb}/models/trial_discount.rbi +5 -1
- data/rbi/{lib/orb → orb}/models/usage_discount.rbi +11 -3
- data/rbi/orb/models.rbi +220 -0
- data/rbi/{lib/orb → orb}/request_options.rbi +2 -0
- data/rbi/{lib/orb → orb}/resources/alerts.rbi +8 -14
- data/rbi/{lib/orb → orb}/resources/coupons/subscriptions.rbi +1 -1
- data/rbi/{lib/orb → orb}/resources/coupons.rbi +6 -18
- data/rbi/{lib/orb → orb}/resources/credit_notes.rbi +3 -9
- data/rbi/{lib/orb → orb}/resources/customers/balance_transactions.rbi +2 -2
- data/rbi/{lib/orb → orb}/resources/customers/costs.rbi +2 -2
- data/rbi/{lib/orb → orb}/resources/customers/credits/ledger.rbi +32 -32
- data/rbi/{lib/orb → orb}/resources/customers/credits/top_ups.rbi +6 -18
- data/rbi/{lib/orb → orb}/resources/customers/credits.rbi +2 -2
- data/rbi/{lib/orb → orb}/resources/customers.rbi +15 -45
- data/rbi/{lib/orb → orb}/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +1 -4
- data/rbi/{lib/orb → orb}/resources/dimensional_price_groups.rbi +3 -10
- data/rbi/{lib/orb → orb}/resources/events/backfills.rbi +5 -18
- data/rbi/{lib/orb → orb}/resources/events/volume.rbi +1 -1
- data/rbi/{lib/orb → orb}/resources/events.rbi +4 -10
- data/rbi/{lib/orb → orb}/resources/invoice_line_items.rbi +1 -1
- data/rbi/{lib/orb → orb}/resources/invoices.rbi +9 -34
- data/rbi/{lib/orb → orb}/resources/items.rbi +4 -17
- data/rbi/{lib/orb → orb}/resources/metrics.rbi +4 -10
- data/rbi/{lib/orb → orb}/resources/plans/external_plan_id.rbi +2 -8
- data/rbi/{lib/orb → orb}/resources/plans.rbi +29 -35
- data/rbi/orb/resources/prices/external_price_id.rbi +103 -0
- data/rbi/{lib/orb → orb}/resources/prices.rbi +117 -124
- data/rbi/{lib/orb → orb}/resources/subscription_changes.rbi +3 -9
- data/rbi/{lib/orb → orb}/resources/subscriptions.rbi +16 -32
- data/rbi/{lib/orb → orb}/resources/top_level.rbi +1 -4
- data/sig/orb/file_part.rbs +21 -0
- data/sig/orb/internal/transport/base_client.rbs +9 -3
- data/sig/orb/internal/type/array_of.rbs +2 -0
- data/sig/orb/internal/type/base_model.rbs +4 -0
- data/sig/orb/internal/type/enum.rbs +2 -2
- data/sig/orb/internal/type/{io_like.rbs → file_input.rbs} +1 -1
- data/sig/orb/internal/type/hash_of.rbs +2 -0
- data/sig/orb/internal/type/union.rbs +2 -0
- data/sig/orb/internal/util.rbs +16 -12
- data/sig/orb/models/coupon_create_params.rbs +9 -10
- data/sig/orb/models/customer_create_params.rbs +9 -10
- data/sig/orb/models/customer_update_by_external_id_params.rbs +9 -10
- data/sig/orb/models/customer_update_params.rbs +9 -10
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +113 -113
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +113 -113
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +113 -113
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +113 -113
- data/sig/orb/models/invoice.rbs +54 -54
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +54 -54
- data/sig/orb/models/invoice_line_item_create_response.rbs +54 -54
- data/sig/orb/models/plan.rbs +21 -21
- data/sig/orb/models/plan_create_params.rbs +653 -653
- data/sig/orb/models/price.rbs +1517 -1521
- data/sig/orb/models/subscription.rbs +34 -34
- data/sig/orb/models/subscription_cancel_response.rbs +34 -34
- data/sig/orb/models/subscription_change_apply_response.rbs +34 -34
- data/sig/orb/models/subscription_change_cancel_response.rbs +34 -34
- data/sig/orb/models/subscription_change_retrieve_response.rbs +34 -34
- data/sig/orb/models/subscription_create_params.rbs +1348 -1348
- data/sig/orb/models/subscription_create_response.rbs +34 -34
- data/sig/orb/models/subscription_price_intervals_params.rbs +767 -769
- data/sig/orb/models/subscription_price_intervals_response.rbs +34 -34
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +1348 -1348
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +34 -34
- data/sig/orb/models/subscription_trigger_phase_response.rbs +34 -34
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +34 -34
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +34 -34
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +34 -34
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +34 -34
- data/sig/orb/models/subscription_update_trial_response.rbs +34 -34
- data/sig/orb/models.rbs +215 -0
- metadata +230 -224
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +0 -208
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +0 -206
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +0 -204
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +0 -106
- /data/rbi/{lib/orb → orb}/internal/page.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/transport/pooled_net_requester.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/type/boolean.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/type/converter.rbi +0 -0
- /data/rbi/{lib/orb → orb}/internal/type/unknown.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/alert_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/coupon_archive_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/coupon_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/credit_note_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_delete_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_fetch_by_external_id_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customer_sync_payment_methods_from_gateway_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customers/credits/top_up_delete_by_external_id_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/customers/credits/top_up_delete_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/dimensional_price_group_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/dimensional_price_groups.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/discount.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/event_deprecate_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/events/backfill_close_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/events/backfill_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/events/backfill_revert_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_fetch_upcoming_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_level_discount.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_pay_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/invoice_void_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/item_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/metric_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/pagination_metadata.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/plan_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/plans/external_plan_id_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/price_evaluate_response.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/price_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/prices/external_price_id_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_change_cancel_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_change_retrieve_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_fetch_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_unschedule_cancellation_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscription_unschedule_pending_plan_changes_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/subscriptions.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/top_level_ping_params.rbi +0 -0
- /data/rbi/{lib/orb → orb}/models/top_level_ping_response.rbi +0 -0
- /data/rbi/{lib/orb → orb}/version.rbi +0 -0
@@ -47,8 +47,17 @@ module Orb
|
|
47
47
|
)
|
48
48
|
.returns(T.attached_class)
|
49
49
|
end
|
50
|
-
def self.new(
|
51
|
-
|
50
|
+
def self.new(
|
51
|
+
id:,
|
52
|
+
# Subscription change will be cancelled at this time and can no longer be applied.
|
53
|
+
expiration_time:,
|
54
|
+
status:,
|
55
|
+
subscription:,
|
56
|
+
# When this change was applied.
|
57
|
+
applied_at: nil,
|
58
|
+
# When this change was cancelled.
|
59
|
+
cancelled_at: nil
|
60
|
+
); end
|
52
61
|
sig do
|
53
62
|
override
|
54
63
|
.returns(
|
@@ -68,8 +77,7 @@ module Orb
|
|
68
77
|
extend Orb::Internal::Type::Enum
|
69
78
|
|
70
79
|
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionChangeCancelResponse::Status) }
|
71
|
-
OrSymbol =
|
72
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::SubscriptionChangeCancelResponse::Status::TaggedSymbol) }
|
80
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
73
81
|
|
74
82
|
PENDING = T.let(:pending, Orb::Models::SubscriptionChangeCancelResponse::Status::TaggedSymbol)
|
75
83
|
APPLIED = T.let(:applied, Orb::Models::SubscriptionChangeCancelResponse::Status::TaggedSymbol)
|
@@ -169,9 +177,9 @@ module Orb
|
|
169
177
|
returns(
|
170
178
|
T::Array[
|
171
179
|
T.any(
|
172
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
173
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
174
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
180
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount,
|
181
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage,
|
182
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage
|
175
183
|
)
|
176
184
|
]
|
177
185
|
)
|
@@ -314,10 +322,10 @@ module Orb
|
|
314
322
|
default_invoice_memo: T.nilable(String),
|
315
323
|
discount_intervals: T::Array[
|
316
324
|
T.any(
|
317
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
325
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount,
|
318
326
|
Orb::Internal::AnyHash,
|
319
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
320
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
327
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage,
|
328
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage
|
321
329
|
)
|
322
330
|
],
|
323
331
|
end_date: T.nilable(Time),
|
@@ -367,31 +375,90 @@ module Orb
|
|
367
375
|
end
|
368
376
|
def self.new(
|
369
377
|
id:,
|
378
|
+
# The current plan phase that is active, only if the subscription's plan has
|
379
|
+
# phases.
|
370
380
|
active_plan_phase_order:,
|
381
|
+
# The adjustment intervals for this subscription sorted by the start_date of the
|
382
|
+
# adjustment interval.
|
371
383
|
adjustment_intervals:,
|
384
|
+
# Determines whether issued invoices for this subscription will automatically be
|
385
|
+
# charged with the saved payment method on the due date. This property defaults to
|
386
|
+
# the plan's behavior. If null, defaults to the customer's setting.
|
372
387
|
auto_collection:,
|
373
388
|
billing_cycle_anchor_configuration:,
|
389
|
+
# The day of the month on which the billing cycle is anchored. If the maximum
|
390
|
+
# number of days in a month is greater than this value, the last day of the month
|
391
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
392
|
+
# period begins on the 30th.
|
374
393
|
billing_cycle_day:,
|
375
394
|
created_at:,
|
395
|
+
# The end of the current billing period. This is an exclusive timestamp, such that
|
396
|
+
# the instant returned is not part of the billing period. Set to null for
|
397
|
+
# subscriptions that are not currently active.
|
376
398
|
current_billing_period_end_date:,
|
399
|
+
# The start date of the current billing period. This is an inclusive timestamp;
|
400
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
401
|
+
# if the subscription is not currently active.
|
377
402
|
current_billing_period_start_date:,
|
403
|
+
# A customer is a buyer of your products, and the other party to the billing
|
404
|
+
# relationship.
|
405
|
+
#
|
406
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
407
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
408
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
409
|
+
# `external_customer_id` with your own identifier. See
|
410
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
411
|
+
# information about how these aliases work in Orb.
|
412
|
+
#
|
413
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
414
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
415
|
+
# `payment_provider` enum field to express this mapping.
|
416
|
+
#
|
417
|
+
# A customer also has a timezone (from the standard
|
418
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
419
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
420
|
+
# information on what this timezone parameter influences within Orb.
|
378
421
|
customer:,
|
422
|
+
# Determines the default memo on this subscriptions' invoices. Note that if this
|
423
|
+
# is not provided, it is determined by the plan configuration.
|
379
424
|
default_invoice_memo:,
|
425
|
+
# The discount intervals for this subscription sorted by the start_date.
|
380
426
|
discount_intervals:,
|
427
|
+
# The date Orb stops billing for this subscription.
|
381
428
|
end_date:,
|
382
429
|
fixed_fee_quantity_schedule:,
|
383
430
|
invoicing_threshold:,
|
431
|
+
# The maximum intervals for this subscription sorted by the start_date.
|
384
432
|
maximum_intervals:,
|
433
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
434
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
435
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
436
|
+
# `null`.
|
385
437
|
metadata:,
|
438
|
+
# The minimum intervals for this subscription sorted by the start_date.
|
386
439
|
minimum_intervals:,
|
440
|
+
# Determines the difference between the invoice issue date for subscription
|
441
|
+
# invoices as the date that they are due. A value of `0` here represents that the
|
442
|
+
# invoice is due on issue, whereas a value of `30` represents that the customer
|
443
|
+
# has a month to pay the invoice.
|
387
444
|
net_terms:,
|
445
|
+
# A pending subscription change if one exists on this subscription.
|
388
446
|
pending_subscription_change:,
|
447
|
+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
448
|
+
# subscribed to by a customer. Plans define the billing behavior of the
|
449
|
+
# subscription. You can see more about how to configure prices in the
|
450
|
+
# [Price resource](/reference/price).
|
389
451
|
plan:,
|
452
|
+
# The price intervals for this subscription.
|
390
453
|
price_intervals:,
|
391
454
|
redeemed_coupon:,
|
455
|
+
# The date Orb starts billing for this subscription.
|
392
456
|
start_date:,
|
393
457
|
status:,
|
394
458
|
trial_info:,
|
459
|
+
# The resources that were changed as part of this operation. Only present when
|
460
|
+
# fetched through the subscription changes API or if the
|
461
|
+
# `include_changed_resources` parameter was passed in the request.
|
395
462
|
changed_resources: nil
|
396
463
|
); end
|
397
464
|
sig do
|
@@ -411,9 +478,9 @@ module Orb
|
|
411
478
|
default_invoice_memo: T.nilable(String),
|
412
479
|
discount_intervals: T::Array[
|
413
480
|
T.any(
|
414
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
415
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
416
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
481
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount,
|
482
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage,
|
483
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage
|
417
484
|
)
|
418
485
|
],
|
419
486
|
end_date: T.nilable(Time),
|
@@ -443,11 +510,11 @@ module Orb
|
|
443
510
|
sig do
|
444
511
|
returns(
|
445
512
|
T.any(
|
446
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
447
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
448
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
449
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
450
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
513
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
514
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
515
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
516
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
517
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum
|
451
518
|
)
|
452
519
|
)
|
453
520
|
end
|
@@ -469,12 +536,12 @@ module Orb
|
|
469
536
|
params(
|
470
537
|
id: String,
|
471
538
|
adjustment: T.any(
|
472
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
539
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
473
540
|
Orb::Internal::AnyHash,
|
474
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
475
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
476
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
477
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
541
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
542
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
543
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
544
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum
|
478
545
|
),
|
479
546
|
applies_to_price_interval_ids: T::Array[String],
|
480
547
|
end_date: T.nilable(Time),
|
@@ -482,19 +549,27 @@ module Orb
|
|
482
549
|
)
|
483
550
|
.returns(T.attached_class)
|
484
551
|
end
|
485
|
-
def self.new(
|
486
|
-
|
552
|
+
def self.new(
|
553
|
+
id:,
|
554
|
+
adjustment:,
|
555
|
+
# The price interval IDs that this adjustment applies to.
|
556
|
+
applies_to_price_interval_ids:,
|
557
|
+
# The end date of the adjustment interval.
|
558
|
+
end_date:,
|
559
|
+
# The start date of the adjustment interval.
|
560
|
+
start_date:
|
561
|
+
); end
|
487
562
|
sig do
|
488
563
|
override
|
489
564
|
.returns(
|
490
565
|
{
|
491
566
|
id: String,
|
492
567
|
adjustment: T.any(
|
493
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
494
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
495
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
496
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
497
|
-
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
568
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount,
|
569
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount,
|
570
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount,
|
571
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum,
|
572
|
+
Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum
|
498
573
|
),
|
499
574
|
applies_to_price_interval_ids: T::Array[String],
|
500
575
|
end_date: T.nilable(Time),
|
@@ -507,7 +582,7 @@ module Orb
|
|
507
582
|
module Adjustment
|
508
583
|
extend Orb::Internal::Type::Union
|
509
584
|
|
510
|
-
class
|
585
|
+
class UsageDiscount < Orb::Internal::Type::BaseModel
|
511
586
|
sig { returns(String) }
|
512
587
|
attr_accessor :id
|
513
588
|
|
@@ -550,10 +625,17 @@ module Orb
|
|
550
625
|
end
|
551
626
|
def self.new(
|
552
627
|
id:,
|
628
|
+
# The price IDs that this adjustment applies to.
|
553
629
|
applies_to_price_ids:,
|
630
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
631
|
+
# that apply to only one price.
|
554
632
|
is_invoice_level:,
|
633
|
+
# The plan phase in which this adjustment is active.
|
555
634
|
plan_phase_order:,
|
635
|
+
# The reason for the adjustment.
|
556
636
|
reason:,
|
637
|
+
# The number of usage units by which to discount the price this adjustment applies
|
638
|
+
# to in a given billing period.
|
557
639
|
usage_discount:,
|
558
640
|
adjustment_type: :usage_discount
|
559
641
|
); end
|
@@ -574,7 +656,7 @@ module Orb
|
|
574
656
|
def to_hash; end
|
575
657
|
end
|
576
658
|
|
577
|
-
class
|
659
|
+
class AmountDiscount < Orb::Internal::Type::BaseModel
|
578
660
|
sig { returns(String) }
|
579
661
|
attr_accessor :id
|
580
662
|
|
@@ -617,10 +699,17 @@ module Orb
|
|
617
699
|
end
|
618
700
|
def self.new(
|
619
701
|
id:,
|
702
|
+
# The amount by which to discount the prices this adjustment applies to in a given
|
703
|
+
# billing period.
|
620
704
|
amount_discount:,
|
705
|
+
# The price IDs that this adjustment applies to.
|
621
706
|
applies_to_price_ids:,
|
707
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
708
|
+
# that apply to only one price.
|
622
709
|
is_invoice_level:,
|
710
|
+
# The plan phase in which this adjustment is active.
|
623
711
|
plan_phase_order:,
|
712
|
+
# The reason for the adjustment.
|
624
713
|
reason:,
|
625
714
|
adjustment_type: :amount_discount
|
626
715
|
); end
|
@@ -641,7 +730,7 @@ module Orb
|
|
641
730
|
def to_hash; end
|
642
731
|
end
|
643
732
|
|
644
|
-
class
|
733
|
+
class PercentageDiscount < Orb::Internal::Type::BaseModel
|
645
734
|
sig { returns(String) }
|
646
735
|
attr_accessor :id
|
647
736
|
|
@@ -684,10 +773,17 @@ module Orb
|
|
684
773
|
end
|
685
774
|
def self.new(
|
686
775
|
id:,
|
776
|
+
# The price IDs that this adjustment applies to.
|
687
777
|
applies_to_price_ids:,
|
778
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
779
|
+
# that apply to only one price.
|
688
780
|
is_invoice_level:,
|
781
|
+
# The percentage (as a value between 0 and 1) by which to discount the price
|
782
|
+
# intervals this adjustment applies to in a given billing period.
|
689
783
|
percentage_discount:,
|
784
|
+
# The plan phase in which this adjustment is active.
|
690
785
|
plan_phase_order:,
|
786
|
+
# The reason for the adjustment.
|
691
787
|
reason:,
|
692
788
|
adjustment_type: :percentage_discount
|
693
789
|
); end
|
@@ -708,7 +804,7 @@ module Orb
|
|
708
804
|
def to_hash; end
|
709
805
|
end
|
710
806
|
|
711
|
-
class
|
807
|
+
class Minimum < Orb::Internal::Type::BaseModel
|
712
808
|
sig { returns(String) }
|
713
809
|
attr_accessor :id
|
714
810
|
|
@@ -756,11 +852,19 @@ module Orb
|
|
756
852
|
end
|
757
853
|
def self.new(
|
758
854
|
id:,
|
855
|
+
# The price IDs that this adjustment applies to.
|
759
856
|
applies_to_price_ids:,
|
857
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
858
|
+
# that apply to only one price.
|
760
859
|
is_invoice_level:,
|
860
|
+
# The item ID that revenue from this minimum will be attributed to.
|
761
861
|
item_id:,
|
862
|
+
# The minimum amount to charge in a given billing period for the prices this
|
863
|
+
# adjustment applies to.
|
762
864
|
minimum_amount:,
|
865
|
+
# The plan phase in which this adjustment is active.
|
763
866
|
plan_phase_order:,
|
867
|
+
# The reason for the adjustment.
|
764
868
|
reason:,
|
765
869
|
adjustment_type: :minimum
|
766
870
|
); end
|
@@ -782,7 +886,7 @@ module Orb
|
|
782
886
|
def to_hash; end
|
783
887
|
end
|
784
888
|
|
785
|
-
class
|
889
|
+
class Maximum < Orb::Internal::Type::BaseModel
|
786
890
|
sig { returns(String) }
|
787
891
|
attr_accessor :id
|
788
892
|
|
@@ -825,10 +929,17 @@ module Orb
|
|
825
929
|
end
|
826
930
|
def self.new(
|
827
931
|
id:,
|
932
|
+
# The price IDs that this adjustment applies to.
|
828
933
|
applies_to_price_ids:,
|
934
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
935
|
+
# that apply to only one price.
|
829
936
|
is_invoice_level:,
|
937
|
+
# The maximum amount to charge in a given billing period for the prices this
|
938
|
+
# adjustment applies to.
|
830
939
|
maximum_amount:,
|
940
|
+
# The plan phase in which this adjustment is active.
|
831
941
|
plan_phase_order:,
|
942
|
+
# The reason for the adjustment.
|
832
943
|
reason:,
|
833
944
|
adjustment_type: :maximum
|
834
945
|
); end
|
@@ -852,7 +963,7 @@ module Orb
|
|
852
963
|
sig do
|
853
964
|
override
|
854
965
|
.returns(
|
855
|
-
[Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::
|
966
|
+
[Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::UsageDiscount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::AmountDiscount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::PercentageDiscount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Minimum, Orb::Models::SubscriptionChangeCancelResponse::Subscription::AdjustmentInterval::Adjustment::Maximum]
|
856
967
|
)
|
857
968
|
end
|
858
969
|
def self.variants; end
|
@@ -885,8 +996,20 @@ module Orb
|
|
885
996
|
year: T.nilable(Integer)
|
886
997
|
).returns(T.attached_class)
|
887
998
|
end
|
888
|
-
def self.new(
|
889
|
-
|
999
|
+
def self.new(
|
1000
|
+
# The day of the month on which the billing cycle is anchored. If the maximum
|
1001
|
+
# number of days in a month is greater than this value, the last day of the month
|
1002
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
1003
|
+
# period begins on the 30th.
|
1004
|
+
day:,
|
1005
|
+
# The month on which the billing cycle is anchored (e.g. a quarterly price
|
1006
|
+
# anchored in February would have cycles starting February, May, August, and
|
1007
|
+
# November).
|
1008
|
+
month: nil,
|
1009
|
+
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
1010
|
+
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
1011
|
+
year: nil
|
1012
|
+
); end
|
890
1013
|
sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
|
891
1014
|
def to_hash; end
|
892
1015
|
end
|
@@ -894,7 +1017,7 @@ module Orb
|
|
894
1017
|
module DiscountInterval
|
895
1018
|
extend Orb::Internal::Type::Union
|
896
1019
|
|
897
|
-
class
|
1020
|
+
class Amount < Orb::Internal::Type::BaseModel
|
898
1021
|
# Only available if discount_type is `amount`.
|
899
1022
|
sig { returns(String) }
|
900
1023
|
attr_accessor :amount_discount
|
@@ -930,10 +1053,15 @@ module Orb
|
|
930
1053
|
.returns(T.attached_class)
|
931
1054
|
end
|
932
1055
|
def self.new(
|
1056
|
+
# Only available if discount_type is `amount`.
|
933
1057
|
amount_discount:,
|
1058
|
+
# The price ids that this discount interval applies to.
|
934
1059
|
applies_to_price_ids:,
|
1060
|
+
# The price interval ids that this discount interval applies to.
|
935
1061
|
applies_to_price_interval_ids:,
|
1062
|
+
# The end date of the discount interval.
|
936
1063
|
end_date:,
|
1064
|
+
# The start date of the discount interval.
|
937
1065
|
start_date:,
|
938
1066
|
discount_type: :amount
|
939
1067
|
); end
|
@@ -953,7 +1081,7 @@ module Orb
|
|
953
1081
|
def to_hash; end
|
954
1082
|
end
|
955
1083
|
|
956
|
-
class
|
1084
|
+
class Percentage < Orb::Internal::Type::BaseModel
|
957
1085
|
# The price ids that this discount interval applies to.
|
958
1086
|
sig { returns(T::Array[String]) }
|
959
1087
|
attr_accessor :applies_to_price_ids
|
@@ -990,10 +1118,16 @@ module Orb
|
|
990
1118
|
.returns(T.attached_class)
|
991
1119
|
end
|
992
1120
|
def self.new(
|
1121
|
+
# The price ids that this discount interval applies to.
|
993
1122
|
applies_to_price_ids:,
|
1123
|
+
# The price interval ids that this discount interval applies to.
|
994
1124
|
applies_to_price_interval_ids:,
|
1125
|
+
# The end date of the discount interval.
|
995
1126
|
end_date:,
|
1127
|
+
# Only available if discount_type is `percentage`.This is a number between 0
|
1128
|
+
# and 1.
|
996
1129
|
percentage_discount:,
|
1130
|
+
# The start date of the discount interval.
|
997
1131
|
start_date:,
|
998
1132
|
discount_type: :percentage
|
999
1133
|
); end
|
@@ -1013,7 +1147,7 @@ module Orb
|
|
1013
1147
|
def to_hash; end
|
1014
1148
|
end
|
1015
1149
|
|
1016
|
-
class
|
1150
|
+
class Usage < Orb::Internal::Type::BaseModel
|
1017
1151
|
# The price ids that this discount interval applies to.
|
1018
1152
|
sig { returns(T::Array[String]) }
|
1019
1153
|
attr_accessor :applies_to_price_ids
|
@@ -1050,10 +1184,16 @@ module Orb
|
|
1050
1184
|
.returns(T.attached_class)
|
1051
1185
|
end
|
1052
1186
|
def self.new(
|
1187
|
+
# The price ids that this discount interval applies to.
|
1053
1188
|
applies_to_price_ids:,
|
1189
|
+
# The price interval ids that this discount interval applies to.
|
1054
1190
|
applies_to_price_interval_ids:,
|
1191
|
+
# The end date of the discount interval.
|
1055
1192
|
end_date:,
|
1193
|
+
# The start date of the discount interval.
|
1056
1194
|
start_date:,
|
1195
|
+
# Only available if discount_type is `usage`. Number of usage units that this
|
1196
|
+
# discount is for
|
1057
1197
|
usage_discount:,
|
1058
1198
|
discount_type: :usage
|
1059
1199
|
); end
|
@@ -1076,7 +1216,7 @@ module Orb
|
|
1076
1216
|
sig do
|
1077
1217
|
override
|
1078
1218
|
.returns(
|
1079
|
-
[Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::
|
1219
|
+
[Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Amount, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Percentage, Orb::Models::SubscriptionChangeCancelResponse::Subscription::DiscountInterval::Usage]
|
1080
1220
|
)
|
1081
1221
|
end
|
1082
1222
|
def self.variants; end
|
@@ -1140,14 +1280,18 @@ module Orb
|
|
1140
1280
|
.returns(T.attached_class)
|
1141
1281
|
end
|
1142
1282
|
def self.new(
|
1283
|
+
# The price ids that this maximum interval applies to.
|
1143
1284
|
applies_to_price_ids:,
|
1285
|
+
# The price interval ids that this maximum interval applies to.
|
1144
1286
|
applies_to_price_interval_ids:,
|
1287
|
+
# The end date of the maximum interval.
|
1145
1288
|
end_date:,
|
1289
|
+
# The maximum amount to charge in a given billing period for the price intervals
|
1290
|
+
# this transform applies to.
|
1146
1291
|
maximum_amount:,
|
1292
|
+
# The start date of the maximum interval.
|
1147
1293
|
start_date:
|
1148
|
-
)
|
1149
|
-
end
|
1150
|
-
|
1294
|
+
); end
|
1151
1295
|
sig do
|
1152
1296
|
override
|
1153
1297
|
.returns(
|
@@ -1196,14 +1340,18 @@ module Orb
|
|
1196
1340
|
.returns(T.attached_class)
|
1197
1341
|
end
|
1198
1342
|
def self.new(
|
1343
|
+
# The price ids that this minimum interval applies to.
|
1199
1344
|
applies_to_price_ids:,
|
1345
|
+
# The price interval ids that this minimum interval applies to.
|
1200
1346
|
applies_to_price_interval_ids:,
|
1347
|
+
# The end date of the minimum interval.
|
1201
1348
|
end_date:,
|
1349
|
+
# The minimum amount to charge in a given billing period for the price intervals
|
1350
|
+
# this minimum applies to.
|
1202
1351
|
minimum_amount:,
|
1352
|
+
# The start date of the minimum interval.
|
1203
1353
|
start_date:
|
1204
|
-
)
|
1205
|
-
end
|
1206
|
-
|
1354
|
+
); end
|
1207
1355
|
sig do
|
1208
1356
|
override
|
1209
1357
|
.returns(
|
@@ -1284,34 +1432,34 @@ module Orb
|
|
1284
1432
|
sig do
|
1285
1433
|
returns(
|
1286
1434
|
T.any(
|
1287
|
-
Orb::Models::Price::
|
1288
|
-
Orb::Models::Price::
|
1289
|
-
Orb::Models::Price::
|
1290
|
-
Orb::Models::Price::
|
1291
|
-
Orb::Models::Price::
|
1292
|
-
Orb::Models::Price::
|
1293
|
-
Orb::Models::Price::
|
1294
|
-
Orb::Models::Price::
|
1295
|
-
Orb::Models::Price::
|
1296
|
-
Orb::Models::Price::
|
1297
|
-
Orb::Models::Price::
|
1298
|
-
Orb::Models::Price::
|
1299
|
-
Orb::Models::Price::
|
1300
|
-
Orb::Models::Price::
|
1301
|
-
Orb::Models::Price::
|
1302
|
-
Orb::Models::Price::
|
1303
|
-
Orb::Models::Price::
|
1304
|
-
Orb::Models::Price::
|
1305
|
-
Orb::Models::Price::
|
1306
|
-
Orb::Models::Price::
|
1307
|
-
Orb::Models::Price::
|
1308
|
-
Orb::Models::Price::
|
1309
|
-
Orb::Models::Price::
|
1310
|
-
Orb::Models::Price::
|
1311
|
-
Orb::Models::Price::
|
1312
|
-
Orb::Models::Price::
|
1313
|
-
Orb::Models::Price::
|
1314
|
-
Orb::Models::Price::
|
1435
|
+
Orb::Models::Price::Unit,
|
1436
|
+
Orb::Models::Price::Package,
|
1437
|
+
Orb::Models::Price::Matrix,
|
1438
|
+
Orb::Models::Price::Tiered,
|
1439
|
+
Orb::Models::Price::TieredBps,
|
1440
|
+
Orb::Models::Price::Bps,
|
1441
|
+
Orb::Models::Price::BulkBps,
|
1442
|
+
Orb::Models::Price::Bulk,
|
1443
|
+
Orb::Models::Price::ThresholdTotalAmount,
|
1444
|
+
Orb::Models::Price::TieredPackage,
|
1445
|
+
Orb::Models::Price::GroupedTiered,
|
1446
|
+
Orb::Models::Price::TieredWithMinimum,
|
1447
|
+
Orb::Models::Price::TieredPackageWithMinimum,
|
1448
|
+
Orb::Models::Price::PackageWithAllocation,
|
1449
|
+
Orb::Models::Price::UnitWithPercent,
|
1450
|
+
Orb::Models::Price::MatrixWithAllocation,
|
1451
|
+
Orb::Models::Price::TieredWithProration,
|
1452
|
+
Orb::Models::Price::UnitWithProration,
|
1453
|
+
Orb::Models::Price::GroupedAllocation,
|
1454
|
+
Orb::Models::Price::GroupedWithProratedMinimum,
|
1455
|
+
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1456
|
+
Orb::Models::Price::MatrixWithDisplayName,
|
1457
|
+
Orb::Models::Price::BulkWithProration,
|
1458
|
+
Orb::Models::Price::GroupedTieredPackage,
|
1459
|
+
Orb::Models::Price::MaxGroupTieredPackage,
|
1460
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1461
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1462
|
+
Orb::Models::Price::CumulativeGroupedBulk
|
1315
1463
|
)
|
1316
1464
|
)
|
1317
1465
|
end
|
@@ -1347,35 +1495,35 @@ module Orb
|
|
1347
1495
|
]
|
1348
1496
|
),
|
1349
1497
|
price: T.any(
|
1350
|
-
Orb::Models::Price::
|
1498
|
+
Orb::Models::Price::Unit,
|
1351
1499
|
Orb::Internal::AnyHash,
|
1352
|
-
Orb::Models::Price::
|
1353
|
-
Orb::Models::Price::
|
1354
|
-
Orb::Models::Price::
|
1355
|
-
Orb::Models::Price::
|
1356
|
-
Orb::Models::Price::
|
1357
|
-
Orb::Models::Price::
|
1358
|
-
Orb::Models::Price::
|
1359
|
-
Orb::Models::Price::
|
1360
|
-
Orb::Models::Price::
|
1361
|
-
Orb::Models::Price::
|
1362
|
-
Orb::Models::Price::
|
1363
|
-
Orb::Models::Price::
|
1364
|
-
Orb::Models::Price::
|
1365
|
-
Orb::Models::Price::
|
1366
|
-
Orb::Models::Price::
|
1367
|
-
Orb::Models::Price::
|
1368
|
-
Orb::Models::Price::
|
1369
|
-
Orb::Models::Price::
|
1370
|
-
Orb::Models::Price::
|
1371
|
-
Orb::Models::Price::
|
1372
|
-
Orb::Models::Price::
|
1373
|
-
Orb::Models::Price::
|
1374
|
-
Orb::Models::Price::
|
1375
|
-
Orb::Models::Price::
|
1376
|
-
Orb::Models::Price::
|
1377
|
-
Orb::Models::Price::
|
1378
|
-
Orb::Models::Price::
|
1500
|
+
Orb::Models::Price::Package,
|
1501
|
+
Orb::Models::Price::Matrix,
|
1502
|
+
Orb::Models::Price::Tiered,
|
1503
|
+
Orb::Models::Price::TieredBps,
|
1504
|
+
Orb::Models::Price::Bps,
|
1505
|
+
Orb::Models::Price::BulkBps,
|
1506
|
+
Orb::Models::Price::Bulk,
|
1507
|
+
Orb::Models::Price::ThresholdTotalAmount,
|
1508
|
+
Orb::Models::Price::TieredPackage,
|
1509
|
+
Orb::Models::Price::GroupedTiered,
|
1510
|
+
Orb::Models::Price::TieredWithMinimum,
|
1511
|
+
Orb::Models::Price::TieredPackageWithMinimum,
|
1512
|
+
Orb::Models::Price::PackageWithAllocation,
|
1513
|
+
Orb::Models::Price::UnitWithPercent,
|
1514
|
+
Orb::Models::Price::MatrixWithAllocation,
|
1515
|
+
Orb::Models::Price::TieredWithProration,
|
1516
|
+
Orb::Models::Price::UnitWithProration,
|
1517
|
+
Orb::Models::Price::GroupedAllocation,
|
1518
|
+
Orb::Models::Price::GroupedWithProratedMinimum,
|
1519
|
+
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1520
|
+
Orb::Models::Price::MatrixWithDisplayName,
|
1521
|
+
Orb::Models::Price::BulkWithProration,
|
1522
|
+
Orb::Models::Price::GroupedTieredPackage,
|
1523
|
+
Orb::Models::Price::MaxGroupTieredPackage,
|
1524
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1525
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1526
|
+
Orb::Models::Price::CumulativeGroupedBulk
|
1379
1527
|
),
|
1380
1528
|
start_date: Time,
|
1381
1529
|
usage_customer_ids: T.nilable(T::Array[String])
|
@@ -1384,14 +1532,40 @@ module Orb
|
|
1384
1532
|
end
|
1385
1533
|
def self.new(
|
1386
1534
|
id:,
|
1535
|
+
# The day of the month that Orb bills for this price
|
1387
1536
|
billing_cycle_day:,
|
1537
|
+
# The end of the current billing period. This is an exclusive timestamp, such that
|
1538
|
+
# the instant returned is exactly the end of the billing period. Set to null if
|
1539
|
+
# this price interval is not currently active.
|
1388
1540
|
current_billing_period_end_date:,
|
1541
|
+
# The start date of the current billing period. This is an inclusive timestamp;
|
1542
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
1543
|
+
# if this price interval is not currently active.
|
1389
1544
|
current_billing_period_start_date:,
|
1545
|
+
# The end date of the price interval. This is the date that Orb stops billing for
|
1546
|
+
# this price.
|
1390
1547
|
end_date:,
|
1548
|
+
# An additional filter to apply to usage queries.
|
1391
1549
|
filter:,
|
1550
|
+
# The fixed fee quantity transitions for this price interval. This is only
|
1551
|
+
# relevant for fixed fees.
|
1392
1552
|
fixed_fee_quantity_transitions:,
|
1553
|
+
# The Price resource represents a price that can be billed on a subscription,
|
1554
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1555
|
+
# take a quantity and determine an amount to bill.
|
1556
|
+
#
|
1557
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1558
|
+
# is serialized differently in a given Price object. The model_type field
|
1559
|
+
# determines the key for the configuration object that is present.
|
1560
|
+
#
|
1561
|
+
# For more on the types of prices, see
|
1562
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1393
1563
|
price:,
|
1564
|
+
# The start date of the price interval. This is the date that Orb starts billing
|
1565
|
+
# for this price.
|
1394
1566
|
start_date:,
|
1567
|
+
# A list of customer IDs whose usage events will be aggregated and billed under
|
1568
|
+
# this price interval.
|
1395
1569
|
usage_customer_ids:
|
1396
1570
|
); end
|
1397
1571
|
sig do
|
@@ -1408,34 +1582,34 @@ module Orb
|
|
1408
1582
|
T::Array[Orb::Models::SubscriptionChangeCancelResponse::Subscription::PriceInterval::FixedFeeQuantityTransition]
|
1409
1583
|
),
|
1410
1584
|
price: T.any(
|
1411
|
-
Orb::Models::Price::
|
1412
|
-
Orb::Models::Price::
|
1413
|
-
Orb::Models::Price::
|
1414
|
-
Orb::Models::Price::
|
1415
|
-
Orb::Models::Price::
|
1416
|
-
Orb::Models::Price::
|
1417
|
-
Orb::Models::Price::
|
1418
|
-
Orb::Models::Price::
|
1419
|
-
Orb::Models::Price::
|
1420
|
-
Orb::Models::Price::
|
1421
|
-
Orb::Models::Price::
|
1422
|
-
Orb::Models::Price::
|
1423
|
-
Orb::Models::Price::
|
1424
|
-
Orb::Models::Price::
|
1425
|
-
Orb::Models::Price::
|
1426
|
-
Orb::Models::Price::
|
1427
|
-
Orb::Models::Price::
|
1428
|
-
Orb::Models::Price::
|
1429
|
-
Orb::Models::Price::
|
1430
|
-
Orb::Models::Price::
|
1431
|
-
Orb::Models::Price::
|
1432
|
-
Orb::Models::Price::
|
1433
|
-
Orb::Models::Price::
|
1434
|
-
Orb::Models::Price::
|
1435
|
-
Orb::Models::Price::
|
1436
|
-
Orb::Models::Price::
|
1437
|
-
Orb::Models::Price::
|
1438
|
-
Orb::Models::Price::
|
1585
|
+
Orb::Models::Price::Unit,
|
1586
|
+
Orb::Models::Price::Package,
|
1587
|
+
Orb::Models::Price::Matrix,
|
1588
|
+
Orb::Models::Price::Tiered,
|
1589
|
+
Orb::Models::Price::TieredBps,
|
1590
|
+
Orb::Models::Price::Bps,
|
1591
|
+
Orb::Models::Price::BulkBps,
|
1592
|
+
Orb::Models::Price::Bulk,
|
1593
|
+
Orb::Models::Price::ThresholdTotalAmount,
|
1594
|
+
Orb::Models::Price::TieredPackage,
|
1595
|
+
Orb::Models::Price::GroupedTiered,
|
1596
|
+
Orb::Models::Price::TieredWithMinimum,
|
1597
|
+
Orb::Models::Price::TieredPackageWithMinimum,
|
1598
|
+
Orb::Models::Price::PackageWithAllocation,
|
1599
|
+
Orb::Models::Price::UnitWithPercent,
|
1600
|
+
Orb::Models::Price::MatrixWithAllocation,
|
1601
|
+
Orb::Models::Price::TieredWithProration,
|
1602
|
+
Orb::Models::Price::UnitWithProration,
|
1603
|
+
Orb::Models::Price::GroupedAllocation,
|
1604
|
+
Orb::Models::Price::GroupedWithProratedMinimum,
|
1605
|
+
Orb::Models::Price::GroupedWithMeteredMinimum,
|
1606
|
+
Orb::Models::Price::MatrixWithDisplayName,
|
1607
|
+
Orb::Models::Price::BulkWithProration,
|
1608
|
+
Orb::Models::Price::GroupedTieredPackage,
|
1609
|
+
Orb::Models::Price::MaxGroupTieredPackage,
|
1610
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricing,
|
1611
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricing,
|
1612
|
+
Orb::Models::Price::CumulativeGroupedBulk
|
1439
1613
|
),
|
1440
1614
|
start_date: Time,
|
1441
1615
|
usage_customer_ids: T.nilable(T::Array[String])
|
@@ -1488,8 +1662,7 @@ module Orb
|
|
1488
1662
|
|
1489
1663
|
TaggedSymbol =
|
1490
1664
|
T.type_alias { T.all(Symbol, Orb::Models::SubscriptionChangeCancelResponse::Subscription::Status) }
|
1491
|
-
OrSymbol =
|
1492
|
-
T.type_alias { T.any(Symbol, String, Orb::Models::SubscriptionChangeCancelResponse::Subscription::Status::TaggedSymbol) }
|
1665
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
1493
1666
|
|
1494
1667
|
ACTIVE =
|
1495
1668
|
T.let(:active, Orb::Models::SubscriptionChangeCancelResponse::Subscription::Status::TaggedSymbol)
|
@@ -1544,8 +1717,16 @@ module Orb
|
|
1544
1717
|
)
|
1545
1718
|
.returns(T.attached_class)
|
1546
1719
|
end
|
1547
|
-
def self.new(
|
1548
|
-
|
1720
|
+
def self.new(
|
1721
|
+
# The credit notes that were created as part of this operation.
|
1722
|
+
created_credit_notes:,
|
1723
|
+
# The invoices that were created as part of this operation.
|
1724
|
+
created_invoices:,
|
1725
|
+
# The credit notes that were voided as part of this operation.
|
1726
|
+
voided_credit_notes:,
|
1727
|
+
# The invoices that were voided as part of this operation.
|
1728
|
+
voided_invoices:
|
1729
|
+
); end
|
1549
1730
|
sig do
|
1550
1731
|
override
|
1551
1732
|
.returns(
|