Refactor code for readability and order
Made several changes across different files primarily focusing on readability. Arranged CSS classes in a standardized order for easier reading and maintenance. Arranged and formatted import lines, function declarations, and component return statements for legibility. Removed unnecessary React imports in some files.
This commit is contained in:
@@ -67,11 +67,11 @@ export abstract class BillingStrategyProviderService {
|
||||
amount: number;
|
||||
}>;
|
||||
|
||||
abstract getSubscription(
|
||||
subscriptionId: string,
|
||||
): Promise<UpsertSubscriptionParams & {
|
||||
// we can't always guarantee that the target account id will be present
|
||||
// so we need to make it optional and let the consumer handle it
|
||||
target_account_id: string | undefined;
|
||||
}>;
|
||||
abstract getSubscription(subscriptionId: string): Promise<
|
||||
UpsertSubscriptionParams & {
|
||||
// we can't always guarantee that the target account id will be present
|
||||
// so we need to make it optional and let the consumer handle it
|
||||
target_account_id: string | undefined;
|
||||
}
|
||||
>;
|
||||
}
|
||||
|
||||
@@ -19,4 +19,4 @@ interface LineItem {
|
||||
}
|
||||
|
||||
export type UpsertOrderParams =
|
||||
Database['public']['Functions']['upsert_order']['Args'];
|
||||
Database['public']['Functions']['upsert_order']['Args'];
|
||||
|
||||
@@ -88,9 +88,7 @@ export class StripeWebhookHandlerService
|
||||
onSubscriptionDeleted: (subscriptionId: string) => Promise<unknown>;
|
||||
onPaymentSucceeded: (sessionId: string) => Promise<unknown>;
|
||||
onPaymentFailed: (sessionId: string) => Promise<unknown>;
|
||||
onInvoicePaid: (
|
||||
data: UpsertSubscriptionParams,
|
||||
) => Promise<unknown>;
|
||||
onInvoicePaid: (data: UpsertSubscriptionParams) => Promise<unknown>;
|
||||
onEvent?(event: Stripe.Event): Promise<unknown>;
|
||||
},
|
||||
) {
|
||||
@@ -294,9 +292,7 @@ export class StripeWebhookHandlerService
|
||||
|
||||
private async handleInvoicePaid(
|
||||
event: Stripe.InvoicePaidEvent,
|
||||
onInvoicePaid: (
|
||||
data: UpsertSubscriptionParams,
|
||||
) => Promise<unknown>,
|
||||
onInvoicePaid: (data: UpsertSubscriptionParams) => Promise<unknown>,
|
||||
) {
|
||||
const stripe = await this.loadStripe();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user