Customer

Struct Customer 

Source
pub struct Customer {
Show 43 fields pub id: Option<String>, pub sync_token: Option<String>, pub meta_data: Option<MetaData>, pub display_name: Option<String>, pub title: Option<String>, pub given_name: Option<String>, pub middle_name: Option<String>, pub sparse: Option<bool>, pub suffix: Option<String>, pub family_name: Option<String>, pub primary_email_addr: Option<Email>, pub resale_num: Option<String>, pub secondary_tax_identifier: Option<String>, pub ar_account_ref: Option<NtRef>, pub default_tax_code_ref: Option<NtRef>, pub preferred_delivery_method: Option<String>, pub sales_term_ref: Option<NtRef>, pub customer_type_ref: Option<String>, pub fax: Option<PhoneNumber>, pub bill_with_parent: Option<bool>, pub currency_ref: Option<NtRef>, pub mobile: Option<PhoneNumber>, pub job: Option<bool>, pub balance_with_jobs: Option<f64>, pub primary_phone: Option<PhoneNumber>, pub open_balance_date: Option<NaiveDate>, pub taxable: Option<bool>, pub alternate_phone: Option<PhoneNumber>, pub parent_ref: Option<NtRef>, pub notes: Option<String>, pub web_addr: Option<WebAddr>, pub active: Option<bool>, pub company_name: Option<String>, pub balance: Option<f64>, pub ship_addr: Option<Addr>, pub payment_method_ref: Option<NtRef>, pub is_project: Option<bool>, pub source: Option<String>, pub print_check_on_name: Option<String>, pub bill_addr: Option<Addr>, pub fully_qualified_name: Option<String>, pub level: Option<String>, pub tax_exemption_reason_id: Option<TaxExemptStatus>,
}
Expand description

Customer

Represents an individual or organization that purchases goods or services and is billed in QuickBooks Online.

Creation requirements:

  • QBCreatable::can_create() returns true when at least one of these fields is present: display_name, given_name, family_name, middle_name, title, or suffix.

Update semantics:

  • QBFullUpdatable::can_full_update() requires can_read() (ID present) and can_create().

API reference: https://developer.intuit.com/app/developer/qbo/docs/api/accounting/all-entities/customer

Fields§

§id: Option<String>

The unique ID of the entity

§sync_token: Option<String>

The unique sync token of the entity, used for concurrency control

§meta_data: Option<MetaData>

Metadata about the entity

§display_name: Option<String>

Display name of the customer

§title: Option<String>

Title of the customer (e.g., Mr., Mrs., Ms.)

§given_name: Option<String>

First name of the customer

§middle_name: Option<String>

Middle name of the customer

§sparse: Option<bool>

Indicates if the entity is a sparse object

§suffix: Option<String>

Suffix of the customer’s name (e.g., Jr., Sr., III)

§family_name: Option<String>

Last name of the customer

§primary_email_addr: Option<Email>

Primary email address of the customer

§resale_num: Option<String>

Resale number for the customer

§secondary_tax_identifier: Option<String>

Secondary tax identifier for the customer

§ar_account_ref: Option<NtRef>

Reference to the Accounts Receivable account for the customer

§default_tax_code_ref: Option<NtRef>

Reference to the default tax code for the customer

§preferred_delivery_method: Option<String>

Preferred delivery method for the customer (None, Print, Email, or Trax)

§sales_term_ref: Option<NtRef>

Reference to the sales term for the customer

§customer_type_ref: Option<String>

Reference to the customer type for the customer

§fax: Option<PhoneNumber>

Fax number of the customer

§bill_with_parent: Option<bool>

Indicates if the customer is billed with their parent

§currency_ref: Option<NtRef>

Reference to the currency for the customer

§mobile: Option<PhoneNumber>

Mobile phone number of the customer

§job: Option<bool>

Indicates if the customer is a job

§balance_with_jobs: Option<f64>

Balance including all jobs related to the customer

§primary_phone: Option<PhoneNumber>

Primary phone number of the customer

§open_balance_date: Option<NaiveDate>

Date of the open balance in YYYY-MM-DD format

§taxable: Option<bool>

Indicates if the customer is taxable

§alternate_phone: Option<PhoneNumber>

Alternative phone number of the customer

§parent_ref: Option<NtRef>

Reference to the parent of the customer

§notes: Option<String>

Notes about the customer

§web_addr: Option<WebAddr>

Web address (URL) of the customer

§active: Option<bool>

Indicates if the customer is active

§company_name: Option<String>

Company name of the customer

§balance: Option<f64>

Current balance of the customer

§ship_addr: Option<Addr>

Shipping address of the customer

§payment_method_ref: Option<NtRef>

Reference to the default payment method for the customer

§is_project: Option<bool>

Indicates if the customer is a project

§source: Option<String>

Source of the customer record

DEPRECATED: as of 9/15/2025

§print_check_on_name: Option<String>

Name to print on checks for the customer

§bill_addr: Option<Addr>

Billing address of the customer

§fully_qualified_name: Option<String>

Fully qualified name of the customer

§level: Option<String>

Level in the customer hierarchy

§tax_exemption_reason_id: Option<TaxExemptStatus>

Tax exemption reason identifier for the customer

Trait Implementations§

Source§

impl Clone for Customer

Source§

fn clone(&self) -> Customer

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Customer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for Customer

Source§

fn default() -> Customer

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Customer

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Display for Customer

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for Customer

Source§

fn eq(&self, other: &Customer) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl QBCreatable for Customer

Source§

impl QBFullUpdatable for Customer

Source§

impl QBItem for Customer

Source§

fn id(&self) -> Option<&String>

Source§

fn clone_id(&self) -> Option<String>

Source§

fn sync_token(&self) -> Option<&String>

Source§

fn meta_data(&self) -> Option<&MetaData>

Source§

fn name() -> &'static str

Source§

fn qb_id() -> &'static str

Source§

fn has_read(&self) -> bool

Source§

impl QBSparseUpdateable for Customer

Source§

impl QBToRef for Customer

Source§

impl Serialize for Customer

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for Customer

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> QBReadable for T
where T: QBItem,

Source§

fn can_read(&self) -> bool

Source§

impl<T> QBToAttachableRef for T
where T: QBToRef,

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> QBQueryable for T
where T: QBItem,