pub struct CreateSubscriptionRequest {
pub setup_intent_id: Option<String>,
pub plan_type: PlanType,
pub promotion_code: Option<String>,
}
Expand description
Request to create a subscription.
If no payment method information is passed with, then the system will attempt to use the users existing payment method. Otherwise, a payment method will be saved.
Fields§
§setup_intent_id: Option<String>
Optional setup intent ID if a payment method was created prior to subscribing. Setting this mark the payment method as the default payment method.
plan_type: PlanType
Plan to create the subscription for
promotion_code: Option<String>
Promotion code
Trait Implementations§
Source§impl Clone for CreateSubscriptionRequest
impl Clone for CreateSubscriptionRequest
Source§fn clone(&self) -> CreateSubscriptionRequest
fn clone(&self) -> CreateSubscriptionRequest
Returns a copy 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 CreateSubscriptionRequest
impl Debug for CreateSubscriptionRequest
Source§impl<'de> Deserialize<'de> for CreateSubscriptionRequest
impl<'de> Deserialize<'de> for CreateSubscriptionRequest
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
Auto Trait Implementations§
impl Freeze for CreateSubscriptionRequest
impl RefUnwindSafe for CreateSubscriptionRequest
impl Send for CreateSubscriptionRequest
impl Sync for CreateSubscriptionRequest
impl Unpin for CreateSubscriptionRequest
impl UnwindSafe for CreateSubscriptionRequest
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