import { default as Stripe } from 'stripe';
import { SubscriptionStatus } from '../../repository/billing/IBillingRepository';
import { IBillingProviderService } from './IBillingProviderService';
export declare class StripeBillingService implements IBillingProviderService {
    private stripe;
    constructor(stripe: Stripe);
    createCustomer(args: Parameters<IBillingProviderService["createCustomer"]>[0]): Promise<{
        stripeCustomerId: string;
    }>;
    createPaymentIntent(args: Parameters<IBillingProviderService["createPaymentIntent"]>[0]): Promise<{
        id: string;
        client_secret: string | null;
    }>;
    createOneTimeCheckout(args: {
        priceId: string;
        quantity: number;
        successUrl: string;
        cancelUrl: string;
        metadata?: Record<string, string>;
        allowPromotionCodes?: boolean;
    }): Promise<{
        checkoutUrl: string | null;
        sessionId: string;
    }>;
    createSubscriptionCheckout(args: Parameters<IBillingProviderService["createSubscriptionCheckout"]>[0]): Promise<{
        checkoutUrl: string | null;
        sessionId: string;
    }>;
    createPrice(args: Parameters<IBillingProviderService["createPrice"]>[0]): Promise<{
        priceId: string;
    }>;
    handleSubscriptionCreation(subscriptionId: string): Promise<void>;
    handleSubscriptionCancel(subscriptionId: string): Promise<void>;
    handleSubscriptionUpdate(args: Parameters<IBillingProviderService["handleSubscriptionUpdate"]>[0]): Promise<void>;
    handleEndTrial(subscriptionId: string): Promise<void>;
    checkoutSessionIsPaid(paymentId: string): Promise<boolean>;
    getSubscriptionStatus(subscriptionId: string): Promise<SubscriptionStatus | null>;
    getCheckoutSession(checkoutSessionId: string): Promise<Stripe.Response<Stripe.Checkout.Session>>;
    getCustomer(customerId: string): Promise<Stripe.Response<Stripe.Customer | Stripe.DeletedCustomer>>;
    getSubscriptions(customerId: string): Promise<Stripe.Subscription[]>;
    updateCustomer(args: Parameters<IBillingProviderService["updateCustomer"]>[0]): Promise<void>;
    getPrice(priceId: string): Promise<Stripe.Response<Stripe.Price>>;
    extractSubscriptionDates(subscription: {
        start_date: number;
        trial_end?: number | null;
        cancel_at?: number | null;
    }): {
        subscriptionStart: Date;
        subscriptionTrialEnd: Date | null;
        subscriptionEnd: Date | null;
    };
    mapStripeStatusToCalStatus({ stripeStatus, subscriptionId, }: {
        stripeStatus: string;
        subscriptionId: string;
    }): SubscriptionStatus;
    createInvoiceItem(args: Parameters<IBillingProviderService["createInvoiceItem"]>[0]): Promise<{
        invoiceItemId: string;
    }>;
    deleteInvoiceItem(invoiceItemId: string): Promise<void>;
    createInvoice(args: Parameters<IBillingProviderService["createInvoice"]>[0]): Promise<{
        invoiceId: string;
    }>;
    finalizeInvoice(invoiceId: string): Promise<{
        invoiceUrl: string | null;
    }>;
    voidInvoice(invoiceId: string): Promise<void>;
    getPaymentIntentFailureReason(paymentIntentId: string): Promise<string | null>;
    hasDefaultPaymentMethod(args: Parameters<IBillingProviderService["hasDefaultPaymentMethod"]>[0]): Promise<boolean>;
    createSubscriptionUsageRecord(args: Parameters<IBillingProviderService["createSubscriptionUsageRecord"]>[0]): Promise<void>;
    getSubscription(subscriptionId: string): Promise<{
        items: {
            id: string;
            quantity: number;
            price: {
                unit_amount: number | null;
                recurring: Stripe.Price.Recurring | null;
            };
        }[];
        customer: string;
        status: Stripe.Subscription.Status;
        current_period_start: number;
        current_period_end: number;
        trial_end: number | null;
    } | null>;
    listInvoices(args: {
        customerId: string;
        subscriptionId?: string;
        limit: number;
        startingAfter?: string;
        createdGte?: number;
        createdLte?: number;
    }): Promise<{
        invoices: {
            id: string;
            number: string | null;
            created: number;
            amountDue: number;
            amountPaid: number;
            currency: string;
            status: Stripe.Invoice.Status | null;
            hostedInvoiceUrl: string | null;
            invoicePdf: string | null;
            lineItems: {
                id: string;
                description: string | null;
                amount: number;
                quantity: number | null;
            }[];
            description: string | null;
            paymentMethod: {
                type: string;
                card?: {
                    last4: string;
                    brand: string;
                };
            } | null;
        }[];
        hasMore: boolean;
    }>;
    private extractPaymentMethod;
}
//# sourceMappingURL=StripeBillingService.d.ts.map