pub enum InputCredentials {
ApplePay(InputCredentialsApplePay),
GooglePay(InputCredentialsGooglePay),
New(InputCredentialsNew),
Saved(InputCredentialsSaved),
// some variants omitted
}
Expand description
Contains information about the payment method chosen by the user
Variants§
ApplePay(InputCredentialsApplePay)
Applies if a user enters new credentials using Apple Pay
GooglePay(InputCredentialsGooglePay)
Applies if a user enters new credentials using Google Pay
New(InputCredentialsNew)
Applies if a user enters new credentials on a payment provider website
Saved(InputCredentialsSaved)
Applies if a user chooses some previously saved payment credentials. To use their previously saved credentials, the user must have a valid temporary password
Implementations§
Source§impl InputCredentials
impl InputCredentials
pub fn from_json<S: AsRef<str>>(json: S) -> RTDResult<Self>
pub fn is_apple_pay(&self) -> bool
pub fn is_google_pay(&self) -> bool
pub fn is_new(&self) -> bool
pub fn is_saved(&self) -> bool
pub fn on_apple_pay<F: FnOnce(&InputCredentialsApplePay)>( &self, fnc: F, ) -> &Self
pub fn on_google_pay<F: FnOnce(&InputCredentialsGooglePay)>( &self, fnc: F, ) -> &Self
pub fn on_new<F: FnOnce(&InputCredentialsNew)>(&self, fnc: F) -> &Self
pub fn on_saved<F: FnOnce(&InputCredentialsSaved)>(&self, fnc: F) -> &Self
pub fn as_apple_pay(&self) -> Option<&InputCredentialsApplePay>
pub fn as_google_pay(&self) -> Option<&InputCredentialsGooglePay>
pub fn as_new(&self) -> Option<&InputCredentialsNew>
pub fn as_saved(&self) -> Option<&InputCredentialsSaved>
pub fn apple_pay<T: AsRef<InputCredentialsApplePay>>(t: T) -> Self
pub fn google_pay<T: AsRef<InputCredentialsGooglePay>>(t: T) -> Self
pub fn new<T: AsRef<InputCredentialsNew>>(t: T) -> Self
pub fn saved<T: AsRef<InputCredentialsSaved>>(t: T) -> Self
Trait Implementations§
Source§impl AsRef<InputCredentials> for InputCredentials
impl AsRef<InputCredentials> for InputCredentials
Source§fn as_ref(&self) -> &InputCredentials
fn as_ref(&self) -> &InputCredentials
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Clone for InputCredentials
impl Clone for InputCredentials
Source§fn clone(&self) -> InputCredentials
fn clone(&self) -> InputCredentials
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InputCredentials
impl Debug for InputCredentials
Source§impl Default for InputCredentials
impl Default for InputCredentials
Source§impl<'de> Deserialize<'de> for InputCredentials
impl<'de> Deserialize<'de> for InputCredentials
Source§fn deserialize<D>(deserializer: D) -> Result<InputCredentials, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<InputCredentials, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl RObject for InputCredentials
impl RObject for InputCredentials
Auto Trait Implementations§
impl Freeze for InputCredentials
impl RefUnwindSafe for InputCredentials
impl Send for InputCredentials
impl Sync for InputCredentials
impl Unpin for InputCredentials
impl UnwindSafe for InputCredentials
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
Mutably borrows from an owned value. Read more