square_api_client/models/
create_customer_request.rs

1//! Model struct for CreateCustomerRequest type
2
3/// This is a model struct for CreateCustomerRequest type
4use serde::Serialize;
5
6use super::{Address, CustomerTaxIds};
7
8#[derive(Clone, Debug, Default, Eq, PartialEq, Serialize)]
9pub struct CreateCustomerRequest {
10    /// The idempotency key for the request. For more information, see
11    /// [Idempotency](https://developer.squareup.com/docs/working-with-apis/idempotency).
12    pub idempotency_key: Option<String>,
13    /// The given name (that is, the first name) associated with the customer profile.
14    pub given_name: Option<String>,
15    /// The family name (that is, the last name) associated with the customer profile.
16    pub family_name: Option<String>,
17    /// A business name associated with the customer profile.
18    pub company_name: Option<String>,
19    /// A nickname for the customer profile.
20    pub nickname: Option<String>,
21    /// The email address associated with the customer profile.
22    pub email_address: Option<String>,
23    /// Represents a postal address in a country. For more information, see [Working with
24    /// Addresses](https://developer.squareup.com/docs/build-basics/working-with-addresses).
25    pub address: Option<Address>,
26    /// The 11-digit phone number associated with the customer profile.
27    pub phone_number: Option<String>,
28    /// An optional second ID used to associate the customer profile with an entity in another
29    /// system.
30    pub reference_id: Option<String>,
31    /// A custom note associated with the customer profile.
32    pub note: Option<String>,
33    /// The birthday associated with the customer profile, in RFC 3339 format. The year is optional.
34    /// The timezone and time are not allowed. For example, `0000-09-21T00:00:00-00:00` represents a
35    /// birthday on September 21 and `1998-09-21T00:00:00-00:00` represents a birthday on September
36    /// 21, 1998. You can also specify this value in `YYYY-MM-DD` format.
37    pub birthday: Option<String>,
38    /// Represents the tax ID associated with a [customer profile]($m/Customer). The corresponding
39    /// `tax_ids` field is available only for customers of sellers in EU countries or the United
40    /// Kingdom. For more information, see [Customer tax
41    /// IDs](https://developer.squareup.com/docs/customers-api/what-it-does#customer-tax-ids).
42    pub tax_ids: Option<CustomerTaxIds>,
43}