square_api_client/models/invoice_recipient.rs
1//! Model struct for InvoiceRecipient type.
2
3use serde::{Deserialize, Serialize};
4
5use super::{Address, InvoiceRecipientTaxIds};
6
7/// Represents a snapshot of customer data.
8///
9/// This object stores customer data that is displayed on the invoice and that Square uses to
10/// deliver the invoice.
11///
12/// When you provide a customer ID for a draft invoice, Square retrieves the associated customer
13/// profile and populates the remaining `InvoiceRecipient` fields. You cannot update these fields
14/// after the invoice is published. Square updates the customer ID in response to a merge operation,
15/// but does not update other fields.
16#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
17pub struct InvoiceRecipient {
18 /// The ID of the customer. This is the customer profile ID that you provide when creating a
19 /// draft invoice.
20 ///
21 /// Min Length: 1, Max Length: 255
22 pub customer_id: Option<String>,
23 /// **Read only** The recipient's given (that is, first) name.
24 pub given_name: Option<String>,
25 /// **Read only** The recipient's family (that is, last) name.
26 pub family_name: Option<String>,
27 /// **Read only** The recipient's email address.
28 pub email_address: Option<String>,
29 /// **Read only** The recipient's physical address.
30 pub address: Option<Address>,
31 /// **Read only** The recipient's phone number.
32 pub phone_number: Option<String>,
33 /// **Read only** The name of the recipient's company.
34 pub company_name: Option<String>,
35 /// **Read only** The recipient's tax IDs. The country of the seller account determines whether
36 /// this field is available for the customer. For more information, see [Invoice recipient tax
37 /// IDs](https://developer.squareup.com/docs/invoices-api/overview#recipient-tax-ids).
38 pub tax_ids: Option<InvoiceRecipientTaxIds>,
39}