import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js"; import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js"; import * as core from "../../../../core/index.js"; import * as Whop from "../../../index.js"; export declare namespace VariantsClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Variant is one purchasable configuration of a product. It controls price, billing cadence, stock, SKU, attributes, tax behavior, checkout fields, and purchase visibility. Variant IDs remain prefixed `plan_`. * * Use the Variants API to create variants for products, list existing variants, retrieve or update variant configuration, calculate tax for checkout, and delete variants that should no longer be offered. */ export declare class VariantsClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: VariantsClient.Options); /** * Lists an account's variants, leaving out variants generated for a legacy invoice; retrieve one of those by ID. To list a product's public, buyable variants without authentication, omit `account_id` and pass `product_ids`. * * @param {Whop.ListVariantsRequest} request * @param {VariantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.variants.list({ * release_methods: ["buy_now"], * visibilities: ["visible"], * billing_types: ["renewal"], * product_ids: ["prod_xxxxxxxxxxxxxx"], * presentment_currency: "auto", * ip_address: "203.0.113.7", * presentment_country: "JP" * }) */ list(request?: Whop.ListVariantsRequest, requestOptions?: VariantsClient.RequestOptions): Promise>; /** * Creates a pricing variant for a product, defining the billing interval, price, and availability customers buy it with. * * @param {Whop.CreateVariantsRequest} request * @param {VariantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.variants.create() */ create(request?: Whop.CreateVariantsRequest, requestOptions?: VariantsClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Retrieves a variant. Requires no authentication; fields that need a permission are `null` for callers without it. * * @param {Whop.RetrieveVariantsRequest} request * @param {VariantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.variants.retrieve({ * id: "id", * presentment_currency: "auto", * ip_address: "203.0.113.7", * presentment_country: "JP" * }) */ retrieve(request: Whop.RetrieveVariantsRequest, requestOptions?: VariantsClient.RequestOptions): core.HttpResponsePromise; private __retrieve; /** * Deletes a variant from a product. It stops selling immediately; existing memberships on it are unaffected. * * @param {Whop.DeleteVariantsRequest} request * @param {VariantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.variants.delete({ * id: "id" * }) */ delete(request: Whop.DeleteVariantsRequest, requestOptions?: VariantsClient.RequestOptions): core.HttpResponsePromise; private __delete; /** * Updates a variant's pricing, billing interval, visibility, stock, and other settings. * * @param {Whop.UpdateVariantsRequest} request * @param {VariantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.UnauthorizedError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.variants.update({ * id: "id" * }) */ update(request: Whop.UpdateVariantsRequest, requestOptions?: VariantsClient.RequestOptions): core.HttpResponsePromise; private __update; /** * @deprecated * * Deprecated. Quote tax with `POST /payment_quotes` instead. Previews tax for a variant before checkout, based on the buyer's location. * * @param {Whop.CalculateTaxVariantsRequest} request * @param {VariantsClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link Whop.ConflictError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.variants.calculateTax({ * id: "id", * address: { * country: "DE", * postal_code: "10115" * } * }) */ calculateTax(request: Whop.CalculateTaxVariantsRequest, requestOptions?: VariantsClient.RequestOptions): core.HttpResponsePromise; private __calculateTax; }