pub struct PlanRequest {
pub name: String,
pub amount: String,
pub interval: Interval,
pub description: Option<String>,
pub send_invoices: Option<bool>,
pub send_sms: Option<bool>,
pub currency: Option<Currency>,
pub invoice_limit: Option<u8>,
}Expand description
Request body to create a plan on your integration.
Should be created via PlanRequestBuilder
Fields§
§name: StringName of plan
amount: StringAmount for the plan. Should be in the subunit of the supported currency
interval: IntervalInterval in words, Use the Interval Enum for valid options.
description: Option<String>A description of this plan
send_invoices: Option<bool>Set to false if you don’t want invoices to be sent to your customers
send_sms: Option<bool>Set to false if you don’t want text messages to be sent to your customers
currency: Option<Currency>Currency in which the amount is set. Defaults to the Default Currency of the integration
invoice_limit: Option<u8>Number of invoices to raise during subscription to this plan.
Can be overridden by specifying an invoice_limit while subscribing.
Trait Implementations§
Source§impl Clone for PlanRequest
impl Clone for PlanRequest
Source§fn clone(&self) -> PlanRequest
fn clone(&self) -> PlanRequest
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 PlanRequest
impl Debug for PlanRequest
Source§impl Default for PlanRequest
impl Default for PlanRequest
Source§fn default() -> PlanRequest
fn default() -> PlanRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PlanRequest
impl<'de> Deserialize<'de> for PlanRequest
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 PlanRequest
impl RefUnwindSafe for PlanRequest
impl Send for PlanRequest
impl Sync for PlanRequest
impl Unpin for PlanRequest
impl UnwindSafe for PlanRequest
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