1use std::fmt::Display;
4
5use serde::{Deserialize, Serialize};
6
7#[derive(Clone, Debug, Serialize, Deserialize)]
9pub struct AddressID(String);
10
11impl<T: Display> From<T> for AddressID {
12 fn from(value: T) -> Self {
13 AddressID(value.to_string())
14 }
15}
16
17impl AsRef<str> for AddressID {
18 fn as_ref(&self) -> &str {
19 &self.0
20 }
21}
22
23#[derive(Clone, Debug, Serialize, Deserialize)]
25pub struct CustomerID(String);
26
27impl<T: Display> From<T> for CustomerID {
28 fn from(value: T) -> Self {
29 CustomerID(value.to_string())
30 }
31}
32
33impl AsRef<str> for CustomerID {
34 fn as_ref(&self) -> &str {
35 &self.0
36 }
37}
38
39#[derive(Clone, Debug, Serialize, Deserialize)]
41pub struct AdjustmentID(String);
42
43#[derive(Clone, Debug, Serialize, Deserialize)]
45pub struct TransactionID(String);
46
47impl<T: Display> From<T> for TransactionID {
48 fn from(value: T) -> Self {
49 TransactionID(value.to_string())
50 }
51}
52
53impl AsRef<str> for TransactionID {
54 fn as_ref(&self) -> &str {
55 &self.0
56 }
57}
58#[derive(Clone, Debug, Serialize, Deserialize)]
60pub struct SubscriptionID(String);
61
62impl<T: Display> From<T> for SubscriptionID {
63 fn from(value: T) -> Self {
64 SubscriptionID(value.to_string())
65 }
66}
67
68impl AsRef<str> for SubscriptionID {
69 fn as_ref(&self) -> &str {
70 &self.0
71 }
72}
73
74#[derive(Clone, Debug, Serialize, Deserialize)]
76pub struct TransactionItemID(String);
77
78#[derive(Clone, Debug, Serialize, Deserialize)]
80pub struct AdjustmentItemID(String);
81
82#[derive(Clone, Debug, Serialize, Deserialize)]
84pub struct BusinessID(String);
85
86impl<T: Display> From<T> for BusinessID {
87 fn from(value: T) -> Self {
88 BusinessID(value.to_string())
89 }
90}
91
92impl AsRef<str> for BusinessID {
93 fn as_ref(&self) -> &str {
94 &self.0
95 }
96}
97
98#[derive(Clone, Debug, Serialize, Deserialize)]
100pub struct PaymentMethodID(String);
101
102impl<T: Display> From<T> for PaymentMethodID {
103 fn from(value: T) -> Self {
104 PaymentMethodID(value.to_string())
105 }
106}
107
108impl AsRef<str> for PaymentMethodID {
109 fn as_ref(&self) -> &str {
110 &self.0
111 }
112}
113
114#[derive(Clone, Debug, Serialize, Deserialize)]
116pub struct CustomerPortalSessionID(String);
117
118#[derive(Clone, Debug, Serialize, Deserialize)]
120pub struct DiscountID(String);
121
122impl<T: Display> From<T> for DiscountID {
123 fn from(value: T) -> Self {
124 DiscountID(value.to_string())
125 }
126}
127
128impl AsRef<str> for DiscountID {
129 fn as_ref(&self) -> &str {
130 &self.0
131 }
132}
133
134#[derive(Clone, Debug, Serialize, Deserialize)]
136pub struct DiscountCode(String);
137
138#[derive(Clone, Debug, Serialize, Deserialize)]
140pub struct EventID(String);
141
142#[derive(Clone, Debug, Serialize, Deserialize)]
144pub struct PriceID(String);
145
146impl<T: Display> From<T> for PriceID {
147 fn from(value: T) -> Self {
148 PriceID(value.to_string())
149 }
150}
151
152impl AsRef<str> for PriceID {
153 fn as_ref(&self) -> &str {
154 &self.0
155 }
156}
157
158#[derive(Clone, Debug, Serialize, Deserialize)]
160pub struct ProductID(pub String);
161
162impl<T: Display> From<T> for ProductID {
163 fn from(value: T) -> Self {
164 ProductID(value.to_string())
165 }
166}
167
168impl AsRef<str> for ProductID {
170 fn as_ref(&self) -> &str {
171 &self.0
172 }
173}
174
175#[derive(Clone, Debug, Serialize, Deserialize)]
177pub struct NotificationID(String);
178
179#[derive(Clone, Debug, Serialize, Deserialize)]
181pub struct NotificationSettingID(String);
182
183#[derive(Clone, Debug, Serialize, Deserialize)]
185pub struct NotificationLogID(String);
186
187#[derive(Clone, Debug, Serialize, Deserialize)]
189pub struct EndpointSecretKey(String);
190
191#[derive(Clone, Debug, Serialize, Deserialize)]
193pub struct PaddleID(String);
194
195#[derive(Clone, Debug, Serialize, Deserialize)]
197pub struct SimulationEventID(String);
198
199#[derive(Clone, Debug, Serialize, Deserialize)]
201pub struct SimulationRunID(String);
202
203#[derive(Clone, Debug, Serialize, Deserialize)]
205pub struct SimulationID(String);
206
207#[derive(Clone, Debug, Serialize, Deserialize)]
209pub struct InvoiceId(String);