import { Methods } from "./methods.js"; import { Payout, PayoutMinimal } from "./types/gumroad.js"; //#region src/payouts.d.ts /** Bindings for Array of {@link PayoutMinimal} */ interface PayoutsProps { /** The key for next page of payouts if available */ readonly next_page_key: string | undefined; /** The API endpoint for next page of payouts if available */ readonly next_page_url: string | undefined; /** * Retrieves the next payouts * * @returns On success, an Array of {@link PayoutMinimal} | `null` if next page does not exists */ next(requestOptions?: { signal?: AbortSignal; }): Promise<(PayoutMinimal[] & PayoutsProps) | null>; } /** A class having API methods related to Payouts */ declare class PayoutsMethods extends Methods { protected _bindPayouts(object: { next_page_url?: string; next_page_key?: string; payouts: PayoutMinimal[]; }): PayoutMinimal[] & PayoutsProps; /** * Retrieves all of the payouts for the authenticated user. * * @param options (Optional) Options * * @returns On success, an Array of {@link PayoutMinimal} * * @see https://app.gumroad.com/api#get-/payouts * * **Only available with the `view_payouts` scope.** */ list(options?: { /** * Date in form `YYYY-MM-DD` * * Only return payouts after this date */ after?: string; /** * Date in form `YYYY-MM-DD` * * Only return payouts before this date */ before?: string; /** A key representing a page of results. It is given in the response as `next_page_key`. */ page_key?: string; /** * Set to `false` to exclude the upcoming payout from the response. * * @default true */ include_upcoming?: boolean; }, { signal }?: { signal?: AbortSignal; }): Promise; /** * Retrieves the details of a specific payout by this user. * * @param payout_id The id of the payout * @param options (Optional) Options * * @returns On success, a {@link Payout} * * @see https://app.gumroad.com/api#get-/payouts/:id * * **Only available with the `view_payouts` scope.** */ get(payout_id: string, options?: { /** * Set to `false` to exclude the `sales`, `refunded_sales`, and `disputed_sales` details from the response. * * @default true */ include_sales?: boolean; /** * Set to `true` to include the same transaction details in the response as exported payout CSV. * All balance-affecting transactions included in the payout will be listed in a `transactions` array. */ include_transactions?: boolean; }, { signal }?: { signal?: AbortSignal; }): Promise; /** * Retrieves the details of upcoming payouts for this user. * There can be up to 2 upcoming payouts at any given time. * * @param options (Optional) Options * * @returns On success, an Array of {@link Payout} * * @see https://app.gumroad.com/api#get-/payouts/upcoming * * **Only available with the `view_payouts` scope.** */ upcoming(options?: { /** * Set to `false` to exclude the `sales`, `refunded_sales`, and `disputed_sales` details from the response. * * @default true */ include_sales?: boolean; /** * Set to `true` to include the same transaction details in the response as exported payout CSV. * All balance-affecting transactions included in the payout will be listed in a `transactions` array. * * @default false */ include_transactions?: boolean; }, { signal }?: { signal?: AbortSignal; }): Promise; } //#endregion export { PayoutsMethods, PayoutsProps }; //# sourceMappingURL=payouts.d.ts.map