pub struct InvoicePreviewCustomer {
pub external_id: Option<String>,
pub name: Option<String>,
pub address_line1: Option<String>,
pub address_line2: Option<String>,
pub city: Option<String>,
pub state: Option<String>,
pub country: Option<String>,
pub currency: Option<String>,
pub timezone: Option<String>,
pub tax_identification_number: Option<String>,
pub shipping_address: Option<InvoicePreviewAddress>,
pub integration_customers: Option<Vec<InvoicePreviewIntegrationCustomer>>,
}Expand description
Customer information for invoice preview.
This struct contains customer data used when generating an invoice preview. It can reference an existing customer via external_id or provide inline customer details.
Fields§
§external_id: Option<String>§name: Option<String>§address_line1: Option<String>§address_line2: Option<String>§city: Option<String>§state: Option<String>§country: Option<String>§currency: Option<String>§timezone: Option<String>§tax_identification_number: Option<String>§shipping_address: Option<InvoicePreviewAddress>§integration_customers: Option<Vec<InvoicePreviewIntegrationCustomer>>Implementations§
Source§impl InvoicePreviewCustomer
impl InvoicePreviewCustomer
Sourcepub fn with_external_id(external_id: String) -> Self
pub fn with_external_id(external_id: String) -> Self
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty invoice preview customer for inline definition.
§Returns
A new empty InvoicePreviewCustomer instance
pub fn with_name(self, name: String) -> Self
pub fn with_address( self, address_line1: String, address_line2: Option<String>, city: Option<String>, state: Option<String>, country: Option<String>, ) -> Self
pub fn with_currency(self, currency: String) -> Self
pub fn with_timezone(self, timezone: String) -> Self
pub fn with_tax_identification_number(self, tax_id: String) -> Self
pub fn with_shipping_address(self, address: InvoicePreviewAddress) -> Self
pub fn with_integration_customers( self, integrations: Vec<InvoicePreviewIntegrationCustomer>, ) -> Self
Trait Implementations§
Source§impl Clone for InvoicePreviewCustomer
impl Clone for InvoicePreviewCustomer
Source§fn clone(&self) -> InvoicePreviewCustomer
fn clone(&self) -> InvoicePreviewCustomer
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 InvoicePreviewCustomer
impl Debug for InvoicePreviewCustomer
Source§impl Default for InvoicePreviewCustomer
impl Default for InvoicePreviewCustomer
Source§fn default() -> InvoicePreviewCustomer
fn default() -> InvoicePreviewCustomer
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for InvoicePreviewCustomer
impl<'de> Deserialize<'de> for InvoicePreviewCustomer
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 InvoicePreviewCustomer
impl RefUnwindSafe for InvoicePreviewCustomer
impl Send for InvoicePreviewCustomer
impl Sync for InvoicePreviewCustomer
impl Unpin for InvoicePreviewCustomer
impl UnwindSafe for InvoicePreviewCustomer
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