To anyone following the changes here, penny for your thoughts about using well-typed ids in more places (following a somewhat similar trend as switching from String to enum elsewhere).
Generally the id would be that this helps catch errors earlier when receiving client values (viaFromStr::from_str), and when passing values from a Stripe response to a stripe request, it makes it more difficult to accidentally pass a value to an incorrect API (by requiring the correct id type as part of e.g. Customer::get).
On the downsides, possibly increases friction when working with databases.
To anyone following the changes here, penny for your thoughts about using well-typed ids in more places (following a somewhat similar trend as switching from
String
toenum
elsewhere).Generally the id would be that this helps catch errors earlier when receiving client values (via
FromStr::from_str
), and when passing values from a Stripe response to a stripe request, it makes it more difficult to accidentally pass a value to an incorrect API (by requiring the correct id type as part of e.g.Customer::get
).On the downsides, possibly increases friction when working with databases.