import { HttpService } from '@nestjs/common'; import { PaymentTransaction, Settlement } from './payment.model'; import { ReturnModelType } from '@typegoose/typegoose'; import { GenerateCheckoutUrlPayload, PerformScanPayPayload, PaymentMethod, OnTransactionSuccessPayload, PerformRefundPayloadDto, PaymentIdentifier, CreateOrderTransactionPayload } from './payment.interface'; import { RevenueMonsterService } from './gateway/revenue-monster/revenue-monster.service'; import { DineroObject } from '~backend/utils/model'; import { RestaurantService } from '~backend/business/restaurant/restaurant.service'; import { ConfigService } from '@nestjs/config'; import { MailService } from '~backend/mail/mail.service'; import mongodb from 'mongodb'; export declare class PaymentService { readonly paymentTransactionModel: ReturnModelType; private readonly settlementModel; private readonly restaurantService; private readonly revenueMonsterService; private readonly mailService; private readonly configService; private readonly httpService; private isSettling; private readonly logger; constructor(paymentTransactionModel: ReturnModelType, settlementModel: ReturnModelType, restaurantService: RestaurantService, revenueMonsterService: RevenueMonsterService, mailService: MailService, configService: ConfigService, httpService: HttpService); static filterRestaurantMethod(restaurantMethods: PaymentMethod[], identifier: PaymentIdentifier): PaymentMethod; static getCanSettleAt(createdAt: Date, method: PaymentMethod): Date; static getFullPaymentMethod(): PaymentMethod[]; getTransactions({ start, end }: { start: Date; end: Date; }): Promise; getTransactionsByRestaurant({ restaurantId, start, end, }: { restaurantId: string; start: Date; end: Date; }): Promise; getTransactionBySettlementId(id: string): Promise; getSettlements({ start, end }: { start: Date; end: Date; }): Promise; getSettlementById(id: string): Promise; getSettlementsByRestaurant({ restaurantId, start, end, }: { restaurantId: string; start: Date; end: Date; }): Promise; createOrderTransaction({ orderId, restaurantId, amount, gatewayAmount, }: CreateOrderTransactionPayload): Promise; createBillTransaction(billId: string, restaurantId: string, amount: DineroObject): Promise; update(id: string, transaction: Partial): Promise; findById(transactionId: string, populates?: string[]): any; createOnlinePay(payload: GenerateCheckoutUrlPayload): Promise; onTransactionSuccess({ method, successAt, transactionId, gatewayTransactionId, result, }: OnTransactionSuccessPayload, session?: mongodb.ClientSession, returnNew?: boolean): Promise; performScanPay({ authCode, amount, transactionId }: PerformScanPayPayload, methods: PaymentMethod[]): Promise; performRefund({ transactionId, reason, amount, }: PerformRefundPayloadDto): Promise; refetchTransactionById(transactionId: string, session?: mongodb.ClientSession): Promise; getCanSettle(time: Date): Promise; /** * @deprecated moved to payment backend */ addNewPaymentMethod(): Promise; /** * @deprecated moved to payment-backend */ dailySettlement(): void; runSettlement(time: Date): Promise; updateSettlementRemark(settlementId: any, remark: string): Promise; }