pub struct PlanRequestBuilder { /* private fields */ }Expand description
Builder for PlanRequest.
Implementations§
Source§impl PlanRequestBuilder
impl PlanRequestBuilder
Sourcepub fn amount(&mut self, value: String) -> &mut Self
pub fn amount(&mut self, value: String) -> &mut Self
Amount for the plan. Should be in the subunit of the supported currency
Sourcepub fn interval(&mut self, value: Interval) -> &mut Self
pub fn interval(&mut self, value: Interval) -> &mut Self
Interval in words, Use the Interval Enum for valid options.
Sourcepub fn description(&mut self, value: String) -> &mut Self
pub fn description(&mut self, value: String) -> &mut Self
A description of this plan
Sourcepub fn send_invoices(&mut self, value: bool) -> &mut Self
pub fn send_invoices(&mut self, value: bool) -> &mut Self
Set to false if you don’t want invoices to be sent to your customers
Sourcepub fn send_sms(&mut self, value: bool) -> &mut Self
pub fn send_sms(&mut self, value: bool) -> &mut Self
Set to false if you don’t want text messages to be sent to your customers
Sourcepub fn currency(&mut self, value: Currency) -> &mut Self
pub fn currency(&mut self, value: Currency) -> &mut Self
Currency in which the amount is set. Defaults to the Default Currency of the integration
Sourcepub fn invoice_limit(&mut self, value: u8) -> &mut Self
pub fn invoice_limit(&mut self, value: u8) -> &mut Self
Number of invoices to raise during subscription to this plan.
Can be overridden by specifying an invoice_limit while subscribing.
Sourcepub fn build(&self) -> Result<PlanRequest, PlanRequestBuilderError>
pub fn build(&self) -> Result<PlanRequest, PlanRequestBuilderError>
Trait Implementations§
Source§impl Clone for PlanRequestBuilder
impl Clone for PlanRequestBuilder
Source§fn clone(&self) -> PlanRequestBuilder
fn clone(&self) -> PlanRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for PlanRequestBuilder
impl RefUnwindSafe for PlanRequestBuilder
impl Send for PlanRequestBuilder
impl Sync for PlanRequestBuilder
impl Unpin for PlanRequestBuilder
impl UnwindSafe for PlanRequestBuilder
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