This commit introduces the updateSubscription method to the BillingStrategyProviderService, ensuring that subscriptions can be updated within the billing core. Additionally, a refactor has been applied to the BillingGatewayFactoryService and stripe-billing-strategy.service to improve error handling and the robustness of subscription updates. Logging in the webhook route has been adjusted for clarity and the data model has been enhanced.
8 lines
196 B
TypeScript
8 lines
196 B
TypeScript
import { z } from 'zod';
|
|
|
|
export const UpdateSubscriptionParamsSchema = z.object({
|
|
subscriptionId: z.string().min(1),
|
|
subscriptionItemId: z.string().min(1),
|
|
quantity: z.number().min(1),
|
|
});
|