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 CashbackRulesClient { type Options = BaseClientOptions; interface RequestOptions extends BaseRequestOptions { } } /** * A Cashback Rule pays a platform's direct connected accounts back a share of their card spend, funded by the platform. Each rule sets a rate, an eligibility window, and optional merchant filters, and can be limited to one connected account. * * Use the Cashback Rules API to create, update, and list the rules your platform funds, then pay out cashback on demand from your available USD balance. */ export declare class CashbackRulesClient { protected readonly _options: NormalizedClientOptionsWithAuth; constructor(options?: CashbackRulesClient.Options); /** * Creates a future-dated card cashback rule for your direct connected accounts, funded by the authenticated platform account. Creating a rule does not transfer funds; pay cashback out with `POST /cashback_rules/payout`. Requires `payout:transfer_funds`. Supports `Idempotency-Key` for safe retries. * * @param {Whop.CreateCashbackRulesRequest} request * @param {CashbackRulesClient.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.cashbackRules.create({ * rate_bps: 500, * starts_at: "2026-01-01T12:00:00Z" * }) */ create(request: Whop.CreateCashbackRulesRequest, requestOptions?: CashbackRulesClient.RequestOptions): core.HttpResponsePromise; private __create; /** * Lists the cashback rules funded by the authenticated platform account, including scheduled, expired, and discarded rules. Requires an account-scoped credential with `payout:transfer:read`. * * @param {Whop.ListCashbackRulesRequest} request * @param {CashbackRulesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.cashbackRules.list() */ list(request?: Whop.ListCashbackRulesRequest, requestOptions?: CashbackRulesClient.RequestOptions): Promise>; /** * Pays out cashback on demand from the authenticated platform's available USD balance to its direct connected accounts. Covers completed, unpaid card transactions created before the request, each under its latest matching rule, which must be funded by the authenticated platform. Filters combine, and an empty body includes every eligible transaction. Payouts process in the background and amounts are calculated then, so the response confirms queuing, not payment. If a payout fails for insufficient funds, add USD to the platform's balance. Requires `payout:transfer_funds`. Supports `Idempotency-Key`, and overlapping requests cannot pay the same card transaction twice. * * @param {Whop.PayoutCashbackRulesRequest} request * @param {CashbackRulesClient.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.cashbackRules.payout() */ payout(request?: Whop.PayoutCashbackRulesRequest, requestOptions?: CashbackRulesClient.RequestOptions): core.HttpResponsePromise; private __payout; /** * Updates the merchant filters, description, or expiration of a cashback rule funded by the authenticated platform account; its start, rate, and accounts can't change. Omitted fields stay unchanged. Scheduled, active, and expired rules can be updated, but discarded rules can't. Updating a rule does not transfer funds. Requires `payout:transfer_funds`. * * @param {Whop.UpdateCashbackRulesRequest} request * @param {CashbackRulesClient.RequestOptions} requestOptions - Request-specific configuration. * * @throws {@link Whop.BadRequestError} * @throws {@link Whop.UnauthorizedError} * @throws {@link Whop.ForbiddenError} * @throws {@link Whop.NotFoundError} * @throws {@link errors.WhopError} * @throws {@link errors.WhopTimeoutError} * * @example * await client.cashbackRules.update({ * id: "id" * }) */ update(request: Whop.UpdateCashbackRulesRequest, requestOptions?: CashbackRulesClient.RequestOptions): core.HttpResponsePromise; private __update; }