AddressBookServiceInterface
in
Interface AddressBookServiceInterface
Tags
Table of Contents
- createNewAddress() : CustomerAddressInterface
- Method to add a new address in the address book
- deleteAddress() : mixed
- Method to delete an address from the address book
- filterAddresses() : array<string|int, mixed>
- Filter registered addresses by string.
- getAllAddresses() : array<string|int, mixed>
- Get all registered addresses.
- updateAddress() : CustomerAddressInterface
- Method to update an address in the address book
Methods
createNewAddress()
Method to add a new address in the address book
public
createNewAddress(AddressBlockInterface $addressBlock, CustomerInterface $customer) : CustomerAddressInterface
Parameters
- $addressBlock : AddressBlockInterface
- $customer : CustomerInterface
Return values
CustomerAddressInterface —deleteAddress()
Method to delete an address from the address book
public
deleteAddress(CustomerAddressInterface $address) : mixed
Parameters
- $address : CustomerAddressInterface
Return values
mixed —filterAddresses()
Filter registered addresses by string.
public
filterAddresses(string $p_keyword[, Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : array<string|int, mixed>
Parameters
- $p_keyword : string
-
Used to filter the address records.
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
array<string|int, mixed> —Returns an array of CustomerAddress objects.
getAllAddresses()
Get all registered addresses.
public
getAllAddresses([Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : array<string|int, mixed>
Parameters
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information
Return values
array<string|int, mixed> —Returns an array of CustomerAddress objects.
updateAddress()
Method to update an address in the address book
public
updateAddress(AddressBlockInterface $addressBlock, CustomerAddressInterface $address) : CustomerAddressInterface
Parameters
- $addressBlock : AddressBlockInterface
- $address : CustomerAddressInterface