import type { subscription_CreateSubscriptionInput } from '../models/subscription_CreateSubscriptionInput'; import type { subscription_GetSubscriptionResponse } from '../models/subscription_GetSubscriptionResponse'; import type { subscription_Subscription } from '../models/subscription_Subscription'; import type { CancelablePromise } from '../core/CancelablePromise'; export declare class SubscriptionsService { /** * List subscriptions * * Returns a paginated list of subscriptions for the portal. Optionally * filter by recipient; when both clientId and companyId are supplied, * clientId takes precedence. * * @param clientId Filter by client ID (takes precedence over companyId). * @param companyId Filter by company ID. * @param recipientId Filter by recipient ID (deprecated; prefer clientId or companyId). * @param limit Maximum number of records to return. * @param nextToken Pagination cursor returned by a previous request. * * @example * await assembly.listSubscriptions(); */ static listSubscriptions({ clientId, companyId, recipientId, limit, nextToken, }: { /** * Filter by client ID (takes precedence over companyId). */ clientId?: string; /** * Filter by company ID. */ companyId?: string; /** * Filter by recipient ID (deprecated; prefer clientId or companyId). */ recipientId?: string; /** * Maximum number of records to return. */ limit?: number; /** * Pagination cursor returned by a previous request. */ nextToken?: string; }): CancelablePromise; /** * Create a subscription * * Creates a recurring subscription for a client or company. Requires a * recipient (clientId or companyId), at least one line item, and a * connected payout account on the portal. The billing interval is inferred * from recurring prices when present, otherwise taken from the request. * * @example * await assembly.createSubscription({ requestBody: ... }); */ static createSubscription({ requestBody, }: { /** * Subscription to create */ requestBody: subscription_CreateSubscriptionInput; }): CancelablePromise; /** * Retrieve a subscription * * Returns a single subscription by ID, scoped to the caller's portal. * * @param id Subscription ID * * @example * await assembly.retrieveSubscription({ id: ... }); */ static retrieveSubscription({ id, }: { /** * Subscription ID */ id: string; }): CancelablePromise; /** * Cancel a subscription * * Cancels an active subscription (or its underlying schedule) and returns * the updated subscription. Cancelling an already-cancelled subscription * returns an error. * * @param id Subscription ID * * @example * await assembly.cancelSubscription({ id: ... }); */ static cancelSubscription({ id, }: { /** * Subscription ID */ id: string; }): CancelablePromise; }