AddressTrait
This is the user address trait.
The methods that manage addresses requests to the API will be located here.
Tags
Table of Contents
addGetAddress() | Add the request to get the address identified by the given id | : void |
---|---|---|
addGetBillingAddresses() | Add the request to get the billing addresses for the current user | : void |
addGetShippingAddresses() | Add the request to get the shipping addresses for the current user | : void |
createBillingAddress() | Create new billing for the current user. | : Address|null |
createShippingAddress() | Create new shipping address for the current user. | : Address|null |
deleteAddress() | Delete the user address identified by the given id | : Status|null |
getAddress() | Returns the address identified by the given id | : Address|null |
getBillingAddresses() | Returns the billing addresses for the current user | : ElementCollection|null |
getShippingAddresses() | Returns the shipping addresses for the current user | : ElementCollection|null |
updateAddress() | Update the address identified by the given id. | : Address|null |
Methods
addGetAddress()
Add the request to get the address identified by the given id
public
addGetAddress(BatchRequests $batchRequests, string $batchName, int $id) : void
Parameters
- $batchRequests : BatchRequests
- $batchName : string
-
the name that will identify the request on the batch return.
- $id : int
Return values
void —addGetBillingAddresses()
Add the request to get the billing addresses for the current user
public
addGetBillingAddresses(BatchRequests $batchRequests, string $batchName) : void
Parameters
- $batchRequests : BatchRequests
- $batchName : string
Return values
void —addGetShippingAddresses()
Add the request to get the shipping addresses for the current user
public
addGetShippingAddresses(BatchRequests $batchRequests, string $batchName) : void
Parameters
- $batchRequests : BatchRequests
- $batchName : string
Return values
void —createBillingAddress()
Create new billing for the current user.
public
createBillingAddress([BillingAddressParametersGroup $data = null ][, string $dataValidatior = '' ]) : Address|null
Parameters
- $data : BillingAddressParametersGroup = null
- $dataValidatior : string = ''
-
Data validatior PId to apply
Return values
Address|null —createShippingAddress()
Create new shipping address for the current user.
public
createShippingAddress([ShippingAddressParametersGroup $data = null ][, string $dataValidatior = '' ]) : Address|null
Parameters
- $data : ShippingAddressParametersGroup = null
- $dataValidatior : string = ''
-
Data validatior PId to apply
Return values
Address|null —deleteAddress()
Delete the user address identified by the given id
public
deleteAddress(int $id) : Status|null
Parameters
- $id : int
Return values
Status|null —getAddress()
Returns the address identified by the given id
public
getAddress(int $id) : Address|null
Parameters
- $id : int
Return values
Address|null —getBillingAddresses()
Returns the billing addresses for the current user
public
getBillingAddresses() : ElementCollection|null
Return values
ElementCollection|null —getShippingAddresses()
Returns the shipping addresses for the current user
public
getShippingAddresses() : ElementCollection|null
Return values
ElementCollection|null —updateAddress()
Update the address identified by the given id.
public
updateAddress(int $id[, AddressParametersGroup $data = null ][, string $dataValidatior = '' ]) : Address|null
Parameters
- $id : int
- $data : AddressParametersGroup = null
- $dataValidatior : string = ''
-
Data validatior PId to apply