import type Stripe from 'stripe'; import { Invoice } from '../invoice.js'; import type { Shopkeeper } from '../shopkeeper.js'; import type { ManagesInvoicesContract } from '../contracts.js'; type LineItem = Stripe.InvoiceAddLinesParams.Line; type TabItem = { type: 'tab'; description: string; amount: number; params: Partial & { price_data?: Omit, 'currency'> & { currency?: string; }; }>; }; export declare class InvoiceBuilder implements PromiseLike { #private; private shopkeeper; private owner; constructor(shopkeeper: Shopkeeper, owner: ManagesInvoicesContract); /** * Add a custom amount item to the invoice. */ addItem(description: string, amount?: number, params?: TabItem['params']): this; /** * Add a price-based item to the invoice. */ addPrice(price: string, quantity?: number, params?: Partial): this; /** * Set the number of days until the invoice is due. */ daysUntilDue(days: number): this; /** * Set the description for the invoice. */ description(description: string): this; /** * Set metadata on the invoice. */ withMetadata(metadata: Record): this; /** * Set the currency for the invoice. */ currency(currency: string): this; /** * Set raw Stripe invoice creation parameters. */ invoiceParams(params: Stripe.InvoiceCreateParams): this; /** * Set raw Stripe invoice pay parameters. */ paymentParams(params: Stripe.InvoicePayParams): this; /** * Mark the invoice to be paid automatically upon creation. */ charge(params?: Stripe.InvoicePayParams): this; /** * Mark the invoice to be sent to the customer. */ send(): this; /** * Keep the invoice as a draft (do not finalize). */ draft(): this; /** * Create the invoice with all accumulated items. */ create(): Promise; /** * PromiseLike implementation — resolves by calling create(). */ then(onfulfilled?: ((value: Invoice) => TResult1 | PromiseLike) | null, onrejected?: ((reason: unknown) => TResult2 | PromiseLike) | null): Promise; } export {};