Customer Model
The Customer model represents a customer that is defined for your shop.
Model Attributes
- id
-
Unique numeric ID of the customer.
Methods:
integer getId()
object setId( integer ) - address
-
The address of the customer.
Methods:
string getAddress()
object setAddress( string ) - code
-
The code that the shop assigned to the customer.
Methods:
string getCode()
object setCode( string ) -
The e-mail address of the customer.
Methods:
string getEmail()
object setEmail( string ) - name
-
The name of the customer.
Methods:
string getName()
object setName( string ) - note
-
The note the shop has added to the customer.
Methods:
string getNote()
object setNote( string ) - phone_number
-
The phone number of the customer.
Methods:
string getPhoneNumber()
object setPhoneNumber( string ) - postcode
-
The postal code of the customer.
Methods:
string getPostcode()
object setPostcode( string ) - social_id
-
The Social Media id provided by the customer.
Methods:
string getSocialId()
object setSocialId( string )
API Calls
- array Customer::all()
-
Get all customers defined by your shop.
Returns:
Array containing the list of Customer objects that belong to your shop. - object Customer::get( integer $id )
-
Get the customer identified by the unique id.
Returns:
The Customer object identified by the unique id. - object create()
-
Create a new customer and attach it to your shop.
The Customer object that you use to call this method
does not need an id, and if you provide an id, it will be
ignored. All other attributes of the Customer object will be
saved with the newly created customer.
Returns:
The Customer object that was created. - object update()
-
Update an existing customer.
The Customer object that you use to call this method
requires a valid id to identiy the customer that
will be updated. Other than the id, you only need to
provide the attributes that you wish to update. If an
attribute is not set, then it will not be updated in
the database, and it will keep it's original value.
Returns:
The Customer object that was updated.