pub struct CreateCustomerAddress {Show 13 fields
pub customer_id: CustomerId,
pub address_type: Option<AddressType>,
pub first_name: String,
pub last_name: String,
pub company: Option<String>,
pub line1: String,
pub line2: Option<String>,
pub city: String,
pub state: Option<String>,
pub postal_code: String,
pub country: String,
pub phone: Option<String>,
pub is_default: Option<bool>,
}Expand description
Input for creating a customer address
Fields§
§customer_id: CustomerId§address_type: Option<AddressType>§first_name: String§last_name: String§company: Option<String>§line1: String§line2: Option<String>§city: String§state: Option<String>§postal_code: String§country: String§phone: Option<String>§is_default: Option<bool>Trait Implementations§
Source§impl Clone for CreateCustomerAddress
impl Clone for CreateCustomerAddress
Source§fn clone(&self) -> CreateCustomerAddress
fn clone(&self) -> CreateCustomerAddress
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 CreateCustomerAddress
impl Debug for CreateCustomerAddress
Source§impl<'de> Deserialize<'de> for CreateCustomerAddress
impl<'de> Deserialize<'de> for CreateCustomerAddress
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateCustomerAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<CreateCustomerAddress, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for CreateCustomerAddress
impl Serialize for CreateCustomerAddress
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 CreateCustomerAddress
impl Validate for CreateCustomerAddress
Source§fn validate(&self) -> Result<(), CommerceError>
fn validate(&self) -> Result<(), CommerceError>
Validate a customer-address create request.
Requires a non-nil customer reference and non-empty name / address line / city / postal code / country fields.
Auto Trait Implementations§
impl Freeze for CreateCustomerAddress
impl RefUnwindSafe for CreateCustomerAddress
impl Send for CreateCustomerAddress
impl Sync for CreateCustomerAddress
impl Unpin for CreateCustomerAddress
impl UnsafeUnpin for CreateCustomerAddress
impl UnwindSafe for CreateCustomerAddress
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