wyyerd/stripe-rs

diesel compatibility

vroussea opened this issue · 1 comments

Hello, i'm trying to store my stripe IDs CustomerId, PaymentMethodId and SubscriptionId) into a postgres database by using the diesel crate.

I can't have a model including those IDs since they don't implement the diesel::Expression/AppearsOnTable traits, so i went for storing them as Strings, but I can't create back the IDs using for exemple CustomerId::from(my_string). How am i supposed to do if i want to store those ids ?

ok, I just needed to use the str::str::FromStr trait!