DocumentUserShippingAddress
extends DocumentUserAddress
in package
Uses
ElementTrait
This is the document user shipping address class.
The document document user shipping addresses will be stored in that class and will remain immutable (only get methods are available)
Tags
Table of Contents
$address | : string | |
---|---|---|
$addressAdditionalInformation | : string | |
$alias | : string | |
$city | : string | |
$company | : string | |
$country | : string | |
$error | : Error|null | |
$fax | : string | |
$firstName | : string | |
$id | Autonumeric element id. | : int |
$lastName | : string | |
$location | : Location|null | |
$mobile | : string | |
$nif | : string | |
$number | : string | |
$phone | : string | |
$postalCode | : string | |
$re | : bool | |
$reverseChargeVat | : bool | |
$state | : string | |
$tax | : bool | |
$type | : string | |
$vat | : string | |
__construct() | Elements constructor. | : mixed |
__toString() | Uses "json_encode" function to return the JSON format of the element. | : string |
getAddress() | Returns the address address (street and other filled data in this field). | : string |
getAddressAdditionalInformation() | Returns the address additional information. | : string |
getAlias() | Returns the address alias. | : string |
getCity() | Returns the address city. | : string |
getCompany() | Returns the address company. | : string |
getCountry() | Returns the address country. | : string |
getError() | Returns the current element error (if there is error). | : Error|null |
getFax() | Returns the address fax. | : string |
getFirstName() | Returns the user's address first name. | : string |
getId() | Returns the element id. | : int |
getLastName() | Returns the user's address lastName. | : string |
getLocation() | Returns the address location. | : Location|null |
getMobile() | Returns the address mobile. | : string |
getNif() | Returns the address nif. | : string |
getNumber() | Returns the address number. | : string |
getPhone() | Returns the address phone. | : string |
getPostalCode() | Returns the address postalCode. | : string |
getRe() | Returns if the address applies RE. | : bool |
getReverseChargeVat() | Returns if the address applies with the reverse charge vat. | : bool |
getState() | Returns the address state. | : string |
getTax() | Returns if the address applies taxes. | : bool |
getType() | Returns the address type. | : string |
getVat() | Returns the address vat. | : string |
jsonSerialize() | Allow elements to be serialized. | : array<string|int, mixed> |
toArray() | Used to allow elements to be serialized. | : array<string|int, mixed> |
getFieldItem() | : object|null | |
getFormattedData() | : mixed | |
setArrayField() | Convert an API array of objects to a PHP array of objects. | : array<string|int, mixed> |
setError() | : void | |
setLocation() | : void |
Properties
$address
protected
string
$address
= ''
$addressAdditionalInformation
protected
string
$addressAdditionalInformation
= ''
$alias
protected
string
$alias
= ''
$city
protected
string
$city
= ''
$company
protected
string
$company
= ''
$country
protected
string
$country
= ''
$error
protected
Error|null
$error
= null
$fax
protected
string
$fax
= ''
$firstName
protected
string
$firstName
= ''
$id
Autonumeric element id.
protected
int
$id
= 0
All the given elements by the LogiCommerce API will send it.
$lastName
protected
string
$lastName
= ''
$location
protected
Location|null
$location
= null
$mobile
protected
string
$mobile
= ''
$nif
protected
string
$nif
= ''
$number
protected
string
$number
= ''
$phone
protected
string
$phone
= ''
$postalCode
protected
string
$postalCode
= ''
$re
protected
bool
$re
= false
$reverseChargeVat
protected
bool
$reverseChargeVat
= false
$state
protected
string
$state
= ''
$tax
protected
bool
$tax
= true
$type
protected
string
$type
= ''
$vat
protected
string
$vat
= ''
Methods
__construct()
Elements constructor.
public
__construct([array<string|int, mixed> $data = [] ]) : mixed
Parameters
- $data : array<string|int, mixed> = []
-
Array that contains all the values to the object to initialize
Return values
mixed —__toString()
Uses "json_encode" function to return the JSON format of the element.
public
__toString() : string
Auto-invoked using echo or concatenations.
Return values
string —getAddress()
Returns the address address (street and other filled data in this field).
public
getAddress() : string
Return values
string —getAddressAdditionalInformation()
Returns the address additional information.
public
getAddressAdditionalInformation() : string
Return values
string —getAlias()
Returns the address alias.
public
getAlias() : string
Return values
string —getCity()
Returns the address city.
public
getCity() : string
Return values
string —getCompany()
Returns the address company.
public
getCompany() : string
Return values
string —getCountry()
Returns the address country.
public
getCountry() : string
Return values
string —getError()
Returns the current element error (if there is error).
public
getError() : Error|null
Return values
Error|null —getFax()
Returns the address fax.
public
getFax() : string
Return values
string —getFirstName()
Returns the user's address first name.
public
getFirstName() : string
Return values
string —getId()
Returns the element id.
public
getId() : int
Return values
int —getLastName()
Returns the user's address lastName.
public
getLastName() : string
Return values
string —getLocation()
Returns the address location.
public
getLocation() : Location|null
Return values
Location|null —getMobile()
Returns the address mobile.
public
getMobile() : string
Return values
string —getNif()
Returns the address nif.
public
getNif() : string
Return values
string —getNumber()
Returns the address number.
public
getNumber() : string
Return values
string —getPhone()
Returns the address phone.
public
getPhone() : string
Return values
string —getPostalCode()
Returns the address postalCode.
public
getPostalCode() : string
Return values
string —getRe()
Returns if the address applies RE.
public
getRe() : bool
Return values
bool —getReverseChargeVat()
Returns if the address applies with the reverse charge vat.
public
getReverseChargeVat() : bool
Return values
bool —getState()
Returns the address state.
public
getState() : string
Return values
string —getTax()
Returns if the address applies taxes.
public
getTax() : bool
Return values
bool —getType()
Returns the address type.
public
getType() : string
Return values
string —getVat()
Returns the address vat.
public
getVat() : string
Return values
string —jsonSerialize()
Allow elements to be serialized.
public
jsonSerialize() : array<string|int, mixed>
Auto-invoked using "json_encode" function.
Return values
array<string|int, mixed> —toArray()
Used to allow elements to be serialized.
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —getFieldItem()
protected
getFieldItem(array<string|int, mixed> $item, string $class) : object|null
Parameters
- $item : array<string|int, mixed>
- $class : string
Return values
object|null —getFormattedData()
protected
getFormattedData(mixed $value) : mixed
Parameters
- $value : mixed
Return values
mixed —setArrayField()
Convert an API array of objects to a PHP array of objects.
protected
setArrayField(array<string|int, mixed> $data, string $class) : array<string|int, mixed>
Parameters
- $data : array<string|int, mixed>
-
Array that contains all the values to the objects to initialize
- $class : string
-
The PHP class we want the objects to be
Return values
array<string|int, mixed> —setError()
protected
setError(mixed $error) : void
Parameters
- $error : mixed
Return values
void —setLocation()
protected
setLocation(array<string|int, mixed> $location) : void
Parameters
- $location : array<string|int, mixed>