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 BillingPaymentFailedPayload {
33 pub user_name: String,
34 pub invoice_date: String,
35 pub amount_due_formatted: String,
36 pub payment_url: String,
37 pub support_url: String,
38}
39
40#[derive(Debug, Clone, Serialize, Deserialize)]
41pub struct OverageInvoiceCreatedPayload {
42 pub user_name: String,
43 pub period: String,
44 pub overage_disputes: String,
45 pub overage_amount_formatted: String,
46 pub payment_url: String,
47 pub support_url: String,
48}
49
50#[derive(Debug, Clone, Serialize, Deserialize)]
51pub struct UpcomingInvoicePayload {
52 pub user_name: String,
53 pub plan_name: String,
54 pub amount_formatted: String,
55 pub invoice_date: String,
56 pub dashboard_url: String,
57 pub support_url: String,
58}
59
60#[derive(Debug, Clone, Serialize, Deserialize)]
61pub struct TrialExpiredPayload {
62 pub user_name: String,
63 pub plan_name: String,
64 pub upgrade_url: String,
65 pub support_url: String,
66}
67
68#[derive(Debug, Clone, Serialize, Deserialize)]
69pub struct TrialEndingPayload {
70 pub user_name: String,
71 pub plan_name: String,
72 pub trial_end_date: String,
73 pub days_remaining: String,
74 pub upgrade_url: String,
75 pub support_url: String,
76}
77
78#[derive(Debug, Clone, Serialize, Deserialize)]
79pub struct TrialStartedPayload {
80 pub user_name: String,
81 pub plan_name: String,
82 pub trial_period_days: String,
83 pub trial_end_date: String,
84 pub dashboard_url: String,
85 pub upgrade_url: String,
86 pub support_url: String,
87}
88
89#[derive(Debug, Clone, Serialize, Deserialize)]
90pub struct PlanDowngradedPayload {
91 pub user_name: String,
92 pub old_tier: 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 PlanUpgradedPayload {
101 pub user_name: String,
102 pub new_tier: String,
103 pub effective_date: String,
104 pub plan_url: String,
105 pub support_url: String,
106}
107
108#[derive(Debug, Clone, Serialize, Deserialize)]
109pub struct PlanRenewedPayload {
110 pub user_name: String,
111 pub plan_name: String,
112 pub amount_formatted: String,
113 pub next_billing_date: String,
114 pub dashboard_url: String,
115 pub support_url: String,
116}
117
118#[derive(Debug, Clone, Serialize, Deserialize)]
119pub struct PlanCancelledPayload {
120 pub user_name: String,
121 pub plan_name: String,
122 pub cancel_at: String,
123 pub plans_url: String,
124 pub support_url: String,
125}
126
127#[derive(Debug, Clone, Serialize, Deserialize)]
128pub struct BillingPlanCancelledPayload {
129 pub user_name: String,
130 pub cancellation_date: String,
131 pub dashboard_url: String,
132 pub support_url: String,
133}
134
135#[derive(Debug, Clone, Serialize, Deserialize)]
136pub struct PlanPurchasedPayload {
137 pub user_name: String,
138 pub plan_name: String,
139 pub billing_interval: String,
140 pub amount_formatted: String,
141 pub next_billing_date: String,
142 pub dashboard_url: String,
143 pub support_url: String,
144}
145
146#[derive(Debug, Clone, Serialize, Deserialize)]
147pub struct SuccessFeeInvoicePayload {
148 pub recovered_amount_formatted: String,
149 pub period: String,
150 pub success_fee_amount_formatted: String,
151 pub user_name: String,
152 pub disputes_won_count: String,
153 pub payment_url: String,
154 pub support_url: String,
155}
156
157#[derive(Debug, Clone, Serialize, Deserialize)]
158pub struct SuccessFeeAddedPayload {
159 pub user_name: String,
160 pub order_number: String,
161 pub success_fee_recorded_formatted: String,
162 pub dispute_id: String,
163 pub billing_url: String,
164 pub dashboard_url: String,
165 pub support_url: String,
166}