import * as z from "zod/v4-mini"; import { Result as SafeParseResult } from "../../types/fp.js"; import { SDKValidationError } from "../errors/sdkvalidationerror.js"; import { CustomerCancellationReason } from "./customercancellationreason.js"; import { MetadataOutputType, MetadataOutputType$Outbound } from "./metadataoutputtype.js"; import { SubscriptionRecurringInterval } from "./subscriptionrecurringinterval.js"; import { SubscriptionStatus } from "./subscriptionstatus.js"; export type OrderSubscription = { metadata: { [k: string]: MetadataOutputType; }; /** * Creation timestamp of the object. */ createdAt: Date; /** * Last modification timestamp of the object. */ modifiedAt: Date | null; /** * The ID of the object. */ id: string; /** * The amount of the subscription. */ amount: number; /** * The currency of the subscription. */ currency: string; recurringInterval: SubscriptionRecurringInterval; /** * Number of interval units of the subscription. If this is set to 1 the charge will happen every interval (e.g. every month), if set to 2 it will be every other month, and so on. */ recurringIntervalCount: number; status: SubscriptionStatus; /** * The start timestamp of the current billing period. */ currentPeriodStart: Date; /** * The end timestamp of the current billing period. */ currentPeriodEnd: Date; /** * The start timestamp of the trial period, if any. */ trialStart: Date | null; /** * The end timestamp of the trial period, if any. */ trialEnd: Date | null; /** * Whether the subscription will be canceled at the end of the current period. */ cancelAtPeriodEnd: boolean; /** * The timestamp when the subscription was canceled. The subscription might still be active if `cancel_at_period_end` is `true`. */ canceledAt: Date | null; /** * The timestamp when the subscription started. */ startedAt: Date | null; /** * The timestamp when the subscription will end. */ endsAt: Date | null; /** * The timestamp when the subscription ended. */ endedAt: Date | null; /** * The ID of the subscribed customer. */ customerId: string; /** * The ID of the subscribed product. */ productId: string; /** * The ID of the applied discount, if any. */ discountId: string | null; checkoutId: string | null; /** * The number of seats for seat-based subscriptions. None for non-seat subscriptions. */ seats?: number | null | undefined; customerCancellationReason: CustomerCancellationReason | null; customerCancellationComment: string | null; }; /** @internal */ export declare const OrderSubscription$inboundSchema: z.ZodMiniType; /** @internal */ export type OrderSubscription$Outbound = { metadata: { [k: string]: MetadataOutputType$Outbound; }; created_at: string; modified_at: string | null; id: string; amount: number; currency: string; recurring_interval: string; recurring_interval_count: number; status: string; current_period_start: string; current_period_end: string; trial_start: string | null; trial_end: string | null; cancel_at_period_end: boolean; canceled_at: string | null; started_at: string | null; ends_at: string | null; ended_at: string | null; customer_id: string; product_id: string; discount_id: string | null; checkout_id: string | null; seats?: number | null | undefined; customer_cancellation_reason: string | null; customer_cancellation_comment: string | null; }; /** @internal */ export declare const OrderSubscription$outboundSchema: z.ZodMiniType; export declare function orderSubscriptionToJSON(orderSubscription: OrderSubscription): string; export declare function orderSubscriptionFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=ordersubscription.d.ts.map