pub struct CreateInvoice {Show 25 fields
pub customer_id: CustomerId,
pub order_id: Option<OrderId>,
pub invoice_type: Option<InvoiceType>,
pub invoice_date: Option<DateTime<Utc>>,
pub due_date: Option<DateTime<Utc>>,
pub days_until_due: Option<i32>,
pub payment_terms: Option<String>,
pub currency: Option<CurrencyCode>,
pub billing_name: Option<String>,
pub billing_email: Option<String>,
pub billing_address: Option<String>,
pub billing_city: Option<String>,
pub billing_state: Option<String>,
pub billing_postal_code: Option<String>,
pub billing_country: Option<String>,
pub discount_amount: Option<Decimal>,
pub discount_percent: Option<Decimal>,
pub tax_amount: Option<Decimal>,
pub tax_rate: Option<Decimal>,
pub shipping_amount: Option<Decimal>,
pub po_number: Option<String>,
pub notes: Option<String>,
pub terms: Option<String>,
pub footer: Option<String>,
pub items: Vec<CreateInvoiceItem>,
}Expand description
Input for creating an invoice
Fields§
§customer_id: CustomerIdCustomer ID
order_id: Option<OrderId>Order ID (optional)
invoice_type: Option<InvoiceType>Invoice type
invoice_date: Option<DateTime<Utc>>Invoice date (defaults to now)
due_date: Option<DateTime<Utc>>Due date (defaults to invoice date + payment terms)
days_until_due: Option<i32>Days until due (used if due_date not provided)
payment_terms: Option<String>Payment terms description
currency: Option<CurrencyCode>Currency (defaults to USD)
billing_name: Option<String>Billing name
billing_email: Option<String>Billing email
billing_address: Option<String>Billing address
billing_city: Option<String>Billing city
billing_state: Option<String>Billing state
billing_postal_code: Option<String>Billing postal code
billing_country: Option<String>Billing country
discount_amount: Option<Decimal>Discount amount
discount_percent: Option<Decimal>Discount percentage
tax_amount: Option<Decimal>Tax amount (or calculated from items)
tax_rate: Option<Decimal>Tax rate
shipping_amount: Option<Decimal>Shipping amount
po_number: Option<String>PO number reference
notes: Option<String>Notes
terms: Option<String>Terms and conditions
Footer text
items: Vec<CreateInvoiceItem>Line items
Trait Implementations§
Source§impl Clone for CreateInvoice
impl Clone for CreateInvoice
Source§fn clone(&self) -> CreateInvoice
fn clone(&self) -> CreateInvoice
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateInvoice
impl Debug for CreateInvoice
Source§impl Default for CreateInvoice
impl Default for CreateInvoice
Source§fn default() -> CreateInvoice
fn default() -> CreateInvoice
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateInvoice
impl<'de> Deserialize<'de> for CreateInvoice
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateInvoice, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateInvoice, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateInvoice
impl Serialize for CreateInvoice
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for CreateInvoice
impl RefUnwindSafe for CreateInvoice
impl Send for CreateInvoice
impl Sync for CreateInvoice
impl Unpin for CreateInvoice
impl UnsafeUnpin for CreateInvoice
impl UnwindSafe for CreateInvoice
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