pub struct CreateCustomer {
pub email: String,
pub first_name: String,
pub last_name: String,
pub phone: Option<String>,
pub accepts_marketing: Option<bool>,
pub tags: Option<Vec<String>>,
pub metadata: Option<Value>,
}Expand description
Input for creating a customer
Fields§
§email: String§first_name: String§last_name: String§phone: Option<String>§accepts_marketing: Option<bool>§metadata: Option<Value>Trait Implementations§
Source§impl Clone for CreateCustomer
impl Clone for CreateCustomer
Source§fn clone(&self) -> CreateCustomer
fn clone(&self) -> CreateCustomer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateCustomer
impl Debug for CreateCustomer
Source§impl Default for CreateCustomer
impl Default for CreateCustomer
Source§fn default() -> CreateCustomer
fn default() -> CreateCustomer
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreateCustomer
impl<'de> Deserialize<'de> for CreateCustomer
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateCustomer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateCustomer, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateCustomer
impl Serialize for CreateCustomer
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Source§impl Validate for CreateCustomer
impl Validate for CreateCustomer
Source§fn validate(&self) -> Result<(), CommerceError>
fn validate(&self) -> Result<(), CommerceError>
Validate a customer create request.
Requires a non-empty, well-formed email and non-empty first/last names. The phone number, when supplied, must be a plausible phone number.
Auto Trait Implementations§
impl Freeze for CreateCustomer
impl RefUnwindSafe for CreateCustomer
impl Send for CreateCustomer
impl Sync for CreateCustomer
impl Unpin for CreateCustomer
impl UnsafeUnpin for CreateCustomer
impl UnwindSafe for CreateCustomer
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