pub enum PaymentMethodType {
Card,
SepaDebit,
}Expand description
Type d’un moyen de paiement enregistré, c’est-à-dire d’un instrument conservé chez Stripe et réutilisable.
Deux variantes seulement, et c’est correct : on ne peut pas « enregistrer »
du liquide, ni un virement manuel. Un instrument enregistré porte un
stripe_payment_method_id et un stripe_customer_id — l’entité l’exige.
À ne pas confondre avec payment::PaymentMethodType, qui décrit
comment un paiement a été REÇU et compte quatre variantes, dont le
virement manuel et l’espèce.
Les deux types portaient le même nom Rust ET le même nom de schéma. utoipa
n’en publie qu’un sous un nom donné : le contrat annonçait donc
["card", "sepa_debit"] partout, y compris pour le champ
CreatePaymentRequest.payment_method_type — interdisant à tout client
engendré depuis le contrat d’enregistrer un paiement en espèces ou par
virement, deux façons parfaitement ordinaires de payer ses charges.
D’où le nom de schéma distinct. Le doc-comment précédent affirmait « aligned with Payment entity » alors qu’il en avait deux variantes sur quatre. Voir #819.
Variants§
Trait Implementations§
Source§impl Clone for PaymentMethodType
impl Clone for PaymentMethodType
Source§fn clone(&self) -> PaymentMethodType
fn clone(&self) -> PaymentMethodType
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ComposeSchema for PaymentMethodType
impl ComposeSchema for PaymentMethodType
Source§impl Debug for PaymentMethodType
impl Debug for PaymentMethodType
Source§impl<'de> Deserialize<'de> for PaymentMethodType
impl<'de> Deserialize<'de> for PaymentMethodType
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for PaymentMethodType
impl PartialEq for PaymentMethodType
Source§fn eq(&self, other: &PaymentMethodType) -> bool
fn eq(&self, other: &PaymentMethodType) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for PaymentMethodType
impl Serialize for PaymentMethodType
impl StructuralPartialEq for PaymentMethodType
Auto Trait Implementations§
impl Freeze for PaymentMethodType
impl RefUnwindSafe for PaymentMethodType
impl Send for PaymentMethodType
impl Sync for PaymentMethodType
impl Unpin for PaymentMethodType
impl UnsafeUnpin for PaymentMethodType
impl UnwindSafe for PaymentMethodType
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more