1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Serialize, Deserialize)]
4pub struct WelcomePayload {
5 pub user_name: String,
6 pub plan_name: String,
7 pub dashboard_url: String,
8 pub support_url: String,
9}
10
11#[derive(Debug, Clone, Serialize, Deserialize)]
12pub struct PaymentSucceededPayload {
13 pub user_name: String,
14 pub plan_name: String,
15 pub amount_formatted: String,
16 pub paid_date: String,
17 pub dashboard_url: String,
18 pub support_url: String,
19}
20
21#[derive(Debug, Clone, Serialize, Deserialize)]
22pub struct PaymentFailedPayload {
23 pub user_name: String,
24 pub plan_name: String,
25 pub amount_formatted: String,
26 pub attempt_date: String,
27 pub update_payment_url: String,
28 pub support_url: String,
29}
30
31#[derive(Debug, Clone, Serialize, Deserialize)]
32pub struct OverageInvoiceCreatedPayload {
33 pub user_name: String,
34 pub period: String,
35 pub overage_disputes: String,
36 pub overage_amount_formatted: String,
37 pub payment_url: String,
38 pub support_url: String,
39}
40
41#[derive(Debug, Clone, Serialize, Deserialize)]
42pub struct UpcomingInvoicePayload {
43 pub user_name: String,
44 pub plan_name: String,
45 pub amount_formatted: String,
46 pub invoice_date: String,
47 pub dashboard_url: String,
48 pub support_url: String,
49}
50
51#[derive(Debug, Clone, Serialize, Deserialize)]
52pub struct TrialExpiredPayload {
53 pub user_name: String,
54 pub plan_name: String,
55 pub upgrade_url: String,
56 pub support_url: String,
57}
58
59#[derive(Debug, Clone, Serialize, Deserialize)]
60pub struct TrialEndingPayload {
61 pub user_name: String,
62 pub plan_name: String,
63 pub trial_end_date: String,
64 pub days_remaining: String,
65 pub upgrade_url: String,
66 pub support_url: String,
67}
68
69#[derive(Debug, Clone, Serialize, Deserialize)]
70pub struct TrialStartedPayload {
71 pub user_name: String,
72 pub plan_name: String,
73 pub trial_period_days: String,
74 pub trial_end_date: String,
75 pub dashboard_url: String,
76 pub upgrade_url: String,
77 pub support_url: String,
78}
79
80#[derive(Debug, Clone, Serialize, Deserialize)]
81pub struct PlanDowngradedPayload {
82 pub user_name: String,
83 pub old_tier: String,
84 pub new_tier: String,
85 pub effective_date: String,
86 pub plan_url: String,
87 pub support_url: String,
88}
89
90#[derive(Debug, Clone, Serialize, Deserialize)]
91pub struct PlanUpgradedPayload {
92 pub user_name: String,
93 pub new_tier: String,
94 pub effective_date: String,
95 pub plan_url: String,
96 pub support_url: String,
97}
98
99#[derive(Debug, Clone, Serialize, Deserialize)]
100pub struct PlanRenewedPayload {
101 pub user_name: String,
102 pub plan_name: String,
103 pub amount_formatted: String,
104 pub next_billing_date: String,
105 pub dashboard_url: String,
106 pub support_url: String,
107}
108
109#[derive(Debug, Clone, Serialize, Deserialize)]
110pub struct PlanCancelledPayload {
111 pub user_name: String,
112 pub plan_name: String,
113 pub cancel_at: String,
114 pub plans_url: String,
115 pub support_url: String,
116}
117
118#[derive(Debug, Clone, Serialize, Deserialize)]
119pub struct PlanPurchasedPayload {
120 pub user_name: String,
121 pub plan_name: String,
122 pub billing_interval: String,
123 pub amount_formatted: String,
124 pub next_billing_date: String,
125 pub dashboard_url: String,
126 pub support_url: String,
127}