import * as z from "zod/v4-mini"; import { AddAddonToSubscriptionRequest, AddAddonToSubscriptionRequest$Outbound } from "./add-addon-to-subscription-request.js"; import { BillingCycle } from "./billing-cycle.js"; import { BillingPeriod } from "./billing-period.js"; import { CheckoutParams, CheckoutParams$Outbound } from "./checkout-params.js"; import { CollectionMethod } from "./collection-method.js"; import { CreateCreditGrantRequest, CreateCreditGrantRequest$Outbound } from "./create-credit-grant-request.js"; import { CreateSubscriptionLineItemRequest, CreateSubscriptionLineItemRequest$Outbound } from "./create-subscription-line-item-request.js"; import { LineItemCommitmentConfig, LineItemCommitmentConfig$Outbound } from "./line-item-commitment-config.js"; import { OverrideEntitlementRequest, OverrideEntitlementRequest$Outbound } from "./override-entitlement-request.js"; import { OverrideLineItemRequest, OverrideLineItemRequest$Outbound } from "./override-line-item-request.js"; import { PaymentBehavior } from "./payment-behavior.js"; import { PaymentTerms } from "./payment-terms.js"; import { ProrationBehavior } from "./proration-behavior.js"; import { SubscriptionCouponInput, SubscriptionCouponInput$Outbound } from "./subscription-coupon-input.js"; import { SubscriptionInheritanceConfig, SubscriptionInheritanceConfig$Outbound } from "./subscription-inheritance-config.js"; import { SubscriptionPhaseCreateRequest, SubscriptionPhaseCreateRequest$Outbound } from "./subscription-phase-create-request.js"; import { SubscriptionStatus } from "./subscription-status.js"; import { TaxRateOverride, TaxRateOverride$Outbound } from "./tax-rate-override.js"; export type CreateSubscriptionRequest = { addons?: Array | undefined; /** * AutoInvoiceThreshold triggers a mid-period invoice when usage (in subscription currency) exceeds this amount. * * @remarks * Standalone subscriptions only; all plan prices must be usage-based. Immutable after creation. */ autoInvoiceThreshold?: string | undefined; /** * BillingAnchor overrides the derived anchor for anniversary billing. For monthly billing, * * @remarks * the day-of-month defines cycle boundaries (shorter first period if start is before that day). */ billingAnchor?: Date | undefined; billingCycle?: BillingCycle | undefined; billingPeriod: BillingPeriod; billingPeriodCount?: number | undefined; checkout?: CheckoutParams | undefined; collectionMethod?: CollectionMethod | undefined; commitmentAmount?: string | undefined; commitmentDuration?: BillingPeriod | undefined; /** * Deprecated: use SubscriptionCoupons instead. */ coupons?: Array | undefined; creditGrants?: Array | undefined; currency: string; /** * CustomerID takes priority over ExternalCustomerID when both are provided. */ customerId?: string | undefined; enableTrueUp?: boolean | undefined; endDate?: Date | undefined; externalCustomerId?: string | undefined; gatewayPaymentMethodId?: string | undefined; inheritance?: SubscriptionInheritanceConfig | undefined; /** * LineItemCommitments sets per-line-item commitment config, keyed by price_id. */ lineItemCommitments?: { [k: string]: LineItemCommitmentConfig; } | undefined; /** * Deprecated: use SubscriptionCoupons instead. */ lineItemCoupons?: { [k: string]: Array; } | undefined; /** * LineItems are extra (non-plan) line items added at creation. */ lineItems?: Array | undefined; lookupKey?: string | undefined; metadata?: { [k: string]: string; } | undefined; overageFactor?: string | undefined; overrideEntitlements?: Array | undefined; /** * OverrideLineItems overrides specific plan prices for this subscription. */ overrideLineItems?: Array | undefined; paymentBehavior?: PaymentBehavior | undefined; paymentTerms?: PaymentTerms | undefined; phases?: Array | undefined; planId: string; prorationBehavior?: ProrationBehavior | undefined; startDate?: Date | undefined; /** * SubscriptionCoupons is the preferred way to attach coupons at creation. * * @remarks * Accepts coupon_code; optionally targets a line item via price_id. */ subscriptionCoupons?: Array | undefined; subscriptionStatus?: SubscriptionStatus | undefined; taxRateOverrides?: Array | undefined; timezone?: string | undefined; /** * TrialPeriodDays: nil = inherit from plan prices, 0 = no trial, >0 = override in days. */ trialPeriodDays?: number | undefined; }; /** @internal */ export type CreateSubscriptionRequest$Outbound = { addons?: Array | undefined; auto_invoice_threshold?: string | undefined; billing_anchor?: string | undefined; billing_cycle?: string | undefined; billing_period: string; billing_period_count?: number | undefined; checkout?: CheckoutParams$Outbound | undefined; collection_method?: string | undefined; commitment_amount?: string | undefined; commitment_duration?: string | undefined; coupons?: Array | undefined; credit_grants?: Array | undefined; currency: string; customer_id?: string | undefined; enable_true_up?: boolean | undefined; end_date?: string | undefined; external_customer_id?: string | undefined; gateway_payment_method_id?: string | undefined; inheritance?: SubscriptionInheritanceConfig$Outbound | undefined; line_item_commitments?: { [k: string]: LineItemCommitmentConfig$Outbound; } | undefined; line_item_coupons?: { [k: string]: Array; } | undefined; line_items?: Array | undefined; lookup_key?: string | undefined; metadata?: { [k: string]: string; } | undefined; overage_factor?: string | undefined; override_entitlements?: Array | undefined; override_line_items?: Array | undefined; payment_behavior?: string | undefined; payment_terms?: string | undefined; phases?: Array | undefined; plan_id: string; proration_behavior?: string | undefined; start_date?: string | undefined; subscription_coupons?: Array | undefined; subscription_status?: string | undefined; tax_rate_overrides?: Array | undefined; timezone?: string | undefined; trial_period_days?: number | undefined; }; /** @internal */ export declare const CreateSubscriptionRequest$outboundSchema: z.ZodMiniType; export declare function createSubscriptionRequestToJSON(createSubscriptionRequest: CreateSubscriptionRequest): string; //# sourceMappingURL=create-subscription-request.d.ts.map