CustomerService
Namespace
IO\Services
Type | Name | Description |
---|---|---|
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods
public __construct($accountRepository, $contactRepository, $contactAddressRepository, $addressRepository, $contactClassRepository, $sessionStorage)
CustomerService constructor.
Type |
Name |
Description |
|
||
|
||
|
||
|
||
|
||
|
public getContactId():int
Get the ID of the current contact from the session
public getContactClassData($contactClassId):array
Type |
Name |
Description |
|
public showNetPrices():bool
public showNetPricesByContactId($contactId):bool
Type |
Name |
Description |
|
public getContactClassMinimumOrderQuantity():int
public registerCustomer($contactData, $billingAddressData = [], $deliveryAddressData = []):Contact
Create 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():Contact
Find the current contact by ID
public getContactClassId():int
public updateContact($contactData):Contact
Update a contact
Type |
Name |
Description |
|
public updatePassword($newPassword, $contactId, $hash = ""):mixed
Type |
Name |
Description |
|
||
|
||
|
public getAddresses($typeId = null):array \| Collection
List the addresses of a contact
Type |
Name |
Description |
|
public getAddress($addressId, $typeId):Address
Get an address by ID
Type |
Name |
Description |
|
||
|
public createAddress($addressData, $typeId):Address
Create an address with the specified address type
Type |
Name |
Description |
|
||
|
public updateAddress($addressId, $addressData, $typeId):Address
Update an address
Type |
Name |
Description |
|
||
|
||
|
public deleteAddress($addressId, $typeId)
Delete an address
Type |
Name |
Description |
|
||
|
public getOrders($page = 1, $items = 10, $filters = []):array \| PaginatedResult
Get a list of orders for the current contact
Type |
Name |
Description |
|
||
|
||
|
public hasReturns():bool
public getReturns($page = 1, $items = 10, $filters = [], $wrapped = true):PaginatedResult
Type |
Name |
Description |
|
||
|
||
|
||
|
public getLatestOrder():LocalizedOrder
Get the last order created by the current contact
public resetGuestAddresses()
public getEmail():string
public getContactNumber($contactId):string
Type |
Name |
Description |
|
public deleteGuestAddresses()
public fromMemoryCache()
public resetMemoryCache($key = null)
Type |
Name |
Description |
|