import * as z from "zod/v4-mini"; import { Result as SafeParseResult } from "../../types/fp.js"; import { AggregatedFeature } from "./aggregated-feature.js"; import { BillingCadence } from "./billing-cadence.js"; import { BillingCycle } from "./billing-cycle.js"; import { BillingPeriod } from "./billing-period.js"; import { CheckoutSessionResponse } from "./checkout-session-response.js"; import { CouponAssociationResponse } from "./coupon-association-response.js"; import { CreditGrantResponse } from "./credit-grant-response.js"; import { CustomerResponse } from "./customer-response.js"; import { InvoiceResponse } from "./invoice-response.js"; import { PauseStatus } from "./pause-status.js"; import { PaymentTerms } from "./payment-terms.js"; import { PlanResponse } from "./plan-response.js"; import { ProrationBehavior } from "./proration-behavior.js"; import { SDKValidationError } from "./sdk-validation-error.js"; import { Status } from "./status.js"; import { SubscriptionPhaseResponse } from "./subscription-phase-response.js"; import { SubscriptionStatus } from "./subscription-status.js"; import { SubscriptionSubscriptionLineItem } from "./subscription-subscription-line-item.js"; import { SubscriptionSubscriptionPause } from "./subscription-subscription-pause.js"; import { SubscriptionType } from "./subscription-type.js"; export type SubscriptionResponse = { /** * ActivePauseID references the current active pause configuration * * @remarks * This will be null if no pause is active or scheduled */ activePauseId?: string | undefined; /** * AutoInvoiceThreshold is the usage amount (in subscription currency) that triggers * * @remarks * an intermediate invoice. Overrides the plan-level threshold when set. * Nil means: inherit from the plan's threshold (which may also be nil = disabled). */ autoInvoiceThreshold?: string | undefined; /** * BillingAnchor is the reference point that aligns future billing cycle dates. * * @remarks * It sets the day of week for week intervals, the day of month for month and year intervals, * and the month of year for year intervals. The timestamp is in UTC format. */ billingAnchor?: Date | undefined; billingCadence?: BillingCadence | undefined; billingCycle?: BillingCycle | undefined; billingPeriod?: BillingPeriod | undefined; /** * BillingPeriodCount is the total number units of the billing period. */ billingPeriodCount?: number | undefined; /** * CancelAt is the date the subscription will be canceled */ cancelAt?: Date | undefined; /** * CancelAtPeriodEnd is whether the subscription was canceled at the end of the current period */ cancelAtPeriodEnd?: boolean | undefined; /** * CanceledAt is the date the subscription was canceled */ cancelledAt?: Date | undefined; checkoutSession?: CheckoutSessionResponse | undefined; /** * CollectionMethod determines how invoices are collected */ collectionMethod?: string | undefined; /** * CommitmentAmount is the minimum amount a customer commits to paying for a billing period */ commitmentAmount?: string | undefined; commitmentDuration?: BillingPeriod | undefined; /** * CouponAssociations are the coupon associations for this subscription */ couponAssociations?: Array | undefined; createdAt?: Date | undefined; createdBy?: string | undefined; /** * Credit grants are the credit grants for this subscription */ creditGrants?: Array | undefined; /** * Currency is the currency of the subscription in lowercase 3 digit ISO codes */ currency?: string | undefined; /** * CurrentPeriodEnd is the end of the current period that the subscription has been invoiced for. * * @remarks * At the end of this period, a new invoice will be created. */ currentPeriodEnd?: Date | undefined; /** * CurrentPeriodStart is the end of the current period that the subscription has been invoiced for. * * @remarks * At the end of this period, a new invoice will be created. */ currentPeriodStart?: Date | undefined; /** * Customer response object containing all customer information */ customer?: CustomerResponse | undefined; /** * CustomerID is the identifier for the customer in our system */ customerId?: string | undefined; enableTrueUp?: boolean | undefined; /** * EndDate is the end date of the subscription */ endDate?: Date | undefined; /** * Entitlements is populated only when the caller adds "entitlements" to * * @remarks * the search filter's expand string. Each entry is a feature with its * aggregated entitlement info (same shape as CustomerEntitlementsResponse.Features). */ entitlements?: Array | undefined; /** * EnvironmentID is the environment identifier for the subscription */ environmentId?: string | undefined; /** * GatewayPaymentMethodID is the gateway payment method ID for this subscription */ gatewayPaymentMethodId?: string | undefined; /** * ID is the unique identifier for the subscription */ id?: string | undefined; /** * InvoicingCustomerID is the customer ID to use for invoicing * * @remarks * This can differ from the subscription customer (e.g., parent company invoicing for child company) */ invoicingCustomerId?: string | undefined; latestInvoice?: InvoiceResponse | undefined; lineItems?: Array | undefined; /** * LookupKey is the key used to lookup the subscription in our system */ lookupKey?: string | undefined; metadata?: { [k: string]: string; } | undefined; /** * OverageFactor is a multiplier applied to usage beyond the commitment amount */ overageFactor?: string | undefined; /** * ParentSubscriptionID is the parent subscription ID for hierarchy (e.g. child subscription under a parent) */ parentSubscriptionId?: string | undefined; pauseStatus?: PauseStatus | undefined; pauses?: Array | undefined; /** * PaymentBehavior determines how subscription payments are handled */ paymentBehavior?: string | undefined; paymentTerms?: PaymentTerms | undefined; /** * Phases are the subscription phases for this subscription */ phases?: Array | undefined; plan?: PlanResponse | undefined; /** * PlanID is the identifier for the plan in our system */ planId?: string | undefined; prorationBehavior?: ProrationBehavior | undefined; /** * StartDate is the start date of the subscription */ startDate?: Date | undefined; status?: Status | undefined; subscriptionStatus?: SubscriptionStatus | undefined; subscriptionType?: SubscriptionType | undefined; /** * SyncedPriceSequence is the plan-price sequence up to which this * * @remarks * subscription's line items have been reconciled. Bumped by the * plan-price sync after a successful pass. */ syncedPriceSequence?: number | undefined; tenantId?: string | undefined; timezone?: string | undefined; /** * TrialEnd is the end date of the trial period */ trialEnd?: Date | undefined; /** * TrialStart is the start date of the trial period */ trialStart?: Date | undefined; updatedAt?: Date | undefined; updatedBy?: string | undefined; /** * Version is used for optimistic locking */ version?: number | undefined; }; /** @internal */ export declare const SubscriptionResponse$inboundSchema: z.ZodMiniType; export declare function subscriptionResponseFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=subscription-response.d.ts.map