feat: add manual subscription finalization functionality and support for expired plan notifications
This commit is contained in:
@@ -36,6 +36,11 @@ export type CreatePlanSuscriptionParams = {
|
||||
lastPaymentPreferenceId?: string;
|
||||
lastPaymentAt?: Date;
|
||||
lastPaymentType?: LastPlanPaymentType;
|
||||
downgradedFromPlanId?: string;
|
||||
downgradedFromPlanName?: string;
|
||||
downgradedFromPlanCode?: string;
|
||||
downgradedAt?: Date;
|
||||
downgradeReason?: DowngradeReason;
|
||||
};
|
||||
|
||||
export type CancellPlanSuscriptionParams = {
|
||||
@@ -65,6 +70,7 @@ export type MPPreApprovalResponse = {
|
||||
|
||||
export type ToFreePlanParams = {
|
||||
sessionUser: string;
|
||||
downgradeReason?: DowngradeReason;
|
||||
};
|
||||
|
||||
export type ToMpParams = {
|
||||
@@ -101,6 +107,7 @@ export type VerifyPendingPlanPaymentResponse = {
|
||||
|
||||
export type LastPlanPaymentStatus = "rejected" | "failed" | "cancelled";
|
||||
export type LastPlanPaymentType = "new" | "extension" | "upgrade";
|
||||
export type DowngradeReason = "expired";
|
||||
|
||||
export interface GetSuscriptionInitPointResponse {
|
||||
init_point: string;
|
||||
@@ -137,6 +144,11 @@ export interface IPlanSuscription {
|
||||
lastPaymentPreferenceId?: string;
|
||||
lastPaymentAt?: Date;
|
||||
lastPaymentType?: LastPlanPaymentType;
|
||||
downgradedFromPlanId?: string;
|
||||
downgradedFromPlanName?: string;
|
||||
downgradedFromPlanCode?: string;
|
||||
downgradedAt?: Date;
|
||||
downgradeReason?: DowngradeReason;
|
||||
}
|
||||
|
||||
export interface ISubscriptionInfo {
|
||||
@@ -155,6 +167,11 @@ export interface ISubscriptionInfo {
|
||||
lastPaymentPreferenceId?: string;
|
||||
lastPaymentAt?: Date;
|
||||
lastPaymentType?: LastPlanPaymentType;
|
||||
downgradedFromPlanId?: string;
|
||||
downgradedFromPlanName?: string;
|
||||
downgradedFromPlanCode?: string;
|
||||
downgradedAt?: Date;
|
||||
downgradeReason?: DowngradeReason;
|
||||
}
|
||||
|
||||
export interface IPlanSuscriptionsAdapter {
|
||||
|
||||
Reference in New Issue
Block a user