square_api_client/models/order_fulfillment_recipient.rs
1//! Model struct for OrderFulfillmentRecipient type
2
3use serde::{Deserialize, Serialize};
4
5use super::Address;
6
7/// Contains information about the recipient of a fulfillment.
8#[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)]
9pub struct OrderFulfillmentRecipient {
10 /// The customer ID of the customer associated with the fulfillment.
11 ///
12 /// If `customer_id` is provided, the fulfillment recipient's `display_name`, `email_address`,
13 /// and `phone_number` are automatically populated from the targeted customer profile. If these
14 /// fields are set in the request, the request values overrides the information from the
15 /// customer profile. If the targeted customer profile does not contain the necessary
16 /// information and these fields are left unset, the request results in an error.
17 pub customer_id: Option<String>,
18 /// The display name of the fulfillment recipient.
19 ///
20 /// If provided, the display name overrides the value pulled from the customer profile indicated
21 /// by `customer_id`.
22 pub display_name: Option<String>,
23 /// The email address of the fulfillment recipient.
24 ///
25 /// If provided, the email address overrides the value pulled from the customer profile
26 /// indicated by `customer_id`.
27 pub email_address: Option<String>,
28 /// The phone number of the fulfillment recipient.
29 ///
30 /// If provided, the phone number overrides the value pulled from the customer profile indicated
31 /// by `customer_id`.
32 pub phone_number: Option<String>,
33 /// The address of the fulfillment recipient.
34 ///
35 /// If provided, the address overrides the value pulled from the customer profile indicated by
36 /// `customer_id`.
37 pub address: Option<Address>,
38}