/// /// import { ModuleRef } from "@nestjs/core"; import { Order, Payment, PaymentMethodService, RequestContext, TransactionalConnection } from "@deenruv/core"; import Stripe from "stripe"; import { DeenruvStripeClient } from "./stripe-client"; import { StripePluginOptions } from "./types"; export declare class StripeService { private options; private connection; private paymentMethodService; private moduleRef; constructor(options: StripePluginOptions, connection: TransactionalConnection, paymentMethodService: PaymentMethodService, moduleRef: ModuleRef); createPaymentIntent(ctx: RequestContext, order: Order): Promise; constructEventFromPayload(ctx: RequestContext, order: Order, payload: Buffer, signature: string): Promise; createRefund(ctx: RequestContext, order: Order, payment: Payment, amount: number): Promise>; /** * Get Stripe client based on eligible payment methods for order */ getStripeClient(ctx: RequestContext, order: Order): Promise; private findOrThrowArgValue; /** * Returns the stripeCustomerId if the Customer has one. If that's not the case, queries Stripe to check * if the customer is already registered, in which case it saves the id as stripeCustomerId and returns it. * Otherwise, creates a new Customer record in Stripe and returns the generated id. */ private getStripeCustomerId; }