Refactored classes according to new convention

This commit is contained in:
giancarlo
2024-04-23 00:10:12 +08:00
parent 70da6ef1fa
commit 17e0781581
30 changed files with 351 additions and 131 deletions

View File

@@ -14,6 +14,12 @@ import {
import { BillingGatewayFactoryService } from './billing-gateway-factory.service';
export function createBillingGatewayService(
provider: z.infer<typeof BillingProviderSchema>,
) {
return new BillingGatewayService(provider);
}
/**
* @description The billing gateway service to interact with the billing provider of choice (e.g. Stripe)
* @class BillingGatewayService
@@ -23,7 +29,7 @@ import { BillingGatewayFactoryService } from './billing-gateway-factory.service'
* const provider = 'stripe';
* const billingGatewayService = new BillingGatewayService(provider);
*/
export class BillingGatewayService {
class BillingGatewayService {
constructor(
private readonly provider: z.infer<typeof BillingProviderSchema>,
) {}