CustomerService
Namespace
IO\Services
| Type | Name | Description | 
|---|---|---|
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
Methods
public __construct($accountRepository, $contactRepository, $contactAddressRepository, $addressRepository, $contactClassRepository, $sessionStorage)CustomerService constructor.
| Type | Name | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public getContactId():intGet the ID of the current contact from the session
public getContactClassData($contactClassId):array| Type | Name | Description | 
| 
 | 
public showNetPrices():boolpublic showNetPricesByContactId($contactId):bool| Type | Name | Description | 
| 
 | 
public getContactClassMinimumOrderQuantity():intpublic registerCustomer($contactData, $billingAddressData = [], $deliveryAddressData = []):ContactCreate a contact with addresses if specified
| Type | Name | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public createAccount($accountData):Account| Type | Name | Description | 
| 
 | 
Create a new contact
| Type | Name | Description | 
| 
 | 
public getContact():ContactFind the current contact by ID
public getContactClassId():intpublic updateContact($contactData):ContactUpdate a contact
| Type | Name | Description | 
| 
 | 
public updatePassword($newPassword, $contactId, $hash = ""):mixed| Type | Name | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public getAddresses($typeId = null):array \| CollectionList the addresses of a contact
| Type | Name | Description | 
| 
 | 
public getAddress($addressId, $typeId):AddressGet an address by ID
| Type | Name | Description | 
| 
 | ||
| 
 | 
public createAddress($addressData, $typeId):AddressCreate an address with the specified address type
| Type | Name | Description | 
| 
 | ||
| 
 | 
public updateAddress($addressId, $addressData, $typeId):AddressUpdate an address
| Type | Name | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public deleteAddress($addressId, $typeId)Delete an address
| Type | Name | Description | 
| 
 | ||
| 
 | 
public getOrders($page = 1, $items = 10, $filters = []):array \| PaginatedResultGet a list of orders for the current contact
| Type | Name | Description | 
| 
 | ||
| 
 | ||
| 
 | 
public hasReturns():boolpublic getReturns($page = 1, $items = 10, $filters = [], $wrapped = true):PaginatedResult| Type | Name | Description | 
| 
 | ||
| 
 | ||
| 
 | ||
| 
 | 
public getLatestOrder():LocalizedOrderGet the last order created by the current contact
public resetGuestAddresses()public getEmail():stringpublic getContactNumber($contactId):string| Type | Name | Description | 
| 
 | 
public deleteGuestAddresses()public fromMemoryCache()public resetMemoryCache($key = null)| Type | Name | Description | 
| 
 |