pub struct CreateSubscriptionParams {
pub plan_id: String,
pub total_count: u32,
pub quantity: Option<u32>,
pub customer_notify: Option<u8>,
pub start_at: Option<i64>,
pub expire_by: Option<i64>,
pub customer_id: Option<String>,
pub notes: Option<Notes>,
}Expand description
Parameters for creating a Subscription.
Fields§
§plan_id: StringThe plan to bill against.
total_count: u32How many cycles to bill before completing.
quantity: Option<u32>Quantity of the plan per cycle.
customer_notify: Option<u8>Whether Razorpay should email/SMS the customer.
start_at: Option<i64>When to start billing, Unix seconds. Omitted means immediately.
expire_by: Option<i64>Deadline for the customer to authorize, Unix seconds.
customer_id: Option<String>Cycles to skip charging at the start, for a free trial.
notes: Option<Notes>Metadata to attach.
Implementations§
Source§impl CreateSubscriptionParams
impl CreateSubscriptionParams
Sourcepub fn new(plan_id: impl Into<String>, total_count: u32) -> Self
pub fn new(plan_id: impl Into<String>, total_count: u32) -> Self
Bill plan_id for total_count cycles.
Sourcepub fn customer_id(self, customer_id: impl Into<String>) -> Self
pub fn customer_id(self, customer_id: impl Into<String>) -> Self
Bill an existing customer.
Sourcepub fn customer_notify(self, notify: bool) -> Self
pub fn customer_notify(self, notify: bool) -> Self
Let Razorpay notify the customer about this subscription.
Trait Implementations§
Source§impl Clone for CreateSubscriptionParams
impl Clone for CreateSubscriptionParams
Source§impl Debug for CreateSubscriptionParams
impl Debug for CreateSubscriptionParams
Source§impl PartialEq for CreateSubscriptionParams
impl PartialEq for CreateSubscriptionParams
Source§impl Serialize for CreateSubscriptionParams
impl Serialize for CreateSubscriptionParams
impl StructuralPartialEq for CreateSubscriptionParams
Auto Trait Implementations§
impl Freeze for CreateSubscriptionParams
impl RefUnwindSafe for CreateSubscriptionParams
impl Send for CreateSubscriptionParams
impl Sync for CreateSubscriptionParams
impl Unpin for CreateSubscriptionParams
impl UnsafeUnpin for CreateSubscriptionParams
impl UnwindSafe for CreateSubscriptionParams
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