orb-billing 0.1.0.pre.alpha.33
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 +7 -0
- data/README.md +169 -0
- data/lib/orb/client.rb +129 -0
- data/lib/orb/errors.rb +317 -0
- data/lib/orb/models/alert.rb +225 -0
- data/lib/orb/models/alert_create_for_customer_params.rb +77 -0
- data/lib/orb/models/alert_create_for_external_customer_params.rb +77 -0
- data/lib/orb/models/alert_create_for_subscription_params.rb +74 -0
- data/lib/orb/models/alert_disable_params.rb +26 -0
- data/lib/orb/models/alert_enable_params.rb +26 -0
- data/lib/orb/models/alert_list_params.rb +97 -0
- data/lib/orb/models/alert_retrieve_params.rb +19 -0
- data/lib/orb/models/alert_update_params.rb +46 -0
- data/lib/orb/models/amount_discount.rb +53 -0
- data/lib/orb/models/billable_metric.rb +76 -0
- data/lib/orb/models/billing_cycle_relative_date.rb +18 -0
- data/lib/orb/models/coupon.rb +86 -0
- data/lib/orb/models/coupon_archive_params.rb +19 -0
- data/lib/orb/models/coupon_create_params.rb +102 -0
- data/lib/orb/models/coupon_fetch_params.rb +19 -0
- data/lib/orb/models/coupon_list_params.rb +53 -0
- data/lib/orb/models/coupons/subscription_list_params.rb +40 -0
- data/lib/orb/models/credit_note.rb +522 -0
- data/lib/orb/models/credit_note_create_params.rb +77 -0
- data/lib/orb/models/credit_note_fetch_params.rb +19 -0
- data/lib/orb/models/credit_note_list_params.rb +73 -0
- data/lib/orb/models/customer.rb +872 -0
- data/lib/orb/models/customer_create_params.rb +843 -0
- data/lib/orb/models/customer_delete_params.rb +19 -0
- data/lib/orb/models/customer_fetch_by_external_id_params.rb +19 -0
- data/lib/orb/models/customer_fetch_params.rb +19 -0
- data/lib/orb/models/customer_list_params.rb +73 -0
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rb +19 -0
- data/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rb +19 -0
- data/lib/orb/models/customer_update_by_external_id_params.rb +848 -0
- data/lib/orb/models/customer_update_params.rb +838 -0
- data/lib/orb/models/customers/balance_transaction_create_params.rb +53 -0
- data/lib/orb/models/customers/balance_transaction_create_response.rb +167 -0
- data/lib/orb/models/customers/balance_transaction_list_params.rb +75 -0
- data/lib/orb/models/customers/balance_transaction_list_response.rb +167 -0
- data/lib/orb/models/customers/cost_list_by_external_id_params.rb +69 -0
- data/lib/orb/models/customers/cost_list_by_external_id_response.rb +106 -0
- data/lib/orb/models/customers/cost_list_params.rb +69 -0
- data/lib/orb/models/customers/cost_list_response.rb +106 -0
- data/lib/orb/models/customers/credit_list_by_external_id_params.rb +59 -0
- data/lib/orb/models/customers/credit_list_by_external_id_response.rb +72 -0
- data/lib/orb/models/customers/credit_list_params.rb +59 -0
- data/lib/orb/models/customers/credit_list_response.rb +72 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rb +215 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rb +1311 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_params.rb +214 -0
- data/lib/orb/models/customers/credits/ledger_create_entry_response.rb +1310 -0
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rb +141 -0
- data/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rb +1310 -0
- data/lib/orb/models/customers/credits/ledger_list_params.rb +141 -0
- data/lib/orb/models/customers/credits/ledger_list_response.rb +1306 -0
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rb +159 -0
- data/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rb +154 -0
- data/lib/orb/models/customers/credits/top_up_create_params.rb +158 -0
- data/lib/orb/models/customers/credits/top_up_create_response.rb +153 -0
- data/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rb +29 -0
- data/lib/orb/models/customers/credits/top_up_delete_params.rb +29 -0
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rb +42 -0
- data/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rb +154 -0
- data/lib/orb/models/customers/credits/top_up_list_params.rb +42 -0
- data/lib/orb/models/customers/credits/top_up_list_response.rb +153 -0
- data/lib/orb/models/dimensional_price_group.rb +64 -0
- data/lib/orb/models/dimensional_price_group_create_params.rb +63 -0
- data/lib/orb/models/dimensional_price_group_list_params.rb +38 -0
- data/lib/orb/models/dimensional_price_group_retrieve_params.rb +19 -0
- data/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rb +21 -0
- data/lib/orb/models/dimensional_price_groups.rb +25 -0
- data/lib/orb/models/discount.rb +23 -0
- data/lib/orb/models/evaluate_price_group.rb +48 -0
- data/lib/orb/models/event_deprecate_params.rb +19 -0
- data/lib/orb/models/event_deprecate_response.rb +21 -0
- data/lib/orb/models/event_ingest_params.rb +100 -0
- data/lib/orb/models/event_ingest_response.rb +77 -0
- data/lib/orb/models/event_search_params.rb +45 -0
- data/lib/orb/models/event_search_response.rb +87 -0
- data/lib/orb/models/event_update_params.rb +58 -0
- data/lib/orb/models/event_update_response.rb +21 -0
- data/lib/orb/models/events/backfill_close_params.rb +21 -0
- data/lib/orb/models/events/backfill_close_response.rb +131 -0
- data/lib/orb/models/events/backfill_create_params.rb +97 -0
- data/lib/orb/models/events/backfill_create_response.rb +131 -0
- data/lib/orb/models/events/backfill_fetch_params.rb +21 -0
- data/lib/orb/models/events/backfill_fetch_response.rb +131 -0
- data/lib/orb/models/events/backfill_list_params.rb +40 -0
- data/lib/orb/models/events/backfill_list_response.rb +131 -0
- data/lib/orb/models/events/backfill_revert_params.rb +21 -0
- data/lib/orb/models/events/backfill_revert_response.rb +131 -0
- data/lib/orb/models/events/event_volumes.rb +54 -0
- data/lib/orb/models/events/volume_list_params.rb +64 -0
- data/lib/orb/models/invoice.rb +2218 -0
- data/lib/orb/models/invoice_create_params.rb +200 -0
- data/lib/orb/models/invoice_fetch_params.rb +19 -0
- data/lib/orb/models/invoice_fetch_upcoming_params.rb +25 -0
- data/lib/orb/models/invoice_fetch_upcoming_response.rb +2226 -0
- data/lib/orb/models/invoice_issue_params.rb +34 -0
- data/lib/orb/models/invoice_level_discount.rb +21 -0
- data/lib/orb/models/invoice_line_item_create_params.rb +62 -0
- data/lib/orb/models/invoice_line_item_create_response.rb +929 -0
- data/lib/orb/models/invoice_list_params.rb +197 -0
- data/lib/orb/models/invoice_mark_paid_params.rb +40 -0
- data/lib/orb/models/invoice_pay_params.rb +19 -0
- data/lib/orb/models/invoice_update_params.rb +28 -0
- data/lib/orb/models/invoice_void_params.rb +19 -0
- data/lib/orb/models/item.rb +82 -0
- data/lib/orb/models/item_create_params.rb +26 -0
- data/lib/orb/models/item_fetch_params.rb +19 -0
- data/lib/orb/models/item_list_params.rb +38 -0
- data/lib/orb/models/item_update_params.rb +73 -0
- data/lib/orb/models/metric_create_params.rb +56 -0
- data/lib/orb/models/metric_fetch_params.rb +19 -0
- data/lib/orb/models/metric_list_params.rb +73 -0
- data/lib/orb/models/metric_update_params.rb +28 -0
- data/lib/orb/models/pagination_metadata.rb +25 -0
- data/lib/orb/models/percentage_discount.rb +54 -0
- data/lib/orb/models/plan.rb +894 -0
- data/lib/orb/models/plan_create_params.rb +6702 -0
- data/lib/orb/models/plan_fetch_params.rb +19 -0
- data/lib/orb/models/plan_list_params.rb +100 -0
- data/lib/orb/models/plan_update_params.rb +37 -0
- data/lib/orb/models/plans/external_plan_id_fetch_params.rb +21 -0
- data/lib/orb/models/plans/external_plan_id_update_params.rb +39 -0
- data/lib/orb/models/price.rb +12229 -0
- data/lib/orb/models/price_create_params.rb +808 -0
- data/lib/orb/models/price_evaluate_params.rb +80 -0
- data/lib/orb/models/price_evaluate_response.rb +20 -0
- data/lib/orb/models/price_fetch_params.rb +19 -0
- data/lib/orb/models/price_list_params.rb +38 -0
- data/lib/orb/models/price_update_params.rb +28 -0
- data/lib/orb/models/prices/external_price_id_fetch_params.rb +21 -0
- data/lib/orb/models/prices/external_price_id_update_params.rb +30 -0
- data/lib/orb/models/subscription.rb +1233 -0
- data/lib/orb/models/subscription_cancel_params.rb +58 -0
- data/lib/orb/models/subscription_cancel_response.rb +1217 -0
- data/lib/orb/models/subscription_create_params.rb +15065 -0
- data/lib/orb/models/subscription_create_response.rb +1217 -0
- data/lib/orb/models/subscription_fetch_costs_params.rb +67 -0
- data/lib/orb/models/subscription_fetch_costs_response.rb +104 -0
- data/lib/orb/models/subscription_fetch_params.rb +19 -0
- data/lib/orb/models/subscription_fetch_schedule_params.rb +73 -0
- data/lib/orb/models/subscription_fetch_schedule_response.rb +68 -0
- data/lib/orb/models/subscription_fetch_usage_params.rb +135 -0
- data/lib/orb/models/subscription_list_params.rb +108 -0
- data/lib/orb/models/subscription_price_intervals_params.rb +8358 -0
- data/lib/orb/models/subscription_price_intervals_response.rb +1224 -0
- data/lib/orb/models/subscription_schedule_plan_change_params.rb +15088 -0
- data/lib/orb/models/subscription_schedule_plan_change_response.rb +1224 -0
- data/lib/orb/models/subscription_trigger_phase_params.rb +36 -0
- data/lib/orb/models/subscription_trigger_phase_response.rb +1224 -0
- data/lib/orb/models/subscription_unschedule_cancellation_params.rb +19 -0
- data/lib/orb/models/subscription_unschedule_cancellation_response.rb +1224 -0
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rb +26 -0
- data/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rb +1228 -0
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rb +19 -0
- data/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rb +1224 -0
- data/lib/orb/models/subscription_update_fixed_fee_quantity_params.rb +90 -0
- data/lib/orb/models/subscription_update_fixed_fee_quantity_response.rb +1224 -0
- data/lib/orb/models/subscription_update_params.rb +74 -0
- data/lib/orb/models/subscription_update_trial_params.rb +59 -0
- data/lib/orb/models/subscription_update_trial_response.rb +1222 -0
- data/lib/orb/models/subscription_usage.rb +258 -0
- data/lib/orb/models/subscriptions.rb +25 -0
- data/lib/orb/models/top_level_ping_params.rb +19 -0
- data/lib/orb/models/top_level_ping_response.rb +20 -0
- data/lib/orb/models/trial_discount.rb +69 -0
- data/lib/orb/models/usage_discount.rb +54 -0
- data/lib/orb/page.rb +114 -0
- data/lib/orb/request_options.rb +75 -0
- data/lib/orb/resources/alerts.rb +239 -0
- data/lib/orb/resources/coupons/subscriptions.rb +43 -0
- data/lib/orb/resources/coupons.rb +115 -0
- data/lib/orb/resources/credit_notes.rb +87 -0
- data/lib/orb/resources/customers/balance_transactions.rb +96 -0
- data/lib/orb/resources/customers/costs.rb +298 -0
- data/lib/orb/resources/customers/credits/ledger.rb +527 -0
- data/lib/orb/resources/customers/credits/top_ups.rb +192 -0
- data/lib/orb/resources/customers/credits.rb +88 -0
- data/lib/orb/resources/customers.rb +321 -0
- data/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rb +38 -0
- data/lib/orb/resources/dimensional_price_groups.rb +93 -0
- data/lib/orb/resources/events/backfills.rb +174 -0
- data/lib/orb/resources/events/volume.rb +52 -0
- data/lib/orb/resources/events.rb +415 -0
- data/lib/orb/resources/invoice_line_items.rb +41 -0
- data/lib/orb/resources/invoices.rb +266 -0
- data/lib/orb/resources/items.rb +95 -0
- data/lib/orb/resources/metrics.rb +114 -0
- data/lib/orb/resources/plans/external_plan_id.rb +76 -0
- data/lib/orb/resources/plans.rb +133 -0
- data/lib/orb/resources/prices/external_price_id.rb +61 -0
- data/lib/orb/resources/prices.rb +197 -0
- data/lib/orb/resources/subscriptions.rb +1278 -0
- data/lib/orb/resources/top_level.rb +37 -0
- data/lib/orb/transport/base_client.rb +459 -0
- data/lib/orb/transport/pooled_net_requester.rb +182 -0
- data/lib/orb/type/array_of.rb +112 -0
- data/lib/orb/type/base_model.rb +367 -0
- data/lib/orb/type/base_page.rb +61 -0
- data/lib/orb/type/boolean_model.rb +52 -0
- data/lib/orb/type/converter.rb +217 -0
- data/lib/orb/type/enum.rb +101 -0
- data/lib/orb/type/hash_of.rb +132 -0
- data/lib/orb/type/request_parameters.rb +38 -0
- data/lib/orb/type/union.rb +225 -0
- data/lib/orb/type/unknown.rb +56 -0
- data/lib/orb/type.rb +23 -0
- data/lib/orb/util.rb +722 -0
- data/lib/orb/version.rb +5 -0
- data/lib/orb.rb +247 -0
- data/manifest.yaml +15 -0
- data/rbi/lib/orb/client.rbi +90 -0
- data/rbi/lib/orb/errors.rbi +246 -0
- data/rbi/lib/orb/models/alert.rbi +239 -0
- data/rbi/lib/orb/models/alert_create_for_customer_params.rbi +86 -0
- data/rbi/lib/orb/models/alert_create_for_external_customer_params.rbi +88 -0
- data/rbi/lib/orb/models/alert_create_for_subscription_params.rbi +83 -0
- data/rbi/lib/orb/models/alert_disable_params.rbi +28 -0
- data/rbi/lib/orb/models/alert_enable_params.rbi +28 -0
- data/rbi/lib/orb/models/alert_list_params.rbi +95 -0
- data/rbi/lib/orb/models/alert_retrieve_params.rbi +20 -0
- data/rbi/lib/orb/models/alert_update_params.rbi +51 -0
- data/rbi/lib/orb/models/amount_discount.rbi +62 -0
- data/rbi/lib/orb/models/billable_metric.rbi +83 -0
- data/rbi/lib/orb/models/billing_cycle_relative_date.rbi +19 -0
- data/rbi/lib/orb/models/coupon.rbi +90 -0
- data/rbi/lib/orb/models/coupon_archive_params.rbi +20 -0
- data/rbi/lib/orb/models/coupon_create_params.rbi +120 -0
- data/rbi/lib/orb/models/coupon_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/coupon_list_params.rbi +59 -0
- data/rbi/lib/orb/models/coupons/subscription_list_params.rbi +41 -0
- data/rbi/lib/orb/models/credit_note.rbi +546 -0
- data/rbi/lib/orb/models/credit_note_create_params.rbi +84 -0
- data/rbi/lib/orb/models/credit_note_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/credit_note_list_params.rbi +74 -0
- data/rbi/lib/orb/models/customer.rbi +941 -0
- data/rbi/lib/orb/models/customer_create_params.rbi +923 -0
- data/rbi/lib/orb/models/customer_delete_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_fetch_by_external_id_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_list_params.rbi +74 -0
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_sync_payment_methods_from_gateway_params.rbi +20 -0
- data/rbi/lib/orb/models/customer_update_by_external_id_params.rbi +945 -0
- data/rbi/lib/orb/models/customer_update_params.rbi +919 -0
- data/rbi/lib/orb/models/customers/balance_transaction_create_params.rbi +64 -0
- data/rbi/lib/orb/models/customers/balance_transaction_create_response.rbi +199 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_params.rbi +76 -0
- data/rbi/lib/orb/models/customers/balance_transaction_list_response.rbi +191 -0
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_params.rbi +86 -0
- data/rbi/lib/orb/models/customers/cost_list_by_external_id_response.rbi +214 -0
- data/rbi/lib/orb/models/customers/cost_list_params.rbi +84 -0
- data/rbi/lib/orb/models/customers/cost_list_response.rbi +212 -0
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_params.rbi +64 -0
- data/rbi/lib/orb/models/customers/credit_list_by_external_id_response.rbi +87 -0
- data/rbi/lib/orb/models/customers/credit_list_params.rbi +64 -0
- data/rbi/lib/orb/models/customers/credit_list_response.rbi +86 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbi +270 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbi +1670 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_params.rbi +238 -0
- data/rbi/lib/orb/models/customers/credits/ledger_create_entry_response.rbi +1626 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_params.rbi +181 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_by_external_id_response.rbi +1654 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_params.rbi +144 -0
- data/rbi/lib/orb/models/customers/credits/ledger_list_response.rbi +1588 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_params.rbi +196 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_by_external_id_response.rbi +198 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_params.rbi +176 -0
- data/rbi/lib/orb/models/customers/credits/top_up_create_response.rbi +175 -0
- data/rbi/lib/orb/models/customers/credits/top_up_delete_by_external_id_params.rbi +31 -0
- data/rbi/lib/orb/models/customers/credits/top_up_delete_params.rbi +28 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_params.rbi +49 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_by_external_id_response.rbi +188 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_params.rbi +49 -0
- data/rbi/lib/orb/models/customers/credits/top_up_list_response.rbi +168 -0
- data/rbi/lib/orb/models/dimensional_price_group.rbi +75 -0
- data/rbi/lib/orb/models/dimensional_price_group_create_params.rbi +66 -0
- data/rbi/lib/orb/models/dimensional_price_group_list_params.rbi +39 -0
- data/rbi/lib/orb/models/dimensional_price_group_retrieve_params.rbi +20 -0
- data/rbi/lib/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbi +22 -0
- data/rbi/lib/orb/models/dimensional_price_groups.rbi +35 -0
- data/rbi/lib/orb/models/discount.rbi +18 -0
- data/rbi/lib/orb/models/evaluate_price_group.rbi +45 -0
- data/rbi/lib/orb/models/event_deprecate_params.rbi +20 -0
- data/rbi/lib/orb/models/event_deprecate_response.rbi +19 -0
- data/rbi/lib/orb/models/event_ingest_params.rbi +120 -0
- data/rbi/lib/orb/models/event_ingest_response.rbi +79 -0
- data/rbi/lib/orb/models/event_search_params.rbi +53 -0
- data/rbi/lib/orb/models/event_search_response.rbi +100 -0
- data/rbi/lib/orb/models/event_update_params.rbi +71 -0
- data/rbi/lib/orb/models/event_update_response.rbi +19 -0
- data/rbi/lib/orb/models/events/backfill_close_params.rbi +22 -0
- data/rbi/lib/orb/models/events/backfill_close_response.rbi +127 -0
- data/rbi/lib/orb/models/events/backfill_create_params.rbi +97 -0
- data/rbi/lib/orb/models/events/backfill_create_response.rbi +128 -0
- data/rbi/lib/orb/models/events/backfill_fetch_params.rbi +22 -0
- data/rbi/lib/orb/models/events/backfill_fetch_response.rbi +127 -0
- data/rbi/lib/orb/models/events/backfill_list_params.rbi +41 -0
- data/rbi/lib/orb/models/events/backfill_list_response.rbi +127 -0
- data/rbi/lib/orb/models/events/backfill_revert_params.rbi +22 -0
- data/rbi/lib/orb/models/events/backfill_revert_response.rbi +128 -0
- data/rbi/lib/orb/models/events/event_volumes.rbi +47 -0
- data/rbi/lib/orb/models/events/volume_list_params.rbi +69 -0
- data/rbi/lib/orb/models/invoice.rbi +2466 -0
- data/rbi/lib/orb/models/invoice_create_params.rbi +230 -0
- data/rbi/lib/orb/models/invoice_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/invoice_fetch_upcoming_params.rbi +24 -0
- data/rbi/lib/orb/models/invoice_fetch_upcoming_response.rbi +2646 -0
- data/rbi/lib/orb/models/invoice_issue_params.rbi +32 -0
- data/rbi/lib/orb/models/invoice_level_discount.rbi +16 -0
- data/rbi/lib/orb/models/invoice_line_item_create_params.rbi +67 -0
- data/rbi/lib/orb/models/invoice_line_item_create_response.rbi +1164 -0
- data/rbi/lib/orb/models/invoice_list_params.rbi +187 -0
- data/rbi/lib/orb/models/invoice_mark_paid_params.rbi +48 -0
- data/rbi/lib/orb/models/invoice_pay_params.rbi +20 -0
- data/rbi/lib/orb/models/invoice_update_params.rbi +36 -0
- data/rbi/lib/orb/models/invoice_void_params.rbi +20 -0
- data/rbi/lib/orb/models/item.rbi +101 -0
- data/rbi/lib/orb/models/item_create_params.rbi +25 -0
- data/rbi/lib/orb/models/item_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/item_list_params.rbi +39 -0
- data/rbi/lib/orb/models/item_update_params.rbi +113 -0
- data/rbi/lib/orb/models/metric_create_params.rbi +62 -0
- data/rbi/lib/orb/models/metric_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/metric_list_params.rbi +74 -0
- data/rbi/lib/orb/models/metric_update_params.rbi +36 -0
- data/rbi/lib/orb/models/pagination_metadata.rbi +21 -0
- data/rbi/lib/orb/models/percentage_discount.rbi +63 -0
- data/rbi/lib/orb/models/plan.rbi +1071 -0
- data/rbi/lib/orb/models/plan_create_params.rbi +10069 -0
- data/rbi/lib/orb/models/plan_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/plan_list_params.rbi +100 -0
- data/rbi/lib/orb/models/plan_update_params.rbi +46 -0
- data/rbi/lib/orb/models/plans/external_plan_id_fetch_params.rbi +22 -0
- data/rbi/lib/orb/models/plans/external_plan_id_update_params.rbi +48 -0
- data/rbi/lib/orb/models/price.rbi +15341 -0
- data/rbi/lib/orb/models/price_create_params.rbi +885 -0
- data/rbi/lib/orb/models/price_evaluate_params.rbi +81 -0
- data/rbi/lib/orb/models/price_evaluate_response.rbi +21 -0
- data/rbi/lib/orb/models/price_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/price_list_params.rbi +39 -0
- data/rbi/lib/orb/models/price_update_params.rbi +36 -0
- data/rbi/lib/orb/models/prices/external_price_id_fetch_params.rbi +22 -0
- data/rbi/lib/orb/models/prices/external_price_id_update_params.rbi +38 -0
- data/rbi/lib/orb/models/subscription.rbi +1381 -0
- data/rbi/lib/orb/models/subscription_cancel_params.rbi +75 -0
- data/rbi/lib/orb/models/subscription_cancel_response.rbi +1374 -0
- data/rbi/lib/orb/models/subscription_create_params.rbi +23422 -0
- data/rbi/lib/orb/models/subscription_create_response.rbi +1374 -0
- data/rbi/lib/orb/models/subscription_fetch_costs_params.rbi +82 -0
- data/rbi/lib/orb/models/subscription_fetch_costs_response.rbi +210 -0
- data/rbi/lib/orb/models/subscription_fetch_params.rbi +20 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_params.rbi +74 -0
- data/rbi/lib/orb/models/subscription_fetch_schedule_response.rbi +81 -0
- data/rbi/lib/orb/models/subscription_fetch_usage_params.rbi +137 -0
- data/rbi/lib/orb/models/subscription_list_params.rbi +108 -0
- data/rbi/lib/orb/models/subscription_price_intervals_params.rbi +12991 -0
- data/rbi/lib/orb/models/subscription_price_intervals_response.rbi +1387 -0
- data/rbi/lib/orb/models/subscription_schedule_plan_change_params.rbi +23589 -0
- data/rbi/lib/orb/models/subscription_schedule_plan_change_response.rbi +1390 -0
- data/rbi/lib/orb/models/subscription_trigger_phase_params.rbi +45 -0
- data/rbi/lib/orb/models/subscription_trigger_phase_response.rbi +1381 -0
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_params.rbi +20 -0
- data/rbi/lib/orb/models/subscription_unschedule_cancellation_response.rbi +1400 -0
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbi +25 -0
- data/rbi/lib/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbi +1451 -0
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_params.rbi +20 -0
- data/rbi/lib/orb/models/subscription_unschedule_pending_plan_changes_response.rbi +1410 -0
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_params.rbi +104 -0
- data/rbi/lib/orb/models/subscription_update_fixed_fee_quantity_response.rbi +1400 -0
- data/rbi/lib/orb/models/subscription_update_params.rbi +77 -0
- data/rbi/lib/orb/models/subscription_update_trial_params.rbi +63 -0
- data/rbi/lib/orb/models/subscription_update_trial_response.rbi +1378 -0
- data/rbi/lib/orb/models/subscription_usage.rbi +323 -0
- data/rbi/lib/orb/models/subscriptions.rbi +33 -0
- data/rbi/lib/orb/models/top_level_ping_params.rbi +20 -0
- data/rbi/lib/orb/models/top_level_ping_response.rbi +18 -0
- data/rbi/lib/orb/models/trial_discount.rbi +73 -0
- data/rbi/lib/orb/models/usage_discount.rbi +62 -0
- data/rbi/lib/orb/page.rbi +35 -0
- data/rbi/lib/orb/request_options.rbi +48 -0
- data/rbi/lib/orb/resources/alerts.rbi +216 -0
- data/rbi/lib/orb/resources/coupons/subscriptions.rbi +38 -0
- data/rbi/lib/orb/resources/coupons.rbi +96 -0
- data/rbi/lib/orb/resources/credit_notes.rbi +74 -0
- data/rbi/lib/orb/resources/customers/balance_transactions.rbi +92 -0
- data/rbi/lib/orb/resources/customers/costs.rbi +304 -0
- data/rbi/lib/orb/resources/customers/credits/ledger.rbi +645 -0
- data/rbi/lib/orb/resources/customers/credits/top_ups.rbi +180 -0
- data/rbi/lib/orb/resources/customers/credits.rbi +88 -0
- data/rbi/lib/orb/resources/customers.rbi +714 -0
- data/rbi/lib/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbi +25 -0
- data/rbi/lib/orb/resources/dimensional_price_groups.rbi +78 -0
- data/rbi/lib/orb/resources/events/backfills.rbi +161 -0
- data/rbi/lib/orb/resources/events/volume.rbi +57 -0
- data/rbi/lib/orb/resources/events.rbi +408 -0
- data/rbi/lib/orb/resources/invoice_line_items.rbi +44 -0
- data/rbi/lib/orb/resources/invoices.rbi +262 -0
- data/rbi/lib/orb/resources/items.rbi +65 -0
- data/rbi/lib/orb/resources/metrics.rbi +102 -0
- data/rbi/lib/orb/resources/plans/external_plan_id.rbi +67 -0
- data/rbi/lib/orb/resources/plans.rbi +170 -0
- data/rbi/lib/orb/resources/prices/external_price_id.rbi +110 -0
- data/rbi/lib/orb/resources/prices.rbi +371 -0
- data/rbi/lib/orb/resources/subscriptions.rbi +1469 -0
- data/rbi/lib/orb/resources/top_level.rbi +25 -0
- data/rbi/lib/orb/transport/base_client.rbi +205 -0
- data/rbi/lib/orb/transport/pooled_net_requester.rbi +64 -0
- data/rbi/lib/orb/type/array_of.rbi +82 -0
- data/rbi/lib/orb/type/base_model.rbi +197 -0
- data/rbi/lib/orb/type/base_page.rbi +38 -0
- data/rbi/lib/orb/type/boolean_model.rbi +41 -0
- data/rbi/lib/orb/type/converter.rbi +95 -0
- data/rbi/lib/orb/type/enum.rbi +58 -0
- data/rbi/lib/orb/type/hash_of.rbi +86 -0
- data/rbi/lib/orb/type/request_parameters.rbi +20 -0
- data/rbi/lib/orb/type/union.rbi +66 -0
- data/rbi/lib/orb/type/unknown.rbi +37 -0
- data/rbi/lib/orb/type.rbi +23 -0
- data/rbi/lib/orb/util.rbi +278 -0
- data/rbi/lib/orb/version.rbi +5 -0
- data/sig/orb/client.rbs +53 -0
- data/sig/orb/errors.rbs +201 -0
- data/sig/orb/models/alert.rbs +142 -0
- data/sig/orb/models/alert_create_for_customer_params.rbs +56 -0
- data/sig/orb/models/alert_create_for_external_customer_params.rbs +56 -0
- data/sig/orb/models/alert_create_for_subscription_params.rbs +52 -0
- data/sig/orb/models/alert_disable_params.rbs +20 -0
- data/sig/orb/models/alert_enable_params.rbs +20 -0
- data/sig/orb/models/alert_list_params.rbs +57 -0
- data/sig/orb/models/alert_retrieve_params.rbs +14 -0
- data/sig/orb/models/alert_update_params.rbs +31 -0
- data/sig/orb/models/amount_discount.rbs +40 -0
- data/sig/orb/models/billable_metric.rbs +50 -0
- data/sig/orb/models/billing_cycle_relative_date.rbs +14 -0
- data/sig/orb/models/coupon.rbs +51 -0
- data/sig/orb/models/coupon_archive_params.rbs +14 -0
- data/sig/orb/models/coupon_create_params.rbs +77 -0
- data/sig/orb/models/coupon_fetch_params.rbs +14 -0
- data/sig/orb/models/coupon_list_params.rbs +37 -0
- data/sig/orb/models/coupons/subscription_list_params.rbs +27 -0
- data/sig/orb/models/credit_note.rbs +345 -0
- data/sig/orb/models/credit_note_create_params.rbs +57 -0
- data/sig/orb/models/credit_note_fetch_params.rbs +14 -0
- data/sig/orb/models/credit_note_list_params.rbs +45 -0
- data/sig/orb/models/customer.rbs +628 -0
- data/sig/orb/models/customer_create_params.rbs +624 -0
- data/sig/orb/models/customer_delete_params.rbs +14 -0
- data/sig/orb/models/customer_fetch_by_external_id_params.rbs +14 -0
- data/sig/orb/models/customer_fetch_params.rbs +14 -0
- data/sig/orb/models/customer_list_params.rbs +45 -0
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_by_external_customer_id_params.rbs +15 -0
- data/sig/orb/models/customer_sync_payment_methods_from_gateway_params.rbs +15 -0
- data/sig/orb/models/customer_update_by_external_id_params.rbs +620 -0
- data/sig/orb/models/customer_update_params.rbs +620 -0
- data/sig/orb/models/customers/balance_transaction_create_params.rbs +44 -0
- data/sig/orb/models/customers/balance_transaction_create_response.rbs +114 -0
- data/sig/orb/models/customers/balance_transaction_list_params.rbs +47 -0
- data/sig/orb/models/customers/balance_transaction_list_response.rbs +114 -0
- data/sig/orb/models/customers/cost_list_by_external_id_params.rbs +48 -0
- data/sig/orb/models/customers/cost_list_by_external_id_response.rbs +82 -0
- data/sig/orb/models/customers/cost_list_params.rbs +48 -0
- data/sig/orb/models/customers/cost_list_response.rbs +80 -0
- data/sig/orb/models/customers/credit_list_by_external_id_params.rbs +41 -0
- data/sig/orb/models/customers/credit_list_by_external_id_response.rbs +55 -0
- data/sig/orb/models/customers/credit_list_params.rbs +41 -0
- data/sig/orb/models/customers/credit_list_response.rbs +55 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_params.rbs +120 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_by_external_id_response.rbs +814 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_params.rbs +120 -0
- data/sig/orb/models/customers/credits/ledger_create_entry_response.rbs +814 -0
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_params.rbs +99 -0
- data/sig/orb/models/customers/credits/ledger_list_by_external_id_response.rbs +814 -0
- data/sig/orb/models/customers/credits/ledger_list_params.rbs +99 -0
- data/sig/orb/models/customers/credits/ledger_list_response.rbs +814 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_params.rbs +95 -0
- data/sig/orb/models/customers/credits/top_up_create_by_external_id_response.rbs +90 -0
- data/sig/orb/models/customers/credits/top_up_create_params.rbs +95 -0
- data/sig/orb/models/customers/credits/top_up_create_response.rbs +90 -0
- data/sig/orb/models/customers/credits/top_up_delete_by_external_id_params.rbs +24 -0
- data/sig/orb/models/customers/credits/top_up_delete_params.rbs +24 -0
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_params.rbs +29 -0
- data/sig/orb/models/customers/credits/top_up_list_by_external_id_response.rbs +90 -0
- data/sig/orb/models/customers/credits/top_up_list_params.rbs +29 -0
- data/sig/orb/models/customers/credits/top_up_list_response.rbs +90 -0
- data/sig/orb/models/dimensional_price_group.rbs +38 -0
- data/sig/orb/models/dimensional_price_group_create_params.rbs +39 -0
- data/sig/orb/models/dimensional_price_group_list_params.rbs +25 -0
- data/sig/orb/models/dimensional_price_group_retrieve_params.rbs +15 -0
- data/sig/orb/models/dimensional_price_groups/external_dimensional_price_group_id_retrieve_params.rbs +17 -0
- data/sig/orb/models/dimensional_price_groups.rbs +22 -0
- data/sig/orb/models/discount.rbs +15 -0
- data/sig/orb/models/evaluate_price_group.rbs +34 -0
- data/sig/orb/models/event_deprecate_params.rbs +14 -0
- data/sig/orb/models/event_deprecate_response.rbs +13 -0
- data/sig/orb/models/event_ingest_params.rbs +68 -0
- data/sig/orb/models/event_ingest_response.rbs +53 -0
- data/sig/orb/models/event_search_params.rbs +31 -0
- data/sig/orb/models/event_search_response.rbs +55 -0
- data/sig/orb/models/event_update_params.rbs +39 -0
- data/sig/orb/models/event_update_response.rbs +13 -0
- data/sig/orb/models/events/backfill_close_params.rbs +16 -0
- data/sig/orb/models/events/backfill_close_response.rbs +73 -0
- data/sig/orb/models/events/backfill_create_params.rbs +51 -0
- data/sig/orb/models/events/backfill_create_response.rbs +73 -0
- data/sig/orb/models/events/backfill_fetch_params.rbs +16 -0
- data/sig/orb/models/events/backfill_fetch_response.rbs +73 -0
- data/sig/orb/models/events/backfill_list_params.rbs +27 -0
- data/sig/orb/models/events/backfill_list_response.rbs +73 -0
- data/sig/orb/models/events/backfill_revert_params.rbs +16 -0
- data/sig/orb/models/events/backfill_revert_response.rbs +73 -0
- data/sig/orb/models/events/event_volumes.rbs +39 -0
- data/sig/orb/models/events/volume_list_params.rbs +41 -0
- data/sig/orb/models/invoice.rbs +1430 -0
- data/sig/orb/models/invoice_create_params.rbs +120 -0
- data/sig/orb/models/invoice_fetch_params.rbs +14 -0
- data/sig/orb/models/invoice_fetch_upcoming_params.rbs +20 -0
- data/sig/orb/models/invoice_fetch_upcoming_response.rbs +1430 -0
- data/sig/orb/models/invoice_issue_params.rbs +21 -0
- data/sig/orb/models/invoice_level_discount.rbs +14 -0
- data/sig/orb/models/invoice_line_item_create_params.rbs +43 -0
- data/sig/orb/models/invoice_line_item_create_response.rbs +546 -0
- data/sig/orb/models/invoice_list_params.rbs +122 -0
- data/sig/orb/models/invoice_mark_paid_params.rbs +27 -0
- data/sig/orb/models/invoice_pay_params.rbs +14 -0
- data/sig/orb/models/invoice_update_params.rbs +20 -0
- data/sig/orb/models/invoice_void_params.rbs +14 -0
- data/sig/orb/models/item.rbs +72 -0
- data/sig/orb/models/item_create_params.rbs +19 -0
- data/sig/orb/models/item_fetch_params.rbs +14 -0
- data/sig/orb/models/item_list_params.rbs +25 -0
- data/sig/orb/models/item_update_params.rbs +69 -0
- data/sig/orb/models/metric_create_params.rbs +39 -0
- data/sig/orb/models/metric_fetch_params.rbs +14 -0
- data/sig/orb/models/metric_list_params.rbs +45 -0
- data/sig/orb/models/metric_update_params.rbs +20 -0
- data/sig/orb/models/pagination_metadata.rbs +15 -0
- data/sig/orb/models/percentage_discount.rbs +40 -0
- data/sig/orb/models/plan.rbs +529 -0
- data/sig/orb/models/plan_create_params.rbs +3991 -0
- data/sig/orb/models/plan_fetch_params.rbs +14 -0
- data/sig/orb/models/plan_list_params.rbs +65 -0
- data/sig/orb/models/plan_update_params.rbs +24 -0
- data/sig/orb/models/plans/external_plan_id_fetch_params.rbs +16 -0
- data/sig/orb/models/plans/external_plan_id_update_params.rbs +26 -0
- data/sig/orb/models/price.rbs +8108 -0
- data/sig/orb/models/price_create_params.rbs +520 -0
- data/sig/orb/models/price_evaluate_params.rbs +45 -0
- data/sig/orb/models/price_evaluate_response.rbs +14 -0
- data/sig/orb/models/price_fetch_params.rbs +14 -0
- data/sig/orb/models/price_list_params.rbs +25 -0
- data/sig/orb/models/price_update_params.rbs +20 -0
- data/sig/orb/models/prices/external_price_id_fetch_params.rbs +16 -0
- data/sig/orb/models/prices/external_price_id_update_params.rbs +22 -0
- data/sig/orb/models/subscription.rbs +687 -0
- data/sig/orb/models/subscription_cancel_params.rbs +44 -0
- data/sig/orb/models/subscription_cancel_response.rbs +687 -0
- data/sig/orb/models/subscription_create_params.rbs +9141 -0
- data/sig/orb/models/subscription_create_response.rbs +687 -0
- data/sig/orb/models/subscription_fetch_costs_params.rbs +46 -0
- data/sig/orb/models/subscription_fetch_costs_response.rbs +78 -0
- data/sig/orb/models/subscription_fetch_params.rbs +14 -0
- data/sig/orb/models/subscription_fetch_schedule_params.rbs +45 -0
- data/sig/orb/models/subscription_fetch_schedule_response.rbs +48 -0
- data/sig/orb/models/subscription_fetch_usage_params.rbs +80 -0
- data/sig/orb/models/subscription_list_params.rbs +69 -0
- data/sig/orb/models/subscription_price_intervals_params.rbs +5117 -0
- data/sig/orb/models/subscription_price_intervals_response.rbs +687 -0
- data/sig/orb/models/subscription_schedule_plan_change_params.rbs +9133 -0
- data/sig/orb/models/subscription_schedule_plan_change_response.rbs +687 -0
- data/sig/orb/models/subscription_trigger_phase_params.rbs +24 -0
- data/sig/orb/models/subscription_trigger_phase_response.rbs +687 -0
- data/sig/orb/models/subscription_unschedule_cancellation_params.rbs +15 -0
- data/sig/orb/models/subscription_unschedule_cancellation_response.rbs +687 -0
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_params.rbs +20 -0
- data/sig/orb/models/subscription_unschedule_fixed_fee_quantity_updates_response.rbs +687 -0
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_params.rbs +15 -0
- data/sig/orb/models/subscription_unschedule_pending_plan_changes_response.rbs +687 -0
- data/sig/orb/models/subscription_update_fixed_fee_quantity_params.rbs +55 -0
- data/sig/orb/models/subscription_update_fixed_fee_quantity_response.rbs +687 -0
- data/sig/orb/models/subscription_update_params.rbs +39 -0
- data/sig/orb/models/subscription_update_trial_params.rbs +39 -0
- data/sig/orb/models/subscription_update_trial_response.rbs +687 -0
- data/sig/orb/models/subscription_usage.rbs +196 -0
- data/sig/orb/models/subscriptions.rbs +22 -0
- data/sig/orb/models/top_level_ping_params.rbs +14 -0
- data/sig/orb/models/top_level_ping_response.rbs +13 -0
- data/sig/orb/models/trial_discount.rbs +44 -0
- data/sig/orb/models/usage_discount.rbs +40 -0
- data/sig/orb/page.rbs +22 -0
- data/sig/orb/request_options.rbs +32 -0
- data/sig/orb/resources/alerts.rbs +67 -0
- data/sig/orb/resources/coupons/subscriptions.rbs +16 -0
- data/sig/orb/resources/coupons.rbs +35 -0
- data/sig/orb/resources/credit_notes.rbs +29 -0
- data/sig/orb/resources/customers/balance_transactions.rbs +28 -0
- data/sig/orb/resources/customers/costs.rbs +27 -0
- data/sig/orb/resources/customers/credits/ledger.rbs +75 -0
- data/sig/orb/resources/customers/credits/top_ups.rbs +63 -0
- data/sig/orb/resources/customers/credits.rbs +31 -0
- data/sig/orb/resources/customers.rbs +114 -0
- data/sig/orb/resources/dimensional_price_groups/external_dimensional_price_group_id.rbs +14 -0
- data/sig/orb/resources/dimensional_price_groups.rbs +29 -0
- data/sig/orb/resources/events/backfills.rbs +41 -0
- data/sig/orb/resources/events/volume.rbs +17 -0
- data/sig/orb/resources/events.rbs +40 -0
- data/sig/orb/resources/invoice_line_items.rbs +17 -0
- data/sig/orb/resources/invoices.rbs +84 -0
- data/sig/orb/resources/items.rbs +30 -0
- data/sig/orb/resources/metrics.rbs +37 -0
- data/sig/orb/resources/plans/external_plan_id.rbs +21 -0
- data/sig/orb/resources/plans.rbs +44 -0
- data/sig/orb/resources/prices/external_price_id.rbs +20 -0
- data/sig/orb/resources/prices.rbs +83 -0
- data/sig/orb/resources/subscriptions.rbs +194 -0
- data/sig/orb/resources/top_level.rbs +11 -0
- data/sig/orb/transport/base_client.rbs +110 -0
- data/sig/orb/transport/pooled_net_requester.rbs +39 -0
- data/sig/orb/type/array_of.rbs +36 -0
- data/sig/orb/type/base_model.rbs +77 -0
- data/sig/orb/type/base_page.rbs +22 -0
- data/sig/orb/type/boolean_model.rbs +18 -0
- data/sig/orb/type/converter.rbs +36 -0
- data/sig/orb/type/enum.rbs +22 -0
- data/sig/orb/type/hash_of.rbs +36 -0
- data/sig/orb/type/request_parameters.rbs +13 -0
- data/sig/orb/type/union.rbs +37 -0
- data/sig/orb/type/unknown.rbs +15 -0
- data/sig/orb/type.rbs +22 -0
- data/sig/orb/util.rbs +132 -0
- data/sig/orb/version.rbs +3 -0
- metadata +692 -0
@@ -0,0 +1,1381 @@
|
|
1
|
+
# typed: strong
|
2
|
+
|
3
|
+
module Orb
|
4
|
+
module Models
|
5
|
+
class SubscriptionTriggerPhaseResponse < Orb::BaseModel
|
6
|
+
sig { returns(String) }
|
7
|
+
attr_accessor :id
|
8
|
+
|
9
|
+
# The current plan phase that is active, only if the subscription's plan has
|
10
|
+
# phases.
|
11
|
+
sig { returns(T.nilable(Integer)) }
|
12
|
+
attr_accessor :active_plan_phase_order
|
13
|
+
|
14
|
+
# The adjustment intervals for this subscription sorted by the start_date of the
|
15
|
+
# adjustment interval.
|
16
|
+
sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval]) }
|
17
|
+
attr_accessor :adjustment_intervals
|
18
|
+
|
19
|
+
# Determines whether issued invoices for this subscription will automatically be
|
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
|
+
sig { returns(T.nilable(T::Boolean)) }
|
23
|
+
attr_accessor :auto_collection
|
24
|
+
|
25
|
+
sig { returns(Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration) }
|
26
|
+
attr_reader :billing_cycle_anchor_configuration
|
27
|
+
|
28
|
+
sig do
|
29
|
+
params(
|
30
|
+
billing_cycle_anchor_configuration: T.any(Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, Orb::Util::AnyHash)
|
31
|
+
)
|
32
|
+
.void
|
33
|
+
end
|
34
|
+
attr_writer :billing_cycle_anchor_configuration
|
35
|
+
|
36
|
+
# The day of the month on which the billing cycle is anchored. If the maximum
|
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
|
+
sig { returns(Integer) }
|
41
|
+
attr_accessor :billing_cycle_day
|
42
|
+
|
43
|
+
sig { returns(Time) }
|
44
|
+
attr_accessor :created_at
|
45
|
+
|
46
|
+
# The end of the current billing period. This is an exclusive timestamp, such that
|
47
|
+
# the instant returned is not part of the billing period. Set to null for
|
48
|
+
# subscriptions that are not currently active.
|
49
|
+
sig { returns(T.nilable(Time)) }
|
50
|
+
attr_accessor :current_billing_period_end_date
|
51
|
+
|
52
|
+
# The start date of the current billing period. This is an inclusive timestamp;
|
53
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
54
|
+
# if the subscription is not currently active.
|
55
|
+
sig { returns(T.nilable(Time)) }
|
56
|
+
attr_accessor :current_billing_period_start_date
|
57
|
+
|
58
|
+
# A customer is a buyer of your products, and the other party to the billing
|
59
|
+
# relationship.
|
60
|
+
#
|
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
|
+
#
|
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
|
+
#
|
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
|
+
sig { returns(Orb::Models::Customer) }
|
77
|
+
attr_reader :customer
|
78
|
+
|
79
|
+
sig { params(customer: T.any(Orb::Models::Customer, Orb::Util::AnyHash)).void }
|
80
|
+
attr_writer :customer
|
81
|
+
|
82
|
+
# Determines the default memo on this subscriptions' invoices. Note that if this
|
83
|
+
# is not provided, it is determined by the plan configuration.
|
84
|
+
sig { returns(T.nilable(String)) }
|
85
|
+
attr_accessor :default_invoice_memo
|
86
|
+
|
87
|
+
# The discount intervals for this subscription sorted by the start_date.
|
88
|
+
sig do
|
89
|
+
returns(
|
90
|
+
T::Array[
|
91
|
+
T.any(
|
92
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval,
|
93
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval,
|
94
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval
|
95
|
+
)
|
96
|
+
]
|
97
|
+
)
|
98
|
+
end
|
99
|
+
attr_accessor :discount_intervals
|
100
|
+
|
101
|
+
# The date Orb stops billing for this subscription.
|
102
|
+
sig { returns(T.nilable(Time)) }
|
103
|
+
attr_accessor :end_date
|
104
|
+
|
105
|
+
sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule]) }
|
106
|
+
attr_accessor :fixed_fee_quantity_schedule
|
107
|
+
|
108
|
+
sig { returns(T.nilable(String)) }
|
109
|
+
attr_accessor :invoicing_threshold
|
110
|
+
|
111
|
+
# The maximum intervals for this subscription sorted by the start_date.
|
112
|
+
sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval]) }
|
113
|
+
attr_accessor :maximum_intervals
|
114
|
+
|
115
|
+
# User specified key-value pairs for the resource. If not present, this defaults
|
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
|
+
sig { returns(T::Hash[Symbol, String]) }
|
120
|
+
attr_accessor :metadata
|
121
|
+
|
122
|
+
# The minimum intervals for this subscription sorted by the start_date.
|
123
|
+
sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval]) }
|
124
|
+
attr_accessor :minimum_intervals
|
125
|
+
|
126
|
+
# Determines the difference between the invoice issue date for subscription
|
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
|
+
sig { returns(Integer) }
|
131
|
+
attr_accessor :net_terms
|
132
|
+
|
133
|
+
# The [Plan](/core-concepts#plan-and-price) resource represents a plan that can be
|
134
|
+
# subscribed to by a customer. Plans define the billing behavior of the
|
135
|
+
# subscription. You can see more about how to configure prices in the
|
136
|
+
# [Price resource](/reference/price).
|
137
|
+
sig { returns(Orb::Models::Plan) }
|
138
|
+
attr_reader :plan
|
139
|
+
|
140
|
+
sig { params(plan: T.any(Orb::Models::Plan, Orb::Util::AnyHash)).void }
|
141
|
+
attr_writer :plan
|
142
|
+
|
143
|
+
# The price intervals for this subscription.
|
144
|
+
sig { returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval]) }
|
145
|
+
attr_accessor :price_intervals
|
146
|
+
|
147
|
+
sig { returns(T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon)) }
|
148
|
+
attr_reader :redeemed_coupon
|
149
|
+
|
150
|
+
sig do
|
151
|
+
params(
|
152
|
+
redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon, Orb::Util::AnyHash))
|
153
|
+
)
|
154
|
+
.void
|
155
|
+
end
|
156
|
+
attr_writer :redeemed_coupon
|
157
|
+
|
158
|
+
# The date Orb starts billing for this subscription.
|
159
|
+
sig { returns(Time) }
|
160
|
+
attr_accessor :start_date
|
161
|
+
|
162
|
+
sig { returns(Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol) }
|
163
|
+
attr_accessor :status
|
164
|
+
|
165
|
+
sig { returns(Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo) }
|
166
|
+
attr_reader :trial_info
|
167
|
+
|
168
|
+
sig do
|
169
|
+
params(trial_info: T.any(Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo, Orb::Util::AnyHash))
|
170
|
+
.void
|
171
|
+
end
|
172
|
+
attr_writer :trial_info
|
173
|
+
|
174
|
+
sig do
|
175
|
+
params(
|
176
|
+
id: String,
|
177
|
+
active_plan_phase_order: T.nilable(Integer),
|
178
|
+
adjustment_intervals: T::Array[T.any(Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval, Orb::Util::AnyHash)],
|
179
|
+
auto_collection: T.nilable(T::Boolean),
|
180
|
+
billing_cycle_anchor_configuration: T.any(Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration, Orb::Util::AnyHash),
|
181
|
+
billing_cycle_day: Integer,
|
182
|
+
created_at: Time,
|
183
|
+
current_billing_period_end_date: T.nilable(Time),
|
184
|
+
current_billing_period_start_date: T.nilable(Time),
|
185
|
+
customer: T.any(Orb::Models::Customer, Orb::Util::AnyHash),
|
186
|
+
default_invoice_memo: T.nilable(String),
|
187
|
+
discount_intervals: T::Array[
|
188
|
+
T.any(
|
189
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval,
|
190
|
+
Orb::Util::AnyHash,
|
191
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval,
|
192
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval
|
193
|
+
)
|
194
|
+
],
|
195
|
+
end_date: T.nilable(Time),
|
196
|
+
fixed_fee_quantity_schedule: T::Array[T.any(Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule, Orb::Util::AnyHash)],
|
197
|
+
invoicing_threshold: T.nilable(String),
|
198
|
+
maximum_intervals: T::Array[T.any(Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval, Orb::Util::AnyHash)],
|
199
|
+
metadata: T::Hash[Symbol, String],
|
200
|
+
minimum_intervals: T::Array[T.any(Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval, Orb::Util::AnyHash)],
|
201
|
+
net_terms: Integer,
|
202
|
+
plan: T.any(Orb::Models::Plan, Orb::Util::AnyHash),
|
203
|
+
price_intervals: T::Array[T.any(Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval, Orb::Util::AnyHash)],
|
204
|
+
redeemed_coupon: T.nilable(T.any(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon, Orb::Util::AnyHash)),
|
205
|
+
start_date: Time,
|
206
|
+
status: Orb::Models::SubscriptionTriggerPhaseResponse::Status::OrSymbol,
|
207
|
+
trial_info: T.any(Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo, Orb::Util::AnyHash)
|
208
|
+
)
|
209
|
+
.returns(T.attached_class)
|
210
|
+
end
|
211
|
+
def self.new(
|
212
|
+
id:,
|
213
|
+
active_plan_phase_order:,
|
214
|
+
adjustment_intervals:,
|
215
|
+
auto_collection:,
|
216
|
+
billing_cycle_anchor_configuration:,
|
217
|
+
billing_cycle_day:,
|
218
|
+
created_at:,
|
219
|
+
current_billing_period_end_date:,
|
220
|
+
current_billing_period_start_date:,
|
221
|
+
customer:,
|
222
|
+
default_invoice_memo:,
|
223
|
+
discount_intervals:,
|
224
|
+
end_date:,
|
225
|
+
fixed_fee_quantity_schedule:,
|
226
|
+
invoicing_threshold:,
|
227
|
+
maximum_intervals:,
|
228
|
+
metadata:,
|
229
|
+
minimum_intervals:,
|
230
|
+
net_terms:,
|
231
|
+
plan:,
|
232
|
+
price_intervals:,
|
233
|
+
redeemed_coupon:,
|
234
|
+
start_date:,
|
235
|
+
status:,
|
236
|
+
trial_info:
|
237
|
+
)
|
238
|
+
end
|
239
|
+
|
240
|
+
sig do
|
241
|
+
override
|
242
|
+
.returns(
|
243
|
+
{
|
244
|
+
id: String,
|
245
|
+
active_plan_phase_order: T.nilable(Integer),
|
246
|
+
adjustment_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval],
|
247
|
+
auto_collection: T.nilable(T::Boolean),
|
248
|
+
billing_cycle_anchor_configuration: Orb::Models::SubscriptionTriggerPhaseResponse::BillingCycleAnchorConfiguration,
|
249
|
+
billing_cycle_day: Integer,
|
250
|
+
created_at: Time,
|
251
|
+
current_billing_period_end_date: T.nilable(Time),
|
252
|
+
current_billing_period_start_date: T.nilable(Time),
|
253
|
+
customer: Orb::Models::Customer,
|
254
|
+
default_invoice_memo: T.nilable(String),
|
255
|
+
discount_intervals: T::Array[
|
256
|
+
T.any(
|
257
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval,
|
258
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval,
|
259
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval
|
260
|
+
)
|
261
|
+
],
|
262
|
+
end_date: T.nilable(Time),
|
263
|
+
fixed_fee_quantity_schedule: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::FixedFeeQuantitySchedule],
|
264
|
+
invoicing_threshold: T.nilable(String),
|
265
|
+
maximum_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MaximumInterval],
|
266
|
+
metadata: T::Hash[Symbol, String],
|
267
|
+
minimum_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::MinimumInterval],
|
268
|
+
net_terms: Integer,
|
269
|
+
plan: Orb::Models::Plan,
|
270
|
+
price_intervals: T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval],
|
271
|
+
redeemed_coupon: T.nilable(Orb::Models::SubscriptionTriggerPhaseResponse::RedeemedCoupon),
|
272
|
+
start_date: Time,
|
273
|
+
status: Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol,
|
274
|
+
trial_info: Orb::Models::SubscriptionTriggerPhaseResponse::TrialInfo
|
275
|
+
}
|
276
|
+
)
|
277
|
+
end
|
278
|
+
def to_hash
|
279
|
+
end
|
280
|
+
|
281
|
+
class AdjustmentInterval < Orb::BaseModel
|
282
|
+
sig { returns(String) }
|
283
|
+
attr_accessor :id
|
284
|
+
|
285
|
+
sig do
|
286
|
+
returns(
|
287
|
+
T.any(
|
288
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment,
|
289
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment,
|
290
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment,
|
291
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment,
|
292
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment
|
293
|
+
)
|
294
|
+
)
|
295
|
+
end
|
296
|
+
attr_accessor :adjustment
|
297
|
+
|
298
|
+
# The price interval IDs that this adjustment applies to.
|
299
|
+
sig { returns(T::Array[String]) }
|
300
|
+
attr_accessor :applies_to_price_interval_ids
|
301
|
+
|
302
|
+
# The end date of the adjustment interval.
|
303
|
+
sig { returns(T.nilable(Time)) }
|
304
|
+
attr_accessor :end_date
|
305
|
+
|
306
|
+
# The start date of the adjustment interval.
|
307
|
+
sig { returns(Time) }
|
308
|
+
attr_accessor :start_date
|
309
|
+
|
310
|
+
sig do
|
311
|
+
params(
|
312
|
+
id: String,
|
313
|
+
adjustment: T.any(
|
314
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment,
|
315
|
+
Orb::Util::AnyHash,
|
316
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment,
|
317
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment,
|
318
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment,
|
319
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment
|
320
|
+
),
|
321
|
+
applies_to_price_interval_ids: T::Array[String],
|
322
|
+
end_date: T.nilable(Time),
|
323
|
+
start_date: Time
|
324
|
+
)
|
325
|
+
.returns(T.attached_class)
|
326
|
+
end
|
327
|
+
def self.new(id:, adjustment:, applies_to_price_interval_ids:, end_date:, start_date:)
|
328
|
+
end
|
329
|
+
|
330
|
+
sig do
|
331
|
+
override
|
332
|
+
.returns(
|
333
|
+
{
|
334
|
+
id: String,
|
335
|
+
adjustment: T.any(
|
336
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment,
|
337
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment,
|
338
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment,
|
339
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment,
|
340
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment
|
341
|
+
),
|
342
|
+
applies_to_price_interval_ids: T::Array[String],
|
343
|
+
end_date: T.nilable(Time),
|
344
|
+
start_date: Time
|
345
|
+
}
|
346
|
+
)
|
347
|
+
end
|
348
|
+
def to_hash
|
349
|
+
end
|
350
|
+
|
351
|
+
module Adjustment
|
352
|
+
extend Orb::Union
|
353
|
+
|
354
|
+
class PlanPhaseUsageDiscountAdjustment < Orb::BaseModel
|
355
|
+
sig { returns(String) }
|
356
|
+
attr_accessor :id
|
357
|
+
|
358
|
+
sig { returns(Symbol) }
|
359
|
+
attr_accessor :adjustment_type
|
360
|
+
|
361
|
+
# The price IDs that this adjustment applies to.
|
362
|
+
sig { returns(T::Array[String]) }
|
363
|
+
attr_accessor :applies_to_price_ids
|
364
|
+
|
365
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
366
|
+
# that apply to only one price.
|
367
|
+
sig { returns(T::Boolean) }
|
368
|
+
attr_accessor :is_invoice_level
|
369
|
+
|
370
|
+
# The plan phase in which this adjustment is active.
|
371
|
+
sig { returns(T.nilable(Integer)) }
|
372
|
+
attr_accessor :plan_phase_order
|
373
|
+
|
374
|
+
# The reason for the adjustment.
|
375
|
+
sig { returns(T.nilable(String)) }
|
376
|
+
attr_accessor :reason
|
377
|
+
|
378
|
+
# The number of usage units by which to discount the price this adjustment applies
|
379
|
+
# to in a given billing period.
|
380
|
+
sig { returns(Float) }
|
381
|
+
attr_accessor :usage_discount
|
382
|
+
|
383
|
+
sig do
|
384
|
+
params(
|
385
|
+
id: String,
|
386
|
+
applies_to_price_ids: T::Array[String],
|
387
|
+
is_invoice_level: T::Boolean,
|
388
|
+
plan_phase_order: T.nilable(Integer),
|
389
|
+
reason: T.nilable(String),
|
390
|
+
usage_discount: Float,
|
391
|
+
adjustment_type: Symbol
|
392
|
+
)
|
393
|
+
.returns(T.attached_class)
|
394
|
+
end
|
395
|
+
def self.new(
|
396
|
+
id:,
|
397
|
+
applies_to_price_ids:,
|
398
|
+
is_invoice_level:,
|
399
|
+
plan_phase_order:,
|
400
|
+
reason:,
|
401
|
+
usage_discount:,
|
402
|
+
adjustment_type: :usage_discount
|
403
|
+
)
|
404
|
+
end
|
405
|
+
|
406
|
+
sig do
|
407
|
+
override
|
408
|
+
.returns(
|
409
|
+
{
|
410
|
+
id: String,
|
411
|
+
adjustment_type: Symbol,
|
412
|
+
applies_to_price_ids: T::Array[String],
|
413
|
+
is_invoice_level: T::Boolean,
|
414
|
+
plan_phase_order: T.nilable(Integer),
|
415
|
+
reason: T.nilable(String),
|
416
|
+
usage_discount: Float
|
417
|
+
}
|
418
|
+
)
|
419
|
+
end
|
420
|
+
def to_hash
|
421
|
+
end
|
422
|
+
end
|
423
|
+
|
424
|
+
class PlanPhaseAmountDiscountAdjustment < Orb::BaseModel
|
425
|
+
sig { returns(String) }
|
426
|
+
attr_accessor :id
|
427
|
+
|
428
|
+
sig { returns(Symbol) }
|
429
|
+
attr_accessor :adjustment_type
|
430
|
+
|
431
|
+
# The amount by which to discount the prices this adjustment applies to in a given
|
432
|
+
# billing period.
|
433
|
+
sig { returns(String) }
|
434
|
+
attr_accessor :amount_discount
|
435
|
+
|
436
|
+
# The price IDs that this adjustment applies to.
|
437
|
+
sig { returns(T::Array[String]) }
|
438
|
+
attr_accessor :applies_to_price_ids
|
439
|
+
|
440
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
441
|
+
# that apply to only one price.
|
442
|
+
sig { returns(T::Boolean) }
|
443
|
+
attr_accessor :is_invoice_level
|
444
|
+
|
445
|
+
# The plan phase in which this adjustment is active.
|
446
|
+
sig { returns(T.nilable(Integer)) }
|
447
|
+
attr_accessor :plan_phase_order
|
448
|
+
|
449
|
+
# The reason for the adjustment.
|
450
|
+
sig { returns(T.nilable(String)) }
|
451
|
+
attr_accessor :reason
|
452
|
+
|
453
|
+
sig do
|
454
|
+
params(
|
455
|
+
id: String,
|
456
|
+
amount_discount: String,
|
457
|
+
applies_to_price_ids: T::Array[String],
|
458
|
+
is_invoice_level: T::Boolean,
|
459
|
+
plan_phase_order: T.nilable(Integer),
|
460
|
+
reason: T.nilable(String),
|
461
|
+
adjustment_type: Symbol
|
462
|
+
)
|
463
|
+
.returns(T.attached_class)
|
464
|
+
end
|
465
|
+
def self.new(
|
466
|
+
id:,
|
467
|
+
amount_discount:,
|
468
|
+
applies_to_price_ids:,
|
469
|
+
is_invoice_level:,
|
470
|
+
plan_phase_order:,
|
471
|
+
reason:,
|
472
|
+
adjustment_type: :amount_discount
|
473
|
+
)
|
474
|
+
end
|
475
|
+
|
476
|
+
sig do
|
477
|
+
override
|
478
|
+
.returns(
|
479
|
+
{
|
480
|
+
id: String,
|
481
|
+
adjustment_type: Symbol,
|
482
|
+
amount_discount: String,
|
483
|
+
applies_to_price_ids: T::Array[String],
|
484
|
+
is_invoice_level: T::Boolean,
|
485
|
+
plan_phase_order: T.nilable(Integer),
|
486
|
+
reason: T.nilable(String)
|
487
|
+
}
|
488
|
+
)
|
489
|
+
end
|
490
|
+
def to_hash
|
491
|
+
end
|
492
|
+
end
|
493
|
+
|
494
|
+
class PlanPhasePercentageDiscountAdjustment < Orb::BaseModel
|
495
|
+
sig { returns(String) }
|
496
|
+
attr_accessor :id
|
497
|
+
|
498
|
+
sig { returns(Symbol) }
|
499
|
+
attr_accessor :adjustment_type
|
500
|
+
|
501
|
+
# The price IDs that this adjustment applies to.
|
502
|
+
sig { returns(T::Array[String]) }
|
503
|
+
attr_accessor :applies_to_price_ids
|
504
|
+
|
505
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
506
|
+
# that apply to only one price.
|
507
|
+
sig { returns(T::Boolean) }
|
508
|
+
attr_accessor :is_invoice_level
|
509
|
+
|
510
|
+
# The percentage (as a value between 0 and 1) by which to discount the price
|
511
|
+
# intervals this adjustment applies to in a given billing period.
|
512
|
+
sig { returns(Float) }
|
513
|
+
attr_accessor :percentage_discount
|
514
|
+
|
515
|
+
# The plan phase in which this adjustment is active.
|
516
|
+
sig { returns(T.nilable(Integer)) }
|
517
|
+
attr_accessor :plan_phase_order
|
518
|
+
|
519
|
+
# The reason for the adjustment.
|
520
|
+
sig { returns(T.nilable(String)) }
|
521
|
+
attr_accessor :reason
|
522
|
+
|
523
|
+
sig do
|
524
|
+
params(
|
525
|
+
id: String,
|
526
|
+
applies_to_price_ids: T::Array[String],
|
527
|
+
is_invoice_level: T::Boolean,
|
528
|
+
percentage_discount: Float,
|
529
|
+
plan_phase_order: T.nilable(Integer),
|
530
|
+
reason: T.nilable(String),
|
531
|
+
adjustment_type: Symbol
|
532
|
+
)
|
533
|
+
.returns(T.attached_class)
|
534
|
+
end
|
535
|
+
def self.new(
|
536
|
+
id:,
|
537
|
+
applies_to_price_ids:,
|
538
|
+
is_invoice_level:,
|
539
|
+
percentage_discount:,
|
540
|
+
plan_phase_order:,
|
541
|
+
reason:,
|
542
|
+
adjustment_type: :percentage_discount
|
543
|
+
)
|
544
|
+
end
|
545
|
+
|
546
|
+
sig do
|
547
|
+
override
|
548
|
+
.returns(
|
549
|
+
{
|
550
|
+
id: String,
|
551
|
+
adjustment_type: Symbol,
|
552
|
+
applies_to_price_ids: T::Array[String],
|
553
|
+
is_invoice_level: T::Boolean,
|
554
|
+
percentage_discount: Float,
|
555
|
+
plan_phase_order: T.nilable(Integer),
|
556
|
+
reason: T.nilable(String)
|
557
|
+
}
|
558
|
+
)
|
559
|
+
end
|
560
|
+
def to_hash
|
561
|
+
end
|
562
|
+
end
|
563
|
+
|
564
|
+
class PlanPhaseMinimumAdjustment < Orb::BaseModel
|
565
|
+
sig { returns(String) }
|
566
|
+
attr_accessor :id
|
567
|
+
|
568
|
+
sig { returns(Symbol) }
|
569
|
+
attr_accessor :adjustment_type
|
570
|
+
|
571
|
+
# The price IDs that this adjustment applies to.
|
572
|
+
sig { returns(T::Array[String]) }
|
573
|
+
attr_accessor :applies_to_price_ids
|
574
|
+
|
575
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
576
|
+
# that apply to only one price.
|
577
|
+
sig { returns(T::Boolean) }
|
578
|
+
attr_accessor :is_invoice_level
|
579
|
+
|
580
|
+
# The item ID that revenue from this minimum will be attributed to.
|
581
|
+
sig { returns(String) }
|
582
|
+
attr_accessor :item_id
|
583
|
+
|
584
|
+
# The minimum amount to charge in a given billing period for the prices this
|
585
|
+
# adjustment applies to.
|
586
|
+
sig { returns(String) }
|
587
|
+
attr_accessor :minimum_amount
|
588
|
+
|
589
|
+
# The plan phase in which this adjustment is active.
|
590
|
+
sig { returns(T.nilable(Integer)) }
|
591
|
+
attr_accessor :plan_phase_order
|
592
|
+
|
593
|
+
# The reason for the adjustment.
|
594
|
+
sig { returns(T.nilable(String)) }
|
595
|
+
attr_accessor :reason
|
596
|
+
|
597
|
+
sig do
|
598
|
+
params(
|
599
|
+
id: String,
|
600
|
+
applies_to_price_ids: T::Array[String],
|
601
|
+
is_invoice_level: T::Boolean,
|
602
|
+
item_id: String,
|
603
|
+
minimum_amount: String,
|
604
|
+
plan_phase_order: T.nilable(Integer),
|
605
|
+
reason: T.nilable(String),
|
606
|
+
adjustment_type: Symbol
|
607
|
+
)
|
608
|
+
.returns(T.attached_class)
|
609
|
+
end
|
610
|
+
def self.new(
|
611
|
+
id:,
|
612
|
+
applies_to_price_ids:,
|
613
|
+
is_invoice_level:,
|
614
|
+
item_id:,
|
615
|
+
minimum_amount:,
|
616
|
+
plan_phase_order:,
|
617
|
+
reason:,
|
618
|
+
adjustment_type: :minimum
|
619
|
+
)
|
620
|
+
end
|
621
|
+
|
622
|
+
sig do
|
623
|
+
override
|
624
|
+
.returns(
|
625
|
+
{
|
626
|
+
id: String,
|
627
|
+
adjustment_type: Symbol,
|
628
|
+
applies_to_price_ids: T::Array[String],
|
629
|
+
is_invoice_level: T::Boolean,
|
630
|
+
item_id: String,
|
631
|
+
minimum_amount: String,
|
632
|
+
plan_phase_order: T.nilable(Integer),
|
633
|
+
reason: T.nilable(String)
|
634
|
+
}
|
635
|
+
)
|
636
|
+
end
|
637
|
+
def to_hash
|
638
|
+
end
|
639
|
+
end
|
640
|
+
|
641
|
+
class PlanPhaseMaximumAdjustment < Orb::BaseModel
|
642
|
+
sig { returns(String) }
|
643
|
+
attr_accessor :id
|
644
|
+
|
645
|
+
sig { returns(Symbol) }
|
646
|
+
attr_accessor :adjustment_type
|
647
|
+
|
648
|
+
# The price IDs that this adjustment applies to.
|
649
|
+
sig { returns(T::Array[String]) }
|
650
|
+
attr_accessor :applies_to_price_ids
|
651
|
+
|
652
|
+
# True for adjustments that apply to an entire invocice, false for adjustments
|
653
|
+
# that apply to only one price.
|
654
|
+
sig { returns(T::Boolean) }
|
655
|
+
attr_accessor :is_invoice_level
|
656
|
+
|
657
|
+
# The maximum amount to charge in a given billing period for the prices this
|
658
|
+
# adjustment applies to.
|
659
|
+
sig { returns(String) }
|
660
|
+
attr_accessor :maximum_amount
|
661
|
+
|
662
|
+
# The plan phase in which this adjustment is active.
|
663
|
+
sig { returns(T.nilable(Integer)) }
|
664
|
+
attr_accessor :plan_phase_order
|
665
|
+
|
666
|
+
# The reason for the adjustment.
|
667
|
+
sig { returns(T.nilable(String)) }
|
668
|
+
attr_accessor :reason
|
669
|
+
|
670
|
+
sig do
|
671
|
+
params(
|
672
|
+
id: String,
|
673
|
+
applies_to_price_ids: T::Array[String],
|
674
|
+
is_invoice_level: T::Boolean,
|
675
|
+
maximum_amount: String,
|
676
|
+
plan_phase_order: T.nilable(Integer),
|
677
|
+
reason: T.nilable(String),
|
678
|
+
adjustment_type: Symbol
|
679
|
+
)
|
680
|
+
.returns(T.attached_class)
|
681
|
+
end
|
682
|
+
def self.new(
|
683
|
+
id:,
|
684
|
+
applies_to_price_ids:,
|
685
|
+
is_invoice_level:,
|
686
|
+
maximum_amount:,
|
687
|
+
plan_phase_order:,
|
688
|
+
reason:,
|
689
|
+
adjustment_type: :maximum
|
690
|
+
)
|
691
|
+
end
|
692
|
+
|
693
|
+
sig do
|
694
|
+
override
|
695
|
+
.returns(
|
696
|
+
{
|
697
|
+
id: String,
|
698
|
+
adjustment_type: Symbol,
|
699
|
+
applies_to_price_ids: T::Array[String],
|
700
|
+
is_invoice_level: T::Boolean,
|
701
|
+
maximum_amount: String,
|
702
|
+
plan_phase_order: T.nilable(Integer),
|
703
|
+
reason: T.nilable(String)
|
704
|
+
}
|
705
|
+
)
|
706
|
+
end
|
707
|
+
def to_hash
|
708
|
+
end
|
709
|
+
end
|
710
|
+
|
711
|
+
sig do
|
712
|
+
override
|
713
|
+
.returns(
|
714
|
+
[Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseUsageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseAmountDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhasePercentageDiscountAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMinimumAdjustment, Orb::Models::SubscriptionTriggerPhaseResponse::AdjustmentInterval::Adjustment::PlanPhaseMaximumAdjustment]
|
715
|
+
)
|
716
|
+
end
|
717
|
+
def self.variants
|
718
|
+
end
|
719
|
+
end
|
720
|
+
end
|
721
|
+
|
722
|
+
class BillingCycleAnchorConfiguration < Orb::BaseModel
|
723
|
+
# The day of the month on which the billing cycle is anchored. If the maximum
|
724
|
+
# number of days in a month is greater than this value, the last day of the month
|
725
|
+
# is the billing cycle day (e.g. billing_cycle_day=31 for April means the billing
|
726
|
+
# period begins on the 30th.
|
727
|
+
sig { returns(Integer) }
|
728
|
+
attr_accessor :day
|
729
|
+
|
730
|
+
# The month on which the billing cycle is anchored (e.g. a quarterly price
|
731
|
+
# anchored in February would have cycles starting February, May, August, and
|
732
|
+
# November).
|
733
|
+
sig { returns(T.nilable(Integer)) }
|
734
|
+
attr_accessor :month
|
735
|
+
|
736
|
+
# The year on which the billing cycle is anchored (e.g. a 2 year billing cycle
|
737
|
+
# anchored on 2021 would have cycles starting on 2021, 2023, 2025, etc.).
|
738
|
+
sig { returns(T.nilable(Integer)) }
|
739
|
+
attr_accessor :year
|
740
|
+
|
741
|
+
sig do
|
742
|
+
params(day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)).returns(T.attached_class)
|
743
|
+
end
|
744
|
+
def self.new(day:, month: nil, year: nil)
|
745
|
+
end
|
746
|
+
|
747
|
+
sig { override.returns({day: Integer, month: T.nilable(Integer), year: T.nilable(Integer)}) }
|
748
|
+
def to_hash
|
749
|
+
end
|
750
|
+
end
|
751
|
+
|
752
|
+
module DiscountInterval
|
753
|
+
extend Orb::Union
|
754
|
+
|
755
|
+
class AmountDiscountInterval < Orb::BaseModel
|
756
|
+
# Only available if discount_type is `amount`.
|
757
|
+
sig { returns(String) }
|
758
|
+
attr_accessor :amount_discount
|
759
|
+
|
760
|
+
# The price ids that this discount interval applies to.
|
761
|
+
sig { returns(T::Array[String]) }
|
762
|
+
attr_accessor :applies_to_price_ids
|
763
|
+
|
764
|
+
# The price interval ids that this discount interval applies to.
|
765
|
+
sig { returns(T::Array[String]) }
|
766
|
+
attr_accessor :applies_to_price_interval_ids
|
767
|
+
|
768
|
+
sig { returns(Symbol) }
|
769
|
+
attr_accessor :discount_type
|
770
|
+
|
771
|
+
# The end date of the discount interval.
|
772
|
+
sig { returns(T.nilable(Time)) }
|
773
|
+
attr_accessor :end_date
|
774
|
+
|
775
|
+
# The start date of the discount interval.
|
776
|
+
sig { returns(Time) }
|
777
|
+
attr_accessor :start_date
|
778
|
+
|
779
|
+
sig do
|
780
|
+
params(
|
781
|
+
amount_discount: String,
|
782
|
+
applies_to_price_ids: T::Array[String],
|
783
|
+
applies_to_price_interval_ids: T::Array[String],
|
784
|
+
end_date: T.nilable(Time),
|
785
|
+
start_date: Time,
|
786
|
+
discount_type: Symbol
|
787
|
+
)
|
788
|
+
.returns(T.attached_class)
|
789
|
+
end
|
790
|
+
def self.new(
|
791
|
+
amount_discount:,
|
792
|
+
applies_to_price_ids:,
|
793
|
+
applies_to_price_interval_ids:,
|
794
|
+
end_date:,
|
795
|
+
start_date:,
|
796
|
+
discount_type: :amount
|
797
|
+
)
|
798
|
+
end
|
799
|
+
|
800
|
+
sig do
|
801
|
+
override
|
802
|
+
.returns(
|
803
|
+
{
|
804
|
+
amount_discount: String,
|
805
|
+
applies_to_price_ids: T::Array[String],
|
806
|
+
applies_to_price_interval_ids: T::Array[String],
|
807
|
+
discount_type: Symbol,
|
808
|
+
end_date: T.nilable(Time),
|
809
|
+
start_date: Time
|
810
|
+
}
|
811
|
+
)
|
812
|
+
end
|
813
|
+
def to_hash
|
814
|
+
end
|
815
|
+
end
|
816
|
+
|
817
|
+
class PercentageDiscountInterval < Orb::BaseModel
|
818
|
+
# The price ids that this discount interval applies to.
|
819
|
+
sig { returns(T::Array[String]) }
|
820
|
+
attr_accessor :applies_to_price_ids
|
821
|
+
|
822
|
+
# The price interval ids that this discount interval applies to.
|
823
|
+
sig { returns(T::Array[String]) }
|
824
|
+
attr_accessor :applies_to_price_interval_ids
|
825
|
+
|
826
|
+
sig { returns(Symbol) }
|
827
|
+
attr_accessor :discount_type
|
828
|
+
|
829
|
+
# The end date of the discount interval.
|
830
|
+
sig { returns(T.nilable(Time)) }
|
831
|
+
attr_accessor :end_date
|
832
|
+
|
833
|
+
# Only available if discount_type is `percentage`.This is a number between 0
|
834
|
+
# and 1.
|
835
|
+
sig { returns(Float) }
|
836
|
+
attr_accessor :percentage_discount
|
837
|
+
|
838
|
+
# The start date of the discount interval.
|
839
|
+
sig { returns(Time) }
|
840
|
+
attr_accessor :start_date
|
841
|
+
|
842
|
+
sig do
|
843
|
+
params(
|
844
|
+
applies_to_price_ids: T::Array[String],
|
845
|
+
applies_to_price_interval_ids: T::Array[String],
|
846
|
+
end_date: T.nilable(Time),
|
847
|
+
percentage_discount: Float,
|
848
|
+
start_date: Time,
|
849
|
+
discount_type: Symbol
|
850
|
+
)
|
851
|
+
.returns(T.attached_class)
|
852
|
+
end
|
853
|
+
def self.new(
|
854
|
+
applies_to_price_ids:,
|
855
|
+
applies_to_price_interval_ids:,
|
856
|
+
end_date:,
|
857
|
+
percentage_discount:,
|
858
|
+
start_date:,
|
859
|
+
discount_type: :percentage
|
860
|
+
)
|
861
|
+
end
|
862
|
+
|
863
|
+
sig do
|
864
|
+
override
|
865
|
+
.returns(
|
866
|
+
{
|
867
|
+
applies_to_price_ids: T::Array[String],
|
868
|
+
applies_to_price_interval_ids: T::Array[String],
|
869
|
+
discount_type: Symbol,
|
870
|
+
end_date: T.nilable(Time),
|
871
|
+
percentage_discount: Float,
|
872
|
+
start_date: Time
|
873
|
+
}
|
874
|
+
)
|
875
|
+
end
|
876
|
+
def to_hash
|
877
|
+
end
|
878
|
+
end
|
879
|
+
|
880
|
+
class UsageDiscountInterval < Orb::BaseModel
|
881
|
+
# The price ids that this discount interval applies to.
|
882
|
+
sig { returns(T::Array[String]) }
|
883
|
+
attr_accessor :applies_to_price_ids
|
884
|
+
|
885
|
+
# The price interval ids that this discount interval applies to.
|
886
|
+
sig { returns(T::Array[String]) }
|
887
|
+
attr_accessor :applies_to_price_interval_ids
|
888
|
+
|
889
|
+
sig { returns(Symbol) }
|
890
|
+
attr_accessor :discount_type
|
891
|
+
|
892
|
+
# The end date of the discount interval.
|
893
|
+
sig { returns(T.nilable(Time)) }
|
894
|
+
attr_accessor :end_date
|
895
|
+
|
896
|
+
# The start date of the discount interval.
|
897
|
+
sig { returns(Time) }
|
898
|
+
attr_accessor :start_date
|
899
|
+
|
900
|
+
# Only available if discount_type is `usage`. Number of usage units that this
|
901
|
+
# discount is for
|
902
|
+
sig { returns(Float) }
|
903
|
+
attr_accessor :usage_discount
|
904
|
+
|
905
|
+
sig do
|
906
|
+
params(
|
907
|
+
applies_to_price_ids: T::Array[String],
|
908
|
+
applies_to_price_interval_ids: T::Array[String],
|
909
|
+
end_date: T.nilable(Time),
|
910
|
+
start_date: Time,
|
911
|
+
usage_discount: Float,
|
912
|
+
discount_type: Symbol
|
913
|
+
)
|
914
|
+
.returns(T.attached_class)
|
915
|
+
end
|
916
|
+
def self.new(
|
917
|
+
applies_to_price_ids:,
|
918
|
+
applies_to_price_interval_ids:,
|
919
|
+
end_date:,
|
920
|
+
start_date:,
|
921
|
+
usage_discount:,
|
922
|
+
discount_type: :usage
|
923
|
+
)
|
924
|
+
end
|
925
|
+
|
926
|
+
sig do
|
927
|
+
override
|
928
|
+
.returns(
|
929
|
+
{
|
930
|
+
applies_to_price_ids: T::Array[String],
|
931
|
+
applies_to_price_interval_ids: T::Array[String],
|
932
|
+
discount_type: Symbol,
|
933
|
+
end_date: T.nilable(Time),
|
934
|
+
start_date: Time,
|
935
|
+
usage_discount: Float
|
936
|
+
}
|
937
|
+
)
|
938
|
+
end
|
939
|
+
def to_hash
|
940
|
+
end
|
941
|
+
end
|
942
|
+
|
943
|
+
sig do
|
944
|
+
override
|
945
|
+
.returns(
|
946
|
+
[Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::AmountDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::PercentageDiscountInterval, Orb::Models::SubscriptionTriggerPhaseResponse::DiscountInterval::UsageDiscountInterval]
|
947
|
+
)
|
948
|
+
end
|
949
|
+
def self.variants
|
950
|
+
end
|
951
|
+
end
|
952
|
+
|
953
|
+
class FixedFeeQuantitySchedule < Orb::BaseModel
|
954
|
+
sig { returns(T.nilable(Time)) }
|
955
|
+
attr_accessor :end_date
|
956
|
+
|
957
|
+
sig { returns(String) }
|
958
|
+
attr_accessor :price_id
|
959
|
+
|
960
|
+
sig { returns(Float) }
|
961
|
+
attr_accessor :quantity
|
962
|
+
|
963
|
+
sig { returns(Time) }
|
964
|
+
attr_accessor :start_date
|
965
|
+
|
966
|
+
sig do
|
967
|
+
params(end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time)
|
968
|
+
.returns(T.attached_class)
|
969
|
+
end
|
970
|
+
def self.new(end_date:, price_id:, quantity:, start_date:)
|
971
|
+
end
|
972
|
+
|
973
|
+
sig do
|
974
|
+
override.returns({end_date: T.nilable(Time), price_id: String, quantity: Float, start_date: Time})
|
975
|
+
end
|
976
|
+
def to_hash
|
977
|
+
end
|
978
|
+
end
|
979
|
+
|
980
|
+
class MaximumInterval < Orb::BaseModel
|
981
|
+
# The price ids that this maximum interval applies to.
|
982
|
+
sig { returns(T::Array[String]) }
|
983
|
+
attr_accessor :applies_to_price_ids
|
984
|
+
|
985
|
+
# The price interval ids that this maximum interval applies to.
|
986
|
+
sig { returns(T::Array[String]) }
|
987
|
+
attr_accessor :applies_to_price_interval_ids
|
988
|
+
|
989
|
+
# The end date of the maximum interval.
|
990
|
+
sig { returns(T.nilable(Time)) }
|
991
|
+
attr_accessor :end_date
|
992
|
+
|
993
|
+
# The maximum amount to charge in a given billing period for the price intervals
|
994
|
+
# this transform applies to.
|
995
|
+
sig { returns(String) }
|
996
|
+
attr_accessor :maximum_amount
|
997
|
+
|
998
|
+
# The start date of the maximum interval.
|
999
|
+
sig { returns(Time) }
|
1000
|
+
attr_accessor :start_date
|
1001
|
+
|
1002
|
+
sig do
|
1003
|
+
params(
|
1004
|
+
applies_to_price_ids: T::Array[String],
|
1005
|
+
applies_to_price_interval_ids: T::Array[String],
|
1006
|
+
end_date: T.nilable(Time),
|
1007
|
+
maximum_amount: String,
|
1008
|
+
start_date: Time
|
1009
|
+
)
|
1010
|
+
.returns(T.attached_class)
|
1011
|
+
end
|
1012
|
+
def self.new(
|
1013
|
+
applies_to_price_ids:,
|
1014
|
+
applies_to_price_interval_ids:,
|
1015
|
+
end_date:,
|
1016
|
+
maximum_amount:,
|
1017
|
+
start_date:
|
1018
|
+
)
|
1019
|
+
end
|
1020
|
+
|
1021
|
+
sig do
|
1022
|
+
override
|
1023
|
+
.returns(
|
1024
|
+
{
|
1025
|
+
applies_to_price_ids: T::Array[String],
|
1026
|
+
applies_to_price_interval_ids: T::Array[String],
|
1027
|
+
end_date: T.nilable(Time),
|
1028
|
+
maximum_amount: String,
|
1029
|
+
start_date: Time
|
1030
|
+
}
|
1031
|
+
)
|
1032
|
+
end
|
1033
|
+
def to_hash
|
1034
|
+
end
|
1035
|
+
end
|
1036
|
+
|
1037
|
+
class MinimumInterval < Orb::BaseModel
|
1038
|
+
# The price ids that this minimum interval applies to.
|
1039
|
+
sig { returns(T::Array[String]) }
|
1040
|
+
attr_accessor :applies_to_price_ids
|
1041
|
+
|
1042
|
+
# The price interval ids that this minimum interval applies to.
|
1043
|
+
sig { returns(T::Array[String]) }
|
1044
|
+
attr_accessor :applies_to_price_interval_ids
|
1045
|
+
|
1046
|
+
# The end date of the minimum interval.
|
1047
|
+
sig { returns(T.nilable(Time)) }
|
1048
|
+
attr_accessor :end_date
|
1049
|
+
|
1050
|
+
# The minimum amount to charge in a given billing period for the price intervals
|
1051
|
+
# this minimum applies to.
|
1052
|
+
sig { returns(String) }
|
1053
|
+
attr_accessor :minimum_amount
|
1054
|
+
|
1055
|
+
# The start date of the minimum interval.
|
1056
|
+
sig { returns(Time) }
|
1057
|
+
attr_accessor :start_date
|
1058
|
+
|
1059
|
+
sig do
|
1060
|
+
params(
|
1061
|
+
applies_to_price_ids: T::Array[String],
|
1062
|
+
applies_to_price_interval_ids: T::Array[String],
|
1063
|
+
end_date: T.nilable(Time),
|
1064
|
+
minimum_amount: String,
|
1065
|
+
start_date: Time
|
1066
|
+
)
|
1067
|
+
.returns(T.attached_class)
|
1068
|
+
end
|
1069
|
+
def self.new(
|
1070
|
+
applies_to_price_ids:,
|
1071
|
+
applies_to_price_interval_ids:,
|
1072
|
+
end_date:,
|
1073
|
+
minimum_amount:,
|
1074
|
+
start_date:
|
1075
|
+
)
|
1076
|
+
end
|
1077
|
+
|
1078
|
+
sig do
|
1079
|
+
override
|
1080
|
+
.returns(
|
1081
|
+
{
|
1082
|
+
applies_to_price_ids: T::Array[String],
|
1083
|
+
applies_to_price_interval_ids: T::Array[String],
|
1084
|
+
end_date: T.nilable(Time),
|
1085
|
+
minimum_amount: String,
|
1086
|
+
start_date: Time
|
1087
|
+
}
|
1088
|
+
)
|
1089
|
+
end
|
1090
|
+
def to_hash
|
1091
|
+
end
|
1092
|
+
end
|
1093
|
+
|
1094
|
+
class PriceInterval < Orb::BaseModel
|
1095
|
+
sig { returns(String) }
|
1096
|
+
attr_accessor :id
|
1097
|
+
|
1098
|
+
# The day of the month that Orb bills for this price
|
1099
|
+
sig { returns(Integer) }
|
1100
|
+
attr_accessor :billing_cycle_day
|
1101
|
+
|
1102
|
+
# The end of the current billing period. This is an exclusive timestamp, such that
|
1103
|
+
# the instant returned is exactly the end of the billing period. Set to null if
|
1104
|
+
# this price interval is not currently active.
|
1105
|
+
sig { returns(T.nilable(Time)) }
|
1106
|
+
attr_accessor :current_billing_period_end_date
|
1107
|
+
|
1108
|
+
# The start date of the current billing period. This is an inclusive timestamp;
|
1109
|
+
# the instant returned is exactly the beginning of the billing period. Set to null
|
1110
|
+
# if this price interval is not currently active.
|
1111
|
+
sig { returns(T.nilable(Time)) }
|
1112
|
+
attr_accessor :current_billing_period_start_date
|
1113
|
+
|
1114
|
+
# The end date of the price interval. This is the date that Orb stops billing for
|
1115
|
+
# this price.
|
1116
|
+
sig { returns(T.nilable(Time)) }
|
1117
|
+
attr_accessor :end_date
|
1118
|
+
|
1119
|
+
# An additional filter to apply to usage queries.
|
1120
|
+
sig { returns(T.nilable(String)) }
|
1121
|
+
attr_accessor :filter
|
1122
|
+
|
1123
|
+
# The fixed fee quantity transitions for this price interval. This is only
|
1124
|
+
# relevant for fixed fees.
|
1125
|
+
sig do
|
1126
|
+
returns(
|
1127
|
+
T.nilable(
|
1128
|
+
T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition]
|
1129
|
+
)
|
1130
|
+
)
|
1131
|
+
end
|
1132
|
+
attr_accessor :fixed_fee_quantity_transitions
|
1133
|
+
|
1134
|
+
# The Price resource represents a price that can be billed on a subscription,
|
1135
|
+
# resulting in a charge on an invoice in the form of an invoice line item. Prices
|
1136
|
+
# take a quantity and determine an amount to bill.
|
1137
|
+
#
|
1138
|
+
# Orb supports a few different pricing models out of the box. Each of these models
|
1139
|
+
# is serialized differently in a given Price object. The model_type field
|
1140
|
+
# determines the key for the configuration object that is present.
|
1141
|
+
#
|
1142
|
+
# For more on the types of prices, see
|
1143
|
+
# [the core concepts documentation](/core-concepts#plan-and-price)
|
1144
|
+
sig do
|
1145
|
+
returns(
|
1146
|
+
T.any(
|
1147
|
+
Orb::Models::Price::UnitPrice,
|
1148
|
+
Orb::Models::Price::PackagePrice,
|
1149
|
+
Orb::Models::Price::MatrixPrice,
|
1150
|
+
Orb::Models::Price::TieredPrice,
|
1151
|
+
Orb::Models::Price::TieredBpsPrice,
|
1152
|
+
Orb::Models::Price::BpsPrice,
|
1153
|
+
Orb::Models::Price::BulkBpsPrice,
|
1154
|
+
Orb::Models::Price::BulkPrice,
|
1155
|
+
Orb::Models::Price::ThresholdTotalAmountPrice,
|
1156
|
+
Orb::Models::Price::TieredPackagePrice,
|
1157
|
+
Orb::Models::Price::GroupedTieredPrice,
|
1158
|
+
Orb::Models::Price::TieredWithMinimumPrice,
|
1159
|
+
Orb::Models::Price::TieredPackageWithMinimumPrice,
|
1160
|
+
Orb::Models::Price::PackageWithAllocationPrice,
|
1161
|
+
Orb::Models::Price::UnitWithPercentPrice,
|
1162
|
+
Orb::Models::Price::MatrixWithAllocationPrice,
|
1163
|
+
Orb::Models::Price::TieredWithProrationPrice,
|
1164
|
+
Orb::Models::Price::UnitWithProrationPrice,
|
1165
|
+
Orb::Models::Price::GroupedAllocationPrice,
|
1166
|
+
Orb::Models::Price::GroupedWithProratedMinimumPrice,
|
1167
|
+
Orb::Models::Price::GroupedWithMeteredMinimumPrice,
|
1168
|
+
Orb::Models::Price::MatrixWithDisplayNamePrice,
|
1169
|
+
Orb::Models::Price::BulkWithProrationPrice,
|
1170
|
+
Orb::Models::Price::GroupedTieredPackagePrice,
|
1171
|
+
Orb::Models::Price::MaxGroupTieredPackagePrice,
|
1172
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
|
1173
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
|
1174
|
+
Orb::Models::Price::CumulativeGroupedBulkPrice
|
1175
|
+
)
|
1176
|
+
)
|
1177
|
+
end
|
1178
|
+
attr_accessor :price
|
1179
|
+
|
1180
|
+
# The start date of the price interval. This is the date that Orb starts billing
|
1181
|
+
# for this price.
|
1182
|
+
sig { returns(Time) }
|
1183
|
+
attr_accessor :start_date
|
1184
|
+
|
1185
|
+
# A list of customer IDs whose usage events will be aggregated and billed under
|
1186
|
+
# this price interval.
|
1187
|
+
sig { returns(T.nilable(T::Array[String])) }
|
1188
|
+
attr_accessor :usage_customer_ids
|
1189
|
+
|
1190
|
+
# The Price Interval resource represents a period of time for which a price will
|
1191
|
+
# bill on a subscription. A subscription’s price intervals define its billing
|
1192
|
+
# behavior.
|
1193
|
+
sig do
|
1194
|
+
params(
|
1195
|
+
id: String,
|
1196
|
+
billing_cycle_day: Integer,
|
1197
|
+
current_billing_period_end_date: T.nilable(Time),
|
1198
|
+
current_billing_period_start_date: T.nilable(Time),
|
1199
|
+
end_date: T.nilable(Time),
|
1200
|
+
filter: T.nilable(String),
|
1201
|
+
fixed_fee_quantity_transitions: T.nilable(
|
1202
|
+
T::Array[
|
1203
|
+
T.any(
|
1204
|
+
Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition,
|
1205
|
+
Orb::Util::AnyHash
|
1206
|
+
)
|
1207
|
+
]
|
1208
|
+
),
|
1209
|
+
price: T.any(
|
1210
|
+
Orb::Models::Price::UnitPrice,
|
1211
|
+
Orb::Util::AnyHash,
|
1212
|
+
Orb::Models::Price::PackagePrice,
|
1213
|
+
Orb::Models::Price::MatrixPrice,
|
1214
|
+
Orb::Models::Price::TieredPrice,
|
1215
|
+
Orb::Models::Price::TieredBpsPrice,
|
1216
|
+
Orb::Models::Price::BpsPrice,
|
1217
|
+
Orb::Models::Price::BulkBpsPrice,
|
1218
|
+
Orb::Models::Price::BulkPrice,
|
1219
|
+
Orb::Models::Price::ThresholdTotalAmountPrice,
|
1220
|
+
Orb::Models::Price::TieredPackagePrice,
|
1221
|
+
Orb::Models::Price::GroupedTieredPrice,
|
1222
|
+
Orb::Models::Price::TieredWithMinimumPrice,
|
1223
|
+
Orb::Models::Price::TieredPackageWithMinimumPrice,
|
1224
|
+
Orb::Models::Price::PackageWithAllocationPrice,
|
1225
|
+
Orb::Models::Price::UnitWithPercentPrice,
|
1226
|
+
Orb::Models::Price::MatrixWithAllocationPrice,
|
1227
|
+
Orb::Models::Price::TieredWithProrationPrice,
|
1228
|
+
Orb::Models::Price::UnitWithProrationPrice,
|
1229
|
+
Orb::Models::Price::GroupedAllocationPrice,
|
1230
|
+
Orb::Models::Price::GroupedWithProratedMinimumPrice,
|
1231
|
+
Orb::Models::Price::GroupedWithMeteredMinimumPrice,
|
1232
|
+
Orb::Models::Price::MatrixWithDisplayNamePrice,
|
1233
|
+
Orb::Models::Price::BulkWithProrationPrice,
|
1234
|
+
Orb::Models::Price::GroupedTieredPackagePrice,
|
1235
|
+
Orb::Models::Price::MaxGroupTieredPackagePrice,
|
1236
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
|
1237
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
|
1238
|
+
Orb::Models::Price::CumulativeGroupedBulkPrice
|
1239
|
+
),
|
1240
|
+
start_date: Time,
|
1241
|
+
usage_customer_ids: T.nilable(T::Array[String])
|
1242
|
+
)
|
1243
|
+
.returns(T.attached_class)
|
1244
|
+
end
|
1245
|
+
def self.new(
|
1246
|
+
id:,
|
1247
|
+
billing_cycle_day:,
|
1248
|
+
current_billing_period_end_date:,
|
1249
|
+
current_billing_period_start_date:,
|
1250
|
+
end_date:,
|
1251
|
+
filter:,
|
1252
|
+
fixed_fee_quantity_transitions:,
|
1253
|
+
price:,
|
1254
|
+
start_date:,
|
1255
|
+
usage_customer_ids:
|
1256
|
+
)
|
1257
|
+
end
|
1258
|
+
|
1259
|
+
sig do
|
1260
|
+
override
|
1261
|
+
.returns(
|
1262
|
+
{
|
1263
|
+
id: String,
|
1264
|
+
billing_cycle_day: Integer,
|
1265
|
+
current_billing_period_end_date: T.nilable(Time),
|
1266
|
+
current_billing_period_start_date: T.nilable(Time),
|
1267
|
+
end_date: T.nilable(Time),
|
1268
|
+
filter: T.nilable(String),
|
1269
|
+
fixed_fee_quantity_transitions: T.nilable(
|
1270
|
+
T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::PriceInterval::FixedFeeQuantityTransition]
|
1271
|
+
),
|
1272
|
+
price: T.any(
|
1273
|
+
Orb::Models::Price::UnitPrice,
|
1274
|
+
Orb::Models::Price::PackagePrice,
|
1275
|
+
Orb::Models::Price::MatrixPrice,
|
1276
|
+
Orb::Models::Price::TieredPrice,
|
1277
|
+
Orb::Models::Price::TieredBpsPrice,
|
1278
|
+
Orb::Models::Price::BpsPrice,
|
1279
|
+
Orb::Models::Price::BulkBpsPrice,
|
1280
|
+
Orb::Models::Price::BulkPrice,
|
1281
|
+
Orb::Models::Price::ThresholdTotalAmountPrice,
|
1282
|
+
Orb::Models::Price::TieredPackagePrice,
|
1283
|
+
Orb::Models::Price::GroupedTieredPrice,
|
1284
|
+
Orb::Models::Price::TieredWithMinimumPrice,
|
1285
|
+
Orb::Models::Price::TieredPackageWithMinimumPrice,
|
1286
|
+
Orb::Models::Price::PackageWithAllocationPrice,
|
1287
|
+
Orb::Models::Price::UnitWithPercentPrice,
|
1288
|
+
Orb::Models::Price::MatrixWithAllocationPrice,
|
1289
|
+
Orb::Models::Price::TieredWithProrationPrice,
|
1290
|
+
Orb::Models::Price::UnitWithProrationPrice,
|
1291
|
+
Orb::Models::Price::GroupedAllocationPrice,
|
1292
|
+
Orb::Models::Price::GroupedWithProratedMinimumPrice,
|
1293
|
+
Orb::Models::Price::GroupedWithMeteredMinimumPrice,
|
1294
|
+
Orb::Models::Price::MatrixWithDisplayNamePrice,
|
1295
|
+
Orb::Models::Price::BulkWithProrationPrice,
|
1296
|
+
Orb::Models::Price::GroupedTieredPackagePrice,
|
1297
|
+
Orb::Models::Price::MaxGroupTieredPackagePrice,
|
1298
|
+
Orb::Models::Price::ScalableMatrixWithUnitPricingPrice,
|
1299
|
+
Orb::Models::Price::ScalableMatrixWithTieredPricingPrice,
|
1300
|
+
Orb::Models::Price::CumulativeGroupedBulkPrice
|
1301
|
+
),
|
1302
|
+
start_date: Time,
|
1303
|
+
usage_customer_ids: T.nilable(T::Array[String])
|
1304
|
+
}
|
1305
|
+
)
|
1306
|
+
end
|
1307
|
+
def to_hash
|
1308
|
+
end
|
1309
|
+
|
1310
|
+
class FixedFeeQuantityTransition < Orb::BaseModel
|
1311
|
+
sig { returns(Time) }
|
1312
|
+
attr_accessor :effective_date
|
1313
|
+
|
1314
|
+
sig { returns(String) }
|
1315
|
+
attr_accessor :price_id
|
1316
|
+
|
1317
|
+
sig { returns(Integer) }
|
1318
|
+
attr_accessor :quantity
|
1319
|
+
|
1320
|
+
sig { params(effective_date: Time, price_id: String, quantity: Integer).returns(T.attached_class) }
|
1321
|
+
def self.new(effective_date:, price_id:, quantity:)
|
1322
|
+
end
|
1323
|
+
|
1324
|
+
sig { override.returns({effective_date: Time, price_id: String, quantity: Integer}) }
|
1325
|
+
def to_hash
|
1326
|
+
end
|
1327
|
+
end
|
1328
|
+
end
|
1329
|
+
|
1330
|
+
class RedeemedCoupon < Orb::BaseModel
|
1331
|
+
sig { returns(String) }
|
1332
|
+
attr_accessor :coupon_id
|
1333
|
+
|
1334
|
+
sig { returns(T.nilable(Time)) }
|
1335
|
+
attr_accessor :end_date
|
1336
|
+
|
1337
|
+
sig { returns(Time) }
|
1338
|
+
attr_accessor :start_date
|
1339
|
+
|
1340
|
+
sig do
|
1341
|
+
params(coupon_id: String, end_date: T.nilable(Time), start_date: Time).returns(T.attached_class)
|
1342
|
+
end
|
1343
|
+
def self.new(coupon_id:, end_date:, start_date:)
|
1344
|
+
end
|
1345
|
+
|
1346
|
+
sig { override.returns({coupon_id: String, end_date: T.nilable(Time), start_date: Time}) }
|
1347
|
+
def to_hash
|
1348
|
+
end
|
1349
|
+
end
|
1350
|
+
|
1351
|
+
module Status
|
1352
|
+
extend Orb::Enum
|
1353
|
+
|
1354
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, Orb::Models::SubscriptionTriggerPhaseResponse::Status) }
|
1355
|
+
OrSymbol =
|
1356
|
+
T.type_alias { T.any(Symbol, String, Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol) }
|
1357
|
+
|
1358
|
+
ACTIVE = T.let(:active, Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol)
|
1359
|
+
ENDED = T.let(:ended, Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol)
|
1360
|
+
UPCOMING = T.let(:upcoming, Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol)
|
1361
|
+
|
1362
|
+
sig { override.returns(T::Array[Orb::Models::SubscriptionTriggerPhaseResponse::Status::TaggedSymbol]) }
|
1363
|
+
def self.values
|
1364
|
+
end
|
1365
|
+
end
|
1366
|
+
|
1367
|
+
class TrialInfo < Orb::BaseModel
|
1368
|
+
sig { returns(T.nilable(Time)) }
|
1369
|
+
attr_accessor :end_date
|
1370
|
+
|
1371
|
+
sig { params(end_date: T.nilable(Time)).returns(T.attached_class) }
|
1372
|
+
def self.new(end_date:)
|
1373
|
+
end
|
1374
|
+
|
1375
|
+
sig { override.returns({end_date: T.nilable(Time)}) }
|
1376
|
+
def to_hash
|
1377
|
+
end
|
1378
|
+
end
|
1379
|
+
end
|
1380
|
+
end
|
1381
|
+
end
|