orb-billing 0.1.0.pre.alpha.38 → 0.1.0.pre.alpha.39
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 +1 -1
- data/lib/orb/client.rb +4 -0
- data/lib/orb/internal/transport/base_client.rb +1 -1
- data/lib/orb/internal/transport/pooled_net_requester.rb +1 -1
- data/lib/orb/internal/type/base_model.rb +14 -17
- data/lib/orb/internal/type/converter.rb +20 -22
- data/lib/orb/internal/type/enum.rb +8 -8
- data/lib/orb/internal/util.rb +1 -5
- 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 +7 -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 +7 -13
- data/rbi/lib/orb/internal/type/array_of.rbi +8 -16
- data/rbi/lib/orb/internal/type/base_model.rbi +45 -64
- data/rbi/lib/orb/internal/type/base_page.rbi +5 -10
- data/rbi/lib/orb/internal/type/boolean.rbi +4 -8
- data/rbi/lib/orb/internal/type/converter.rbi +25 -31
- data/rbi/lib/orb/internal/type/enum.rbi +14 -20
- data/rbi/lib/orb/internal/type/hash_of.rbi +8 -16
- data/rbi/lib/orb/internal/type/request_parameters.rbi +1 -2
- data/rbi/lib/orb/internal/type/union.rbi +10 -20
- data/rbi/lib/orb/internal/type/unknown.rbi +4 -8
- data/rbi/lib/orb/internal/util.rbi +34 -68
- 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/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 +23 -2
@@ -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::SubscriptionCreateResponse::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
|
|
@@ -34,9 +34,9 @@ module Orb
|
|
34
34
|
attr_writer :billing_cycle_anchor_configuration
|
35
35
|
|
36
36
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
37
|
+
# number of days in a month is greater than this value, the last day of the month
|
38
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
39
|
+
# period begins on the 30th.
|
40
40
|
sig { returns(Integer) }
|
41
41
|
attr_accessor :billing_cycle_day
|
42
42
|
|
@@ -44,35 +44,35 @@ module Orb
|
|
44
44
|
attr_accessor :created_at
|
45
45
|
|
46
46
|
# The end of the current billing period. This is an exclusive timestamp, such that
|
47
|
-
#
|
48
|
-
#
|
47
|
+
# the instant returned is not part of the billing period. Set to null for
|
48
|
+
# subscriptions that are not currently active.
|
49
49
|
sig { returns(T.nilable(Time)) }
|
50
50
|
attr_accessor :current_billing_period_end_date
|
51
51
|
|
52
52
|
# The start date of the current billing period. This is an inclusive timestamp;
|
53
|
-
#
|
54
|
-
#
|
53
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
54
|
+
# if the subscription is not currently active.
|
55
55
|
sig { returns(T.nilable(Time)) }
|
56
56
|
attr_accessor :current_billing_period_start_date
|
57
57
|
|
58
58
|
# A customer is a buyer of your products, and the other party to the billing
|
59
|
-
#
|
59
|
+
# relationship.
|
60
60
|
#
|
61
|
-
#
|
62
|
-
#
|
63
|
-
#
|
64
|
-
#
|
65
|
-
#
|
66
|
-
#
|
61
|
+
# In Orb, customers are assigned system generated identifiers automatically, but
|
62
|
+
# it's often desirable to have these match existing identifiers in your system. To
|
63
|
+
# avoid having to denormalize Orb ID information, you can pass in an
|
64
|
+
# `external_customer_id` with your own identifier. See
|
65
|
+
# [Customer ID Aliases](/events-and-metrics/customer-aliases) for further
|
66
|
+
# information about how these aliases work in Orb.
|
67
67
|
#
|
68
|
-
#
|
69
|
-
#
|
70
|
-
#
|
68
|
+
# In addition to having an identifier in your system, a customer may exist in a
|
69
|
+
# payment provider solution like Stripe. Use the `payment_provider_id` and the
|
70
|
+
# `payment_provider` enum field to express this mapping.
|
71
71
|
#
|
72
|
-
#
|
73
|
-
#
|
74
|
-
#
|
75
|
-
#
|
72
|
+
# A customer also has a timezone (from the standard
|
73
|
+
# [IANA timezone database](https://www.iana.org/time-zones)), which defaults to
|
74
|
+
# your account's timezone. See [Timezone localization](/essentials/timezones) for
|
75
|
+
# information on what this timezone parameter influences within Orb.
|
76
76
|
sig { returns(Orb::Models::Customer) }
|
77
77
|
attr_reader :customer
|
78
78
|
|
@@ -80,7 +80,7 @@ module Orb
|
|
80
80
|
attr_writer :customer
|
81
81
|
|
82
82
|
# Determines the default memo on this subscriptions' invoices. Note that if this
|
83
|
-
#
|
83
|
+
# is not provided, it is determined by the plan configuration.
|
84
84
|
sig { returns(T.nilable(String)) }
|
85
85
|
attr_accessor :default_invoice_memo
|
86
86
|
|
@@ -88,11 +88,11 @@ module Orb
|
|
88
88
|
sig do
|
89
89
|
returns(
|
90
90
|
T::Array[
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
91
|
+
T.any(
|
92
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval,
|
93
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval,
|
94
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval
|
95
|
+
)
|
96
96
|
]
|
97
97
|
)
|
98
98
|
end
|
@@ -113,9 +113,9 @@ module Orb
|
|
113
113
|
attr_accessor :maximum_intervals
|
114
114
|
|
115
115
|
# User specified key-value pairs for the resource. If not present, this defaults
|
116
|
-
#
|
117
|
-
#
|
118
|
-
#
|
116
|
+
# to an empty dictionary. Individual keys can be removed by setting the value to
|
117
|
+
# `null`, and the entire metadata mapping can be cleared by setting `metadata` to
|
118
|
+
# `null`.
|
119
119
|
sig { returns(T::Hash[Symbol, String]) }
|
120
120
|
attr_accessor :metadata
|
121
121
|
|
@@ -124,16 +124,30 @@ module Orb
|
|
124
124
|
attr_accessor :minimum_intervals
|
125
125
|
|
126
126
|
# Determines the difference between the invoice issue date for subscription
|
127
|
-
#
|
128
|
-
#
|
129
|
-
#
|
127
|
+
# invoices as the date that they are due. A value of `0` here represents that the
|
128
|
+
# invoice is due on issue, whereas a value of `30` represents that the customer
|
129
|
+
# has a month to pay the invoice.
|
130
130
|
sig { returns(Integer) }
|
131
131
|
attr_accessor :net_terms
|
132
132
|
|
133
|
+
# A pending subscription change if one exists on this subscription.
|
134
|
+
sig { returns(T.nilable(Orb::Models::SubscriptionCreateResponse::PendingSubscriptionChange)) }
|
135
|
+
attr_reader :pending_subscription_change
|
136
|
+
|
137
|
+
sig do
|
138
|
+
params(
|
139
|
+
pending_subscription_change: T.nilable(
|
140
|
+
T.any(Orb::Models::SubscriptionCreateResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
|
141
|
+
)
|
142
|
+
)
|
143
|
+
.void
|
144
|
+
end
|
145
|
+
attr_writer :pending_subscription_change
|
146
|
+
|
133
147
|
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
134
|
-
#
|
135
|
-
#
|
136
|
-
#
|
148
|
+
# subscribed to by a customer. Plans define the billing behavior of the
|
149
|
+
# subscription. You can see more about how to configure prices in the
|
150
|
+
# [Price resource](/reference/price).
|
137
151
|
sig { returns(Orb::Models::Plan) }
|
138
152
|
attr_reader :plan
|
139
153
|
|
@@ -168,6 +182,20 @@ module Orb
|
|
168
182
|
sig { params(trial_info: T.any(Orb::Models::SubscriptionCreateResponse::TrialInfo, Orb::Internal::AnyHash)).void }
|
169
183
|
attr_writer :trial_info
|
170
184
|
|
185
|
+
# The resources that were changed as part of this operation. Only present when
|
186
|
+
# fetched through the subscription changes API or if the
|
187
|
+
# `include_changed_resources` parameter was passed in the request.
|
188
|
+
sig { returns(T.nilable(Orb::Models::SubscriptionCreateResponse::ChangedResources)) }
|
189
|
+
attr_reader :changed_resources
|
190
|
+
|
191
|
+
sig do
|
192
|
+
params(
|
193
|
+
changed_resources: T.nilable(T.any(Orb::Models::SubscriptionCreateResponse::ChangedResources, Orb::Internal::AnyHash))
|
194
|
+
)
|
195
|
+
.void
|
196
|
+
end
|
197
|
+
attr_writer :changed_resources
|
198
|
+
|
171
199
|
sig do
|
172
200
|
params(
|
173
201
|
id: String,
|
@@ -182,12 +210,12 @@ module Orb
|
|
182
210
|
customer: T.any(Orb::Models::Customer, Orb::Internal::AnyHash),
|
183
211
|
default_invoice_memo: T.nilable(String),
|
184
212
|
discount_intervals: T::Array[
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
213
|
+
T.any(
|
214
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval,
|
215
|
+
Orb::Internal::AnyHash,
|
216
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval,
|
217
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval
|
218
|
+
)
|
191
219
|
],
|
192
220
|
end_date: T.nilable(Time),
|
193
221
|
fixed_fee_quantity_schedule: T::Array[T.any(Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule, Orb::Internal::AnyHash)],
|
@@ -196,12 +224,16 @@ module Orb
|
|
196
224
|
metadata: T::Hash[Symbol, String],
|
197
225
|
minimum_intervals: T::Array[T.any(Orb::Models::SubscriptionCreateResponse::MinimumInterval, Orb::Internal::AnyHash)],
|
198
226
|
net_terms: Integer,
|
227
|
+
pending_subscription_change: T.nilable(
|
228
|
+
T.any(Orb::Models::SubscriptionCreateResponse::PendingSubscriptionChange, Orb::Internal::AnyHash)
|
229
|
+
),
|
199
230
|
plan: T.any(Orb::Models::Plan, Orb::Internal::AnyHash),
|
200
231
|
price_intervals: T::Array[T.any(Orb::Models::SubscriptionCreateResponse::PriceInterval, Orb::Internal::AnyHash)],
|
201
232
|
redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon, Orb::Internal::AnyHash)),
|
202
233
|
start_date: Time,
|
203
234
|
status: Orb::Models::SubscriptionCreateResponse::Status::OrSymbol,
|
204
|
-
trial_info: T.any(Orb::Models::SubscriptionCreateResponse::TrialInfo, Orb::Internal::AnyHash)
|
235
|
+
trial_info: T.any(Orb::Models::SubscriptionCreateResponse::TrialInfo, Orb::Internal::AnyHash),
|
236
|
+
changed_resources: T.nilable(T.any(Orb::Models::SubscriptionCreateResponse::ChangedResources, Orb::Internal::AnyHash))
|
205
237
|
)
|
206
238
|
.returns(T.attached_class)
|
207
239
|
end
|
@@ -225,15 +257,15 @@ module Orb
|
|
225
257
|
metadata:,
|
226
258
|
minimum_intervals:,
|
227
259
|
net_terms:,
|
260
|
+
pending_subscription_change:,
|
228
261
|
plan:,
|
229
262
|
price_intervals:,
|
230
263
|
redeemed_coupon:,
|
231
264
|
start_date:,
|
232
265
|
status:,
|
233
|
-
trial_info
|
234
|
-
|
235
|
-
end
|
236
|
-
|
266
|
+
trial_info:,
|
267
|
+
changed_resources: nil
|
268
|
+
); end
|
237
269
|
sig do
|
238
270
|
override
|
239
271
|
.returns(
|
@@ -250,11 +282,11 @@ module Orb
|
|
250
282
|
customer: Orb::Models::Customer,
|
251
283
|
default_invoice_memo: T.nilable(String),
|
252
284
|
discount_intervals: T::Array[
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
285
|
+
T.any(
|
286
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval,
|
287
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval,
|
288
|
+
Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval
|
289
|
+
)
|
258
290
|
],
|
259
291
|
end_date: T.nilable(Time),
|
260
292
|
fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionCreateResponse::FixedFeeQuantitySchedule],
|
@@ -263,17 +295,18 @@ module Orb
|
|
263
295
|
metadata: T::Hash[Symbol, String],
|
264
296
|
minimum_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::MinimumInterval],
|
265
297
|
net_terms: Integer,
|
298
|
+
pending_subscription_change: T.nilable(Orb::Models::SubscriptionCreateResponse::PendingSubscriptionChange),
|
266
299
|
plan: Orb::Models::Plan,
|
267
300
|
price_intervals: T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval],
|
268
301
|
redeemed_coupon: T.nilable(Orb::Models::SubscriptionCreateResponse::RedeemedCoupon),
|
269
302
|
start_date: Time,
|
270
303
|
status: Orb::Models::SubscriptionCreateResponse::Status::TaggedSymbol,
|
271
|
-
trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo
|
304
|
+
trial_info: Orb::Models::SubscriptionCreateResponse::TrialInfo,
|
305
|
+
changed_resources: T.nilable(Orb::Models::SubscriptionCreateResponse::ChangedResources)
|
272
306
|
}
|
273
307
|
)
|
274
308
|
end
|
275
|
-
def to_hash
|
276
|
-
end
|
309
|
+
def to_hash; end
|
277
310
|
|
278
311
|
class AdjustmentInterval < Orb::Internal::Type::BaseModel
|
279
312
|
sig { returns(String) }
|
@@ -321,8 +354,7 @@ module Orb
|
|
321
354
|
)
|
322
355
|
.returns(T.attached_class)
|
323
356
|
end
|
324
|
-
def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
|
325
|
-
end
|
357
|
+
def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:); end
|
326
358
|
|
327
359
|
sig do
|
328
360
|
override
|
@@ -342,8 +374,7 @@ module Orb
|
|
342
374
|
}
|
343
375
|
)
|
344
376
|
end
|
345
|
-
def to_hash
|
346
|
-
end
|
377
|
+
def to_hash; end
|
347
378
|
|
348
379
|
module Adjustment
|
349
380
|
extend Orb::Internal::Type::Union
|
@@ -360,7 +391,7 @@ module Orb
|
|
360
391
|
attr_accessor :applies_to_price_ids
|
361
392
|
|
362
393
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
363
|
-
#
|
394
|
+
# that apply to only one price.
|
364
395
|
sig { returns(T::Boolean) }
|
365
396
|
attr_accessor :is_invoice_level
|
366
397
|
|
@@ -373,7 +404,7 @@ module Orb
|
|
373
404
|
attr_accessor :reason
|
374
405
|
|
375
406
|
# The number of usage units by which to discount the price this adjustment applies
|
376
|
-
#
|
407
|
+
# to in a given billing period.
|
377
408
|
sig { returns(Float) }
|
378
409
|
attr_accessor :usage_discount
|
379
410
|
|
@@ -397,9 +428,7 @@ module Orb
|
|
397
428
|
reason:,
|
398
429
|
usage_discount:,
|
399
430
|
adjustment_type: :usage_discount
|
400
|
-
)
|
401
|
-
end
|
402
|
-
|
431
|
+
); end
|
403
432
|
sig do
|
404
433
|
override
|
405
434
|
.returns(
|
@@ -414,8 +443,7 @@ module Orb
|
|
414
443
|
}
|
415
444
|
)
|
416
445
|
end
|
417
|
-
def to_hash
|
418
|
-
end
|
446
|
+
def to_hash; end
|
419
447
|
end
|
420
448
|
|
421
449
|
class PlanPhaseAmountDiscountAdjustment < Orb::Internal::Type::BaseModel
|
@@ -426,7 +454,7 @@ module Orb
|
|
426
454
|
attr_accessor :adjustment_type
|
427
455
|
|
428
456
|
# The amount by which to discount the prices this adjustment applies to in a given
|
429
|
-
#
|
457
|
+
# billing period.
|
430
458
|
sig { returns(String) }
|
431
459
|
attr_accessor :amount_discount
|
432
460
|
|
@@ -435,7 +463,7 @@ module Orb
|
|
435
463
|
attr_accessor :applies_to_price_ids
|
436
464
|
|
437
465
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
438
|
-
#
|
466
|
+
# that apply to only one price.
|
439
467
|
sig { returns(T::Boolean) }
|
440
468
|
attr_accessor :is_invoice_level
|
441
469
|
|
@@ -467,9 +495,7 @@ module Orb
|
|
467
495
|
plan_phase_order:,
|
468
496
|
reason:,
|
469
497
|
adjustment_type: :amount_discount
|
470
|
-
)
|
471
|
-
end
|
472
|
-
|
498
|
+
); end
|
473
499
|
sig do
|
474
500
|
override
|
475
501
|
.returns(
|
@@ -484,8 +510,7 @@ module Orb
|
|
484
510
|
}
|
485
511
|
)
|
486
512
|
end
|
487
|
-
def to_hash
|
488
|
-
end
|
513
|
+
def to_hash; end
|
489
514
|
end
|
490
515
|
|
491
516
|
class PlanPhasePercentageDiscountAdjustment < Orb::Internal::Type::BaseModel
|
@@ -500,12 +525,12 @@ module Orb
|
|
500
525
|
attr_accessor :applies_to_price_ids
|
501
526
|
|
502
527
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
503
|
-
#
|
528
|
+
# that apply to only one price.
|
504
529
|
sig { returns(T::Boolean) }
|
505
530
|
attr_accessor :is_invoice_level
|
506
531
|
|
507
532
|
# The percentage (as a value between 0 and 1) by which to discount the price
|
508
|
-
#
|
533
|
+
# intervals this adjustment applies to in a given billing period.
|
509
534
|
sig { returns(Float) }
|
510
535
|
attr_accessor :percentage_discount
|
511
536
|
|
@@ -537,9 +562,7 @@ module Orb
|
|
537
562
|
plan_phase_order:,
|
538
563
|
reason:,
|
539
564
|
adjustment_type: :percentage_discount
|
540
|
-
)
|
541
|
-
end
|
542
|
-
|
565
|
+
); end
|
543
566
|
sig do
|
544
567
|
override
|
545
568
|
.returns(
|
@@ -554,8 +577,7 @@ module Orb
|
|
554
577
|
}
|
555
578
|
)
|
556
579
|
end
|
557
|
-
def to_hash
|
558
|
-
end
|
580
|
+
def to_hash; end
|
559
581
|
end
|
560
582
|
|
561
583
|
class PlanPhaseMinimumAdjustment < Orb::Internal::Type::BaseModel
|
@@ -570,7 +592,7 @@ module Orb
|
|
570
592
|
attr_accessor :applies_to_price_ids
|
571
593
|
|
572
594
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
573
|
-
#
|
595
|
+
# that apply to only one price.
|
574
596
|
sig { returns(T::Boolean) }
|
575
597
|
attr_accessor :is_invoice_level
|
576
598
|
|
@@ -579,7 +601,7 @@ module Orb
|
|
579
601
|
attr_accessor :item_id
|
580
602
|
|
581
603
|
# The minimum amount to charge in a given billing period for the prices this
|
582
|
-
#
|
604
|
+
# adjustment applies to.
|
583
605
|
sig { returns(String) }
|
584
606
|
attr_accessor :minimum_amount
|
585
607
|
|
@@ -613,9 +635,7 @@ module Orb
|
|
613
635
|
plan_phase_order:,
|
614
636
|
reason:,
|
615
637
|
adjustment_type: :minimum
|
616
|
-
)
|
617
|
-
end
|
618
|
-
|
638
|
+
); end
|
619
639
|
sig do
|
620
640
|
override
|
621
641
|
.returns(
|
@@ -631,8 +651,7 @@ module Orb
|
|
631
651
|
}
|
632
652
|
)
|
633
653
|
end
|
634
|
-
def to_hash
|
635
|
-
end
|
654
|
+
def to_hash; end
|
636
655
|
end
|
637
656
|
|
638
657
|
class PlanPhaseMaximumAdjustment < Orb::Internal::Type::BaseModel
|
@@ -647,12 +666,12 @@ module Orb
|
|
647
666
|
attr_accessor :applies_to_price_ids
|
648
667
|
|
649
668
|
# True for adjustments that apply to an entire invocice, false for adjustments
|
650
|
-
#
|
669
|
+
# that apply to only one price.
|
651
670
|
sig { returns(T::Boolean) }
|
652
671
|
attr_accessor :is_invoice_level
|
653
672
|
|
654
673
|
# The maximum amount to charge in a given billing period for the prices this
|
655
|
-
#
|
674
|
+
# adjustment applies to.
|
656
675
|
sig { returns(String) }
|
657
676
|
attr_accessor :maximum_amount
|
658
677
|
|
@@ -684,9 +703,7 @@ module Orb
|
|
684
703
|
plan_phase_order:,
|
685
704
|
reason:,
|
686
705
|
adjustment_type: :maximum
|
687
|
-
)
|
688
|
-
end
|
689
|
-
|
706
|
+
); end
|
690
707
|
sig do
|
691
708
|
override
|
692
709
|
.returns(
|
@@ -701,8 +718,7 @@ module Orb
|
|
701
718
|
}
|
702
719
|
)
|
703
720
|
end
|
704
|
-
def to_hash
|
705
|
-
end
|
721
|
+
def to_hash; end
|
706
722
|
end
|
707
723
|
|
708
724
|
sig do
|
@@ -711,39 +727,36 @@ module Orb
|
|
711
727
|
[Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionCreateResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]
|
712
728
|
)
|
713
729
|
end
|
714
|
-
def self.variants
|
715
|
-
end
|
730
|
+
def self.variants; end
|
716
731
|
end
|
717
732
|
end
|
718
733
|
|
719
734
|
class BillingCycleAnchorConfiguration < Orb::Internal::Type::BaseModel
|
720
735
|
# The day of the month on which the billing cycle is anchored. If the maximum
|
721
|
-
#
|
722
|
-
#
|
723
|
-
#
|
736
|
+
# number of days in a month is greater than this value, the last day of the month
|
737
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
738
|
+
# period begins on the 30th.
|
724
739
|
sig { returns(Integer) }
|
725
740
|
attr_accessor :day
|
726
741
|
|
727
742
|
# The month on which the billing cycle is anchored (e.g. a quarterly price
|
728
|
-
#
|
729
|
-
#
|
743
|
+
# anchored in February would have cycles starting February, May, August, and
|
744
|
+
# November).
|
730
745
|
sig { returns(T.nilable(Integer)) }
|
731
746
|
attr_accessor :month
|
732
747
|
|
733
748
|
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
734
|
-
#
|
749
|
+
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
735
750
|
sig { returns(T.nilable(Integer)) }
|
736
751
|
attr_accessor :year
|
737
752
|
|
738
753
|
sig do
|
739
754
|
params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
|
740
755
|
end
|
741
|
-
def self.new(day:, month: nil, year: nil)
|
742
|
-
end
|
756
|
+
def self.new(day:, month: nil, year: nil); end
|
743
757
|
|
744
758
|
sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
|
745
|
-
def to_hash
|
746
|
-
end
|
759
|
+
def to_hash; end
|
747
760
|
end
|
748
761
|
|
749
762
|
module DiscountInterval
|
@@ -791,9 +804,7 @@ module Orb
|
|
791
804
|
end_date:,
|
792
805
|
start_date:,
|
793
806
|
discount_type: :amount
|
794
|
-
)
|
795
|
-
end
|
796
|
-
|
807
|
+
); end
|
797
808
|
sig do
|
798
809
|
override
|
799
810
|
.returns(
|
@@ -807,8 +818,7 @@ module Orb
|
|
807
818
|
}
|
808
819
|
)
|
809
820
|
end
|
810
|
-
def to_hash
|
811
|
-
end
|
821
|
+
def to_hash; end
|
812
822
|
end
|
813
823
|
|
814
824
|
class PercentageDiscountInterval < Orb::Internal::Type::BaseModel
|
@@ -828,7 +838,7 @@ module Orb
|
|
828
838
|
attr_accessor :end_date
|
829
839
|
|
830
840
|
# Only available if discount_type is `percentage`.This is a number between 0
|
831
|
-
#
|
841
|
+
# and 1.
|
832
842
|
sig { returns(Float) }
|
833
843
|
attr_accessor :percentage_discount
|
834
844
|
|
@@ -854,9 +864,7 @@ module Orb
|
|
854
864
|
percentage_discount:,
|
855
865
|
start_date:,
|
856
866
|
discount_type: :percentage
|
857
|
-
)
|
858
|
-
end
|
859
|
-
|
867
|
+
); end
|
860
868
|
sig do
|
861
869
|
override
|
862
870
|
.returns(
|
@@ -870,8 +878,7 @@ module Orb
|
|
870
878
|
}
|
871
879
|
)
|
872
880
|
end
|
873
|
-
def to_hash
|
874
|
-
end
|
881
|
+
def to_hash; end
|
875
882
|
end
|
876
883
|
|
877
884
|
class UsageDiscountInterval < Orb::Internal::Type::BaseModel
|
@@ -895,7 +902,7 @@ module Orb
|
|
895
902
|
attr_accessor :start_date
|
896
903
|
|
897
904
|
# Only available if discount_type is `usage`. Number of usage units that this
|
898
|
-
#
|
905
|
+
# discount is for
|
899
906
|
sig { returns(Float) }
|
900
907
|
attr_accessor :usage_discount
|
901
908
|
|
@@ -917,9 +924,7 @@ module Orb
|
|
917
924
|
start_date:,
|
918
925
|
usage_discount:,
|
919
926
|
discount_type: :usage
|
920
|
-
)
|
921
|
-
end
|
922
|
-
|
927
|
+
); end
|
923
928
|
sig do
|
924
929
|
override
|
925
930
|
.returns(
|
@@ -933,8 +938,7 @@ module Orb
|
|
933
938
|
}
|
934
939
|
)
|
935
940
|
end
|
936
|
-
def to_hash
|
937
|
-
end
|
941
|
+
def to_hash; end
|
938
942
|
end
|
939
943
|
|
940
944
|
sig do
|
@@ -943,8 +947,7 @@ module Orb
|
|
943
947
|
[Orb::Models::SubscriptionCreateResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionCreateResponse::DiscountInterval::UsageDiscountInterval]
|
944
948
|
)
|
945
949
|
end
|
946
|
-
def self.variants
|
947
|
-
end
|
950
|
+
def self.variants; end
|
948
951
|
end
|
949
952
|
|
950
953
|
class FixedFeeQuantitySchedule < Orb::Internal::Type::BaseModel
|
@@ -964,14 +967,12 @@ module Orb
|
|
964
967
|
params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
|
965
968
|
.returns(T.attached_class)
|
966
969
|
end
|
967
|
-
def self.new(end_date:, price_id:, quantity:, start_date:)
|
968
|
-
end
|
970
|
+
def self.new(end_date:, price_id:, quantity:, start_date:); end
|
969
971
|
|
970
972
|
sig do
|
971
973
|
override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
|
972
974
|
end
|
973
|
-
def to_hash
|
974
|
-
end
|
975
|
+
def to_hash; end
|
975
976
|
end
|
976
977
|
|
977
978
|
class MaximumInterval < Orb::Internal::Type::BaseModel
|
@@ -988,7 +989,7 @@ module Orb
|
|
988
989
|
attr_accessor :end_date
|
989
990
|
|
990
991
|
# The maximum amount to charge in a given billing period for the price intervals
|
991
|
-
#
|
992
|
+
# this transform applies to.
|
992
993
|
sig { returns(String) }
|
993
994
|
attr_accessor :maximum_amount
|
994
995
|
|
@@ -1027,8 +1028,7 @@ module Orb
|
|
1027
1028
|
}
|
1028
1029
|
)
|
1029
1030
|
end
|
1030
|
-
def to_hash
|
1031
|
-
end
|
1031
|
+
def to_hash; end
|
1032
1032
|
end
|
1033
1033
|
|
1034
1034
|
class MinimumInterval < Orb::Internal::Type::BaseModel
|
@@ -1045,7 +1045,7 @@ module Orb
|
|
1045
1045
|
attr_accessor :end_date
|
1046
1046
|
|
1047
1047
|
# The minimum amount to charge in a given billing period for the price intervals
|
1048
|
-
#
|
1048
|
+
# this minimum applies to.
|
1049
1049
|
sig { returns(String) }
|
1050
1050
|
attr_accessor :minimum_amount
|
1051
1051
|
|
@@ -1084,8 +1084,19 @@ module Orb
|
|
1084
1084
|
}
|
1085
1085
|
)
|
1086
1086
|
end
|
1087
|
-
def to_hash
|
1088
|
-
|
1087
|
+
def to_hash; end
|
1088
|
+
end
|
1089
|
+
|
1090
|
+
class PendingSubscriptionChange < Orb::Internal::Type::BaseModel
|
1091
|
+
sig { returns(String) }
|
1092
|
+
attr_accessor :id
|
1093
|
+
|
1094
|
+
# A pending subscription change if one exists on this subscription.
|
1095
|
+
sig { params(id: String).returns(T.attached_class) }
|
1096
|
+
def self.new(id:); end
|
1097
|
+
|
1098
|
+
sig { override.returns({id: String}) }
|
1099
|
+
def to_hash; end
|
1089
1100
|
end
|
1090
1101
|
|
1091
1102
|
class PriceInterval < Orb::Internal::Type::BaseModel
|
@@ -1097,19 +1108,19 @@ module Orb
|
|
1097
1108
|
attr_accessor :billing_cycle_day
|
1098
1109
|
|
1099
1110
|
# The end of the current billing period. This is an exclusive timestamp, such that
|
1100
|
-
#
|
1101
|
-
#
|
1111
|
+
# the instant returned is exactly the end of the billing period. Set to null if
|
1112
|
+
# this price interval is not currently active.
|
1102
1113
|
sig { returns(T.nilable(Time)) }
|
1103
1114
|
attr_accessor :current_billing_period_end_date
|
1104
1115
|
|
1105
1116
|
# The start date of the current billing period. This is an inclusive timestamp;
|
1106
|
-
#
|
1107
|
-
#
|
1117
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
1118
|
+
# if this price interval is not currently active.
|
1108
1119
|
sig { returns(T.nilable(Time)) }
|
1109
1120
|
attr_accessor :current_billing_period_start_date
|
1110
1121
|
|
1111
1122
|
# The end date of the price interval. This is the date that Orb stops billing for
|
1112
|
-
#
|
1123
|
+
# this price.
|
1113
1124
|
sig { returns(T.nilable(Time)) }
|
1114
1125
|
attr_accessor :end_date
|
1115
1126
|
|
@@ -1118,7 +1129,7 @@ module Orb
|
|
1118
1129
|
attr_accessor :filter
|
1119
1130
|
|
1120
1131
|
# The fixed fee quantity transitions for this price interval. This is only
|
1121
|
-
#
|
1132
|
+
# relevant for fixed fees.
|
1122
1133
|
sig do
|
1123
1134
|
returns(
|
1124
1135
|
T.nilable(T::Array[Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition])
|
@@ -1127,15 +1138,15 @@ module Orb
|
|
1127
1138
|
attr_accessor :fixed_fee_quantity_transitions
|
1128
1139
|
|
1129
1140
|
# The Price resource represents a price that can be billed on a subscription,
|
1130
|
-
#
|
1131
|
-
#
|
1141
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1142
|
+
# take a quantity and determine an amount to bill.
|
1132
1143
|
#
|
1133
|
-
#
|
1134
|
-
#
|
1135
|
-
#
|
1144
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1145
|
+
# is serialized differently in a given Price object. The model_type field
|
1146
|
+
# determines the key for the configuration object that is present.
|
1136
1147
|
#
|
1137
|
-
#
|
1138
|
-
#
|
1148
|
+
# For more on the types of prices, see
|
1149
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1139
1150
|
sig do
|
1140
1151
|
returns(
|
1141
1152
|
T.any(
|
@@ -1173,18 +1184,18 @@ module Orb
|
|
1173
1184
|
attr_accessor :price
|
1174
1185
|
|
1175
1186
|
# The start date of the price interval. This is the date that Orb starts billing
|
1176
|
-
#
|
1187
|
+
# for this price.
|
1177
1188
|
sig { returns(Time) }
|
1178
1189
|
attr_accessor :start_date
|
1179
1190
|
|
1180
1191
|
# A list of customer IDs whose usage events will be aggregated and billed under
|
1181
|
-
#
|
1192
|
+
# this price interval.
|
1182
1193
|
sig { returns(T.nilable(T::Array[String])) }
|
1183
1194
|
attr_accessor :usage_customer_ids
|
1184
1195
|
|
1185
1196
|
# The Price Interval resource represents a period of time for which a price will
|
1186
|
-
#
|
1187
|
-
#
|
1197
|
+
# bill on a subscription. A subscription’s price intervals define its billing
|
1198
|
+
# behavior.
|
1188
1199
|
sig do
|
1189
1200
|
params(
|
1190
1201
|
id: String,
|
@@ -1195,10 +1206,10 @@ module Orb
|
|
1195
1206
|
filter: T.nilable(String),
|
1196
1207
|
fixed_fee_quantity_transitions: T.nilable(
|
1197
1208
|
T::Array[
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1209
|
+
T.any(
|
1210
|
+
Orb::Models::SubscriptionCreateResponse::PriceInterval::FixedFeeQuantityTransition,
|
1211
|
+
Orb::Internal::AnyHash
|
1212
|
+
)
|
1202
1213
|
]
|
1203
1214
|
),
|
1204
1215
|
price: T.any(
|
@@ -1248,9 +1259,7 @@ module Orb
|
|
1248
1259
|
price:,
|
1249
1260
|
start_date:,
|
1250
1261
|
usage_customer_ids:
|
1251
|
-
)
|
1252
|
-
end
|
1253
|
-
|
1262
|
+
); end
|
1254
1263
|
sig do
|
1255
1264
|
override
|
1256
1265
|
.returns(
|
@@ -1297,8 +1306,7 @@ module Orb
|
|
1297
1306
|
}
|
1298
1307
|
)
|
1299
1308
|
end
|
1300
|
-
def to_hash
|
1301
|
-
end
|
1309
|
+
def to_hash; end
|
1302
1310
|
|
1303
1311
|
class FixedFeeQuantityTransition < Orb::Internal::Type::BaseModel
|
1304
1312
|
sig { returns(Time) }
|
@@ -1311,12 +1319,10 @@ module Orb
|
|
1311
1319
|
attr_accessor :quantity
|
1312
1320
|
|
1313
1321
|
sig { params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class) }
|
1314
|
-
def self.new(effective_date:, price_id:, quantity:)
|
1315
|
-
end
|
1322
|
+
def self.new(effective_date:, price_id:, quantity:); end
|
1316
1323
|
|
1317
1324
|
sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
|
1318
|
-
def to_hash
|
1319
|
-
end
|
1325
|
+
def to_hash; end
|
1320
1326
|
end
|
1321
1327
|
end
|
1322
1328
|
|
@@ -1333,12 +1339,10 @@ module Orb
|
|
1333
1339
|
sig do
|
1334
1340
|
params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
|
1335
1341
|
end
|
1336
|
-
def self.new(coupon_id:, end_date:, start_date:)
|
1337
|
-
end
|
1342
|
+
def self.new(coupon_id:, end_date:, start_date:); end
|
1338
1343
|
|
1339
1344
|
sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
|
1340
|
-
def to_hash
|
1341
|
-
end
|
1345
|
+
def to_hash; end
|
1342
1346
|
end
|
1343
1347
|
|
1344
1348
|
module Status
|
@@ -1353,8 +1357,7 @@ module Orb
|
|
1353
1357
|
UPCOMING = T.let(:upcoming, Orb::Models::SubscriptionCreateResponse::Status::TaggedSymbol)
|
1354
1358
|
|
1355
1359
|
sig { override.returns(T::Array[Orb::Models::SubscriptionCreateResponse::Status::TaggedSymbol]) }
|
1356
|
-
def self.values
|
1357
|
-
end
|
1360
|
+
def self.values; end
|
1358
1361
|
end
|
1359
1362
|
|
1360
1363
|
class TrialInfo < Orb::Internal::Type::BaseModel
|
@@ -1362,12 +1365,55 @@ module Orb
|
|
1362
1365
|
attr_accessor :end_date
|
1363
1366
|
|
1364
1367
|
sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
|
1365
|
-
def self.new(end_date:)
|
1366
|
-
end
|
1368
|
+
def self.new(end_date:); end
|
1367
1369
|
|
1368
1370
|
sig { override.returns({end_date: T.nilable(Time)}) }
|
1369
|
-
def to_hash
|
1371
|
+
def to_hash; end
|
1372
|
+
end
|
1373
|
+
|
1374
|
+
class ChangedResources < Orb::Internal::Type::BaseModel
|
1375
|
+
# The credit notes that were created as part of this operation.
|
1376
|
+
sig { returns(T::Array[Orb::Models::CreditNote]) }
|
1377
|
+
attr_accessor :created_credit_notes
|
1378
|
+
|
1379
|
+
# The invoices that were created as part of this operation.
|
1380
|
+
sig { returns(T::Array[Orb::Models::Invoice]) }
|
1381
|
+
attr_accessor :created_invoices
|
1382
|
+
|
1383
|
+
# The credit notes that were voided as part of this operation.
|
1384
|
+
sig { returns(T::Array[Orb::Models::CreditNote]) }
|
1385
|
+
attr_accessor :voided_credit_notes
|
1386
|
+
|
1387
|
+
# The invoices that were voided as part of this operation.
|
1388
|
+
sig { returns(T::Array[Orb::Models::Invoice]) }
|
1389
|
+
attr_accessor :voided_invoices
|
1390
|
+
|
1391
|
+
# The resources that were changed as part of this operation. Only present when
|
1392
|
+
# fetched through the subscription changes API or if the
|
1393
|
+
# `include_changed_resources` parameter was passed in the request.
|
1394
|
+
sig do
|
1395
|
+
params(
|
1396
|
+
created_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
|
1397
|
+
created_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)],
|
1398
|
+
voided_credit_notes: T::Array[T.any(Orb::Models::CreditNote, Orb::Internal::AnyHash)],
|
1399
|
+
voided_invoices: T::Array[T.any(Orb::Models::Invoice, Orb::Internal::AnyHash)]
|
1400
|
+
)
|
1401
|
+
.returns(T.attached_class)
|
1402
|
+
end
|
1403
|
+
def self.new(created_credit_notes:, created_invoices:, voided_credit_notes:, voided_invoices:); end
|
1404
|
+
|
1405
|
+
sig do
|
1406
|
+
override
|
1407
|
+
.returns(
|
1408
|
+
{
|
1409
|
+
created_credit_notes: T::Array[Orb::Models::CreditNote],
|
1410
|
+
created_invoices: T::Array[Orb::Models::Invoice],
|
1411
|
+
voided_credit_notes: T::Array[Orb::Models::CreditNote],
|
1412
|
+
voided_invoices: T::Array[Orb::Models::Invoice]
|
1413
|
+
}
|
1414
|
+
)
|
1370
1415
|
end
|
1416
|
+
def to_hash; end
|
1371
1417
|
end
|
1372
1418
|
end
|
1373
1419
|
end
|