pub struct CheckoutProPreferences {
pub payment_methods: Option<PaymentMethods>,
pub notification_url: Option<String>,
pub statement_descriptor: String,
pub external_reference: Option<String>,
/* private fields */
}
Fields§
§payment_methods: Option<PaymentMethods>
Describes Checkout Pro’s payment methods and attributes.
notification_url: Option<String>
Sets up an IPN(instant payment notification) URL to notify when payment updates.
statement_descriptor: String
Depending on the card brand, the description (attribute value) will appear on the buyer’s card invoice.
external_reference: Option<String>
Implementations§
Source§impl CheckoutProPreferences
impl CheckoutProPreferences
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a blank CheckoutProPreferences
.
You need to set at least a Payer
, and one Item
, otherwise it will fail to validate.
Sourcepub fn set_auto_return(self, auto_return: AutoReturn) -> Self
pub fn set_auto_return(self, auto_return: AutoReturn) -> Self
Sets AutoReturn
.
Sourcepub fn set_limited_offer(
self,
from_date: OffsetDateTime,
end_date: OffsetDateTime,
) -> Self
pub fn set_limited_offer( self, from_date: OffsetDateTime, end_date: OffsetDateTime, ) -> Self
Sets the preference to begin on from_date
and expire at end_date
.
pub fn set_payer(self, payer: CheckoutProPayer) -> Self
Sourcepub fn set_backurls(
self,
success: Option<String>,
pending: Option<String>,
failure: Option<String>,
) -> Self
pub fn set_backurls( self, success: Option<String>, pending: Option<String>, failure: Option<String>, ) -> Self
Sets the BackUrls
.
pub fn set_items(self, items: Vec<Item>) -> Self
Trait Implementations§
Source§impl Clone for CheckoutProPreferences
impl Clone for CheckoutProPreferences
Source§fn clone(&self) -> CheckoutProPreferences
fn clone(&self) -> CheckoutProPreferences
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 CheckoutProPreferences
impl Debug for CheckoutProPreferences
Source§impl Default for CheckoutProPreferences
impl Default for CheckoutProPreferences
Source§impl<'de> Deserialize<'de> for CheckoutProPreferences
impl<'de> Deserialize<'de> for CheckoutProPreferences
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for CheckoutProPreferences
impl PartialEq for CheckoutProPreferences
Source§impl Serialize for CheckoutProPreferences
impl Serialize for CheckoutProPreferences
impl StructuralPartialEq for CheckoutProPreferences
Auto Trait Implementations§
impl Freeze for CheckoutProPreferences
impl RefUnwindSafe for CheckoutProPreferences
impl Send for CheckoutProPreferences
impl Sync for CheckoutProPreferences
impl Unpin for CheckoutProPreferences
impl UnwindSafe for CheckoutProPreferences
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