new module:models/Customer()
Constructs a new Customer
.
Document representing a customer.
- Source:
Members
(readonly) AuthTypeEnum :String
Allowed values for the auth_type
property.
Type:
- String
- Source:
(readonly) GenderEnum :Number
Allowed values for the gender
property.
Type:
- Number
- Source:
(inner, constant) 1
value: 1
- Source:
(inner, constant) 2
value: 2
- Source:
(inner) addresses :Array.<module:models/CustomerAddress>
The customer's addresses.
Type:
- Array.<module:models/CustomerAddress>
- Source:
(inner) auth_type :module:models/Customer.AuthTypeEnum
The customer's authorization type (indicates if the customer is a guest or a registered customer).
Type:
- module:models/Customer.AuthTypeEnum
- Source:
(inner) birthday :Date
The customer's birthday.
Type:
- Date
- Source:
(inner) c_familyStatus :String
Type:
- String
- Source:
(inner) company_name :String
The customer's company name.
Type:
- String
- Source:
(inner) creation_date :Date
Returns the value of attribute 'creationDate'.
Type:
- Date
- Source:
(inner) customer_id :String
The customer's number (id). Both registered and guest customers have a customer id.
Type:
- String
- Source:
(inner) customer_no :String
The customer's number (id). Only a registered customer has a customer number.
Type:
- String
- Source:
(inner) email :String
The customer's email address.
Type:
- String
- Source:
(inner) enabled :Boolean
A flag indicating whether this customer is is enabled and can log in.
Type:
- Boolean
- Source:
(inner) fax :String
The customer's fax number. The length is restricted to 32 characters.
Type:
- String
- Source:
(inner) first_name :String
The customer's first name.
Type:
- String
- Source:
(inner) gender :module:models/Customer.GenderEnum
The customer's gender.
Type:
- module:models/Customer.GenderEnum
- Source:
(inner, constant) guest
value: "guest"
- Source:
(inner) job_title :String
The customer's job title.
Type:
- String
- Source:
(inner) last_login_time :Date
The time when the customer last logged in.
Type:
- Date
- Source:
(inner) last_modified :Date
Returns the value of attribute 'lastModified'.
Type:
- Date
- Source:
(inner) last_name :String
The customer's last name.
Type:
- String
- Source:
(inner) last_visit_time :Date
The time when the customer last visited.
Type:
- Date
- Source:
(inner) login :String
The customer's login.
Type:
- String
- Source:
(inner) note :String
The customer's note.
Type:
- String
- Source:
(inner) payment_instruments :Array.<module:models/CustomerPaymentInstrument>
The customer's payment instruments.
Type:
- Source:
(inner) phone_business :String
The customer's business phone number.
Type:
- String
- Source:
(inner) phone_home :String
The customer's home phone number.
Type:
- String
- Source:
(inner) phone_mobile :String
The customer's mobile phone number.
Type:
- String
- Source:
(inner) preferred_locale :String
The customer's preferred locale.
Type:
- String
- Source:
(inner) previous_login_time :Date
The time when the customer logged in previously.
Type:
- Date
- Source:
(inner) previous_visit_time :Date
The time when the customer last visited the store.
Type:
- Date
- Source:
(inner, constant) registered
value: "registered"
- Source:
(inner) salutation :String
The salutation to use for the customer.
Type:
- String
- Source:
(inner) second_name :String
The customer's second name.
Type:
- String
- Source:
(inner) suffix :String
The customer's suffix (for example, "Jr." or "Sr.").
Type:
- String
- Source:
(inner) title :String
The customer's title (for example, "Mrs" or "Mr").
Type:
- String
- Source:
Methods
(static) constructFromObject(data, obj) → {module:models/Customer}
Constructs a Customer
from a plain JavaScript object, optionally creating a new instance.
Copies all relevant properties from data
to obj
if supplied or a new instance if not.
Parameters:
Name | Type | Description |
---|---|---|
data |
Object | The plain JavaScript object bearing properties of interest. |
obj |
module:models/Customer | Optional instance to populate. |
- Source:
Returns:
The populated Customer
instance.