pub struct InvoicePreviewInput {
pub customer: InvoicePreviewCustomer,
pub plan_code: Option<String>,
pub subscription_at: Option<String>,
pub billing_time: Option<BillingTime>,
pub coupons: Option<Vec<InvoicePreviewCoupon>>,
pub subscriptions: Option<InvoicePreviewSubscriptions>,
pub billing_entity_code: Option<String>,
}Expand description
Input parameters for previewing an invoice.
This struct contains all the information needed to generate an invoice preview without actually creating the invoice.
Fields§
§customer: InvoicePreviewCustomer§plan_code: Option<String>§subscription_at: Option<String>§billing_time: Option<BillingTime>§coupons: Option<Vec<InvoicePreviewCoupon>>§subscriptions: Option<InvoicePreviewSubscriptions>§billing_entity_code: Option<String>Implementations§
Source§impl InvoicePreviewInput
impl InvoicePreviewInput
Sourcepub fn new(customer: InvoicePreviewCustomer) -> Self
pub fn new(customer: InvoicePreviewCustomer) -> Self
Sourcepub fn for_customer(external_id: String) -> Self
pub fn for_customer(external_id: String) -> Self
pub fn with_plan_code(self, plan_code: String) -> Self
pub fn with_subscription_at(self, subscription_at: String) -> Self
pub fn with_billing_time(self, billing_time: BillingTime) -> Self
pub fn with_coupons(self, coupons: Vec<InvoicePreviewCoupon>) -> Self
pub fn with_subscriptions( self, subscriptions: InvoicePreviewSubscriptions, ) -> Self
pub fn with_billing_entity_code(self, code: String) -> Self
Trait Implementations§
Source§impl Clone for InvoicePreviewInput
impl Clone for InvoicePreviewInput
Source§fn clone(&self) -> InvoicePreviewInput
fn clone(&self) -> InvoicePreviewInput
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 InvoicePreviewInput
impl Debug for InvoicePreviewInput
Source§impl Default for InvoicePreviewInput
impl Default for InvoicePreviewInput
Source§fn default() -> InvoicePreviewInput
fn default() -> InvoicePreviewInput
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InvoicePreviewInput
impl<'de> Deserialize<'de> for InvoicePreviewInput
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 InvoicePreviewInput
impl RefUnwindSafe for InvoicePreviewInput
impl Send for InvoicePreviewInput
impl Sync for InvoicePreviewInput
impl Unpin for InvoicePreviewInput
impl UnwindSafe for InvoicePreviewInput
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