pub struct CreateInvoiceFeeInput {
pub add_on_code: String,
pub units: f64,
pub unit_amount_cents: Option<i64>,
pub description: Option<String>,
pub tax_codes: Option<Vec<String>>,
}Expand description
Fee input for creating a one-off invoice.
This struct contains the details for a single fee line item to be included in a one-off invoice.
Fields§
§add_on_code: StringThe code of the add-on to charge.
units: f64The number of units to charge.
unit_amount_cents: Option<i64>The price per unit in cents (optional, uses add-on default if not specified).
description: Option<String>Optional description for the fee.
tax_codes: Option<Vec<String>>Optional tax codes to apply to this fee.
Implementations§
Source§impl CreateInvoiceFeeInput
impl CreateInvoiceFeeInput
Sourcepub fn with_unit_amount_cents(self, unit_amount_cents: i64) -> Self
pub fn with_unit_amount_cents(self, unit_amount_cents: i64) -> Self
Sets a custom unit amount in cents.
Sourcepub fn with_description(self, description: String) -> Self
pub fn with_description(self, description: String) -> Self
Sets a description for the fee.
Sourcepub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
pub fn with_tax_codes(self, tax_codes: Vec<String>) -> Self
Sets the tax codes to apply to this fee.
Trait Implementations§
Source§impl Clone for CreateInvoiceFeeInput
impl Clone for CreateInvoiceFeeInput
Source§fn clone(&self) -> CreateInvoiceFeeInput
fn clone(&self) -> CreateInvoiceFeeInput
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 CreateInvoiceFeeInput
impl Debug for CreateInvoiceFeeInput
Source§impl<'de> Deserialize<'de> for CreateInvoiceFeeInput
impl<'de> Deserialize<'de> for CreateInvoiceFeeInput
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 CreateInvoiceFeeInput
impl RefUnwindSafe for CreateInvoiceFeeInput
impl Send for CreateInvoiceFeeInput
impl Sync for CreateInvoiceFeeInput
impl Unpin for CreateInvoiceFeeInput
impl UnwindSafe for CreateInvoiceFeeInput
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