import type { Context } from '../context.js';
import type { MonetaryAmount } from './types.js';
import type { _ConfigApplicationContext } from '../../stdlib/index.js';
/** @public */
export declare namespace CustomerBalanceApplication {
    /**
     * The result of computing how much customer balance to apply to a bill.
     * @public
     */
    interface CustomerBalanceApplicationResult {
        /** The amount of customer balance to apply to this invoice. Positive values increase the invoice amount (applying a debit), negative values decrease it (applying a credit). Set to zero to apply no balance. */
        appliedCustomerBalance: MonetaryAmount;
    }
    /**
     * The bill details provided as input to the customer balance application extension.
     * @public
     */
    interface CustomerBalanceApplicationInput {
        /** The total amount of the invoice before applying any customer balance. */
        totalAmount: MonetaryAmount;
        /** The current customer balance available to apply. Positive values indicate debits (the customer owes money), negative values indicate credits. */
        customerBalance: MonetaryAmount;
    }
    /**
     * @public
     * @deprecated Platform dispatch handles wire/SDK conversion.
     */
    function prepareArgsComputeAppliedCustomerBalance(proto: unknown): CustomerBalanceApplicationInput;
    /**
     * @public
     * @deprecated Platform dispatch handles wire/SDK conversion.
     */
    function prepareResultComputeAppliedCustomerBalance(result: CustomerBalanceApplicationResult): CustomerBalanceApplicationResult;
    /** @internal */
    function $platformWrapComputeAppliedCustomerBalance(configTransformer?: (wireConfig: unknown, appCtx: _ConfigApplicationContext) => unknown): (cls: new () => { computeAppliedCustomerBalance(...a: unknown[]): unknown }, wireArgs: unknown, wireConfig: unknown, ctx: unknown) => unknown;
    /**
     * @public
     * @deprecated Platform dispatch handles wire/SDK conversion.
     */
    const prepareArgs: typeof prepareArgsComputeAppliedCustomerBalance;
    /**
     * @public
     * @deprecated Platform dispatch handles wire/SDK conversion.
     */
    const prepareResult: typeof prepareResultComputeAppliedCustomerBalance;
    /**
     * Determines how much of the customer's balance to apply toward a bill total. The script receives the invoice total and current customer balance, then returns how much of that balance to apply.
     * @public
     */
    type ComputeAppliedCustomerBalanceFunction<Config> = (request: CustomerBalanceApplicationInput, config: Config, context: Context) => CustomerBalanceApplicationResult;
}
/**
 * @example
 * ```ts
 * import type { Billing, Context } from '@stripe/extensibility-sdk';
 *
 * // eslint-disable-next-line @typescript-eslint/no-empty-object-type
 * interface MyBalanceAppConfig {}
 *
 * export default class MyBalanceApp implements Billing.CustomerBalanceApplication<MyBalanceAppConfig> {
 *   computeAppliedCustomerBalance(
 *     request: Billing.CustomerBalanceApplication.CustomerBalanceApplicationInput,
 *     _config: MyBalanceAppConfig,
 *     _context: Context
 *   ) {
 *     // TODO: implement your customer balance logic here
 *
 *     return {
 *       appliedCustomerBalance: request.customerBalance,
 *     };
 *   }
 * }
 *
 * ```
 * @public
 */
export interface CustomerBalanceApplication<Config> {
    computeAppliedCustomerBalance: CustomerBalanceApplication.ComputeAppliedCustomerBalanceFunction<Config>;
}
//# sourceMappingURL=customer_balance_application.d.ts.map