21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
import { ConfigService } from '@nestjs/config';
|
|
import { Repository } from 'typeorm';
|
|
import { Subscription } from './entities/subscription.entity';
|
|
import { Transaction, PaymentProvider } from './entities/transaction.entity';
|
|
import { Tenant } from '../auth/entities/tenant.entity';
|
|
import { MailService } from '../common/mail.service';
|
|
export declare class BillingService {
|
|
private subscriptionRepository;
|
|
private transactionRepository;
|
|
private tenantRepository;
|
|
private configService;
|
|
private mailService;
|
|
private readonly logger;
|
|
constructor(subscriptionRepository: Repository<Subscription>, transactionRepository: Repository<Transaction>, tenantRepository: Repository<Tenant>, configService: ConfigService, mailService: MailService);
|
|
getIframeId(): string;
|
|
getSubscription(tenantId: string): Promise<Subscription>;
|
|
processSuccessfulPayment(externalTxId: string, provider: PaymentProvider, amount: number, metadata: any): Promise<void>;
|
|
private upgradeTenantPlan;
|
|
getTransactionHistory(tenantId: string): Promise<Transaction[]>;
|
|
}
|