RichDocument
        
        extends Element
    
    
            
            in package
            
        
    
    
            
            Uses
                            ElementTrait                    
    
        
            This is the rich document class.
The document will be stored in that class and will remain immutable (only get methods are available)
Tags
Table of Contents
| $additionalInformation | : array<string|int, mixed> | |
|---|---|---|
| $additionalItems | : array<string|int, mixed> | |
| $comment | : string | |
| $currencies | : array<string|int, mixed> | |
| $customTags | : array<string|int, mixed> | |
| $date | : RichDateTime|null | |
| $delivery | : RichDocumentDelivery|null | |
| $deliveryDate | : RichDateTime|null | |
| $discounts | : array<string|int, mixed> | |
| $documentNumber | : string | |
| $documentParents | : array<string|int, mixed> | |
| $error | : Error|null | |
| $getpId | : string | |
| $headquarter | : RichDocumentHeadquarter|null | |
| $information | : RichDocumentInformation|null | |
| $items | : array<string|int, mixed> | |
| $languageCode | : string | |
| $onRequestAffected | : bool | |
| $paid | : bool | |
| $paymentDate | : RichDateTime|null | |
| $paymentSystem | : RichDocumentPaymentSystem|null | |
| $reverse | : bool | |
| $reverseChargeVat | : bool | |
| $rewardPoints | : array<string|int, mixed> | |
| $status | : string | |
| $substatus | : string | |
| $taxes | : array<string|int, mixed> | |
| $totals | : RichDocumentTotal|null | |
| $user | : RichDocumentUser|null | |
| $vouchers | : array<string|int, mixed> | |
| __construct() | Elements constructor. | : mixed | 
| __toString() | Uses "json_encode" function to return the JSON format of the element. | : string | 
| getAdditionalInformation() | Returns the rich document additionalInformation. | : array<string|int, RichDocumentAdditionalInformation> | 
| getAdditionalItems() | Returns the rich document additionalItems. | : array<string|int, RichDocumentAdditionalItem> | 
| getComment() | Returns the rich document comment. | : string | 
| getCurrencies() | Returns the rich document currencies. | : array<string|int, RichDocumentCurrency> | 
| getCustomTags() | Returns the rich document customTags. | : array<string|int, RichDocumentCustomTag> | 
| getDate() | Returns the rich document date. | : RichDateTime|null | 
| getDelivery() | Returns the rich document delivery. | : RichDocumentDelivery|null | 
| getDeliveryDate() | Returns the rich document deliveryDate. | : RichDateTime|null | 
| getDiscounts() | Returns the rich document discounts. | : array<string|int, RichDocumentDiscount> | 
| getDocumentNumber() | Returns the rich document documentNumber. | : string | 
| getDocumentParents() | Returns the rich document documentParents. | : array<string|int, RichDocumentParent> | 
| getError() | Returns the current element error (if there is error). | : Error|null | 
| getGetpId() | Returns the rich document getpId. | : string | 
| getHeadquarter() | Returns the rich document headquarter. | : RichDocumentHeadquarter|null | 
| getInformation() | Returns the rich document information. | : RichDocumentInformation|null | 
| getItems() | Returns the rich document items. | : array<string|int, RichDocumentItem> | 
| getLanguageCode() | Returns the rich document languageCode. | : string | 
| getOnRequestAffected() | Returns the rich document onRequestAffected. | : bool | 
| getPaid() | Returns the rich document paid. | : bool | 
| getPaymentDate() | Returns the rich document paymentDate. | : RichDateTime|null | 
| getPaymentSystem() | Returns the rich document paymentSystem. | : RichDocumentPaymentSystem|null | 
| getReverse() | Returns the rich document reverse. | : bool | 
| getReverseChargeVat() | Returns the rich document reverseChargeVat. | : bool | 
| getRewardPoints() | Returns the rich document rewardPoints. | : array<string|int, RichDocumentRewardPoints> | 
| getStatus() | Returns the rich document status. | : string | 
| getSubstatus() | Returns the rich document substatus. | : string | 
| getTaxes() | Returns the rich document taxes. | : array<string|int, RichDocumentTax> | 
| getTotals() | Returns the rich document totals. | : RichDocumentTotal|null | 
| getUser() | Returns the rich document user. | : RichDocumentUser|null | 
| getVouchers() | Returns the rich document vouchers. | : array<string|int, RichDocumentVoucher> | 
| 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 | |
| setAdditionalInformation() | : void | |
| setAdditionalItems() | : void | |
| setArrayField() | Convert an API array of objects to a PHP array of objects. | : array<string|int, mixed> | 
| setCurrencies() | : void | |
| setCustomTags() | : void | |
| setDate() | : void | |
| setDelivery() | : void | |
| setDeliveryDate() | : void | |
| setDiscounts() | : void | |
| setDocumentParents() | : void | |
| setError() | : void | |
| setHeadquarter() | : void | |
| setInformation() | : void | |
| setItems() | : void | |
| setPaymentDate() | : void | |
| setPaymentSystem() | : void | |
| setRewardPoints() | : void | |
| setTaxes() | : void | |
| setTotals() | : void | |
| setUser() | : void | |
| setVouchers() | : void | 
Properties
$additionalInformation
    protected
        array<string|int, mixed>
    $additionalInformation
     = []
        
        
    
$additionalItems
    protected
        array<string|int, mixed>
    $additionalItems
     = []
        
        
    
$comment
    protected
        string
    $comment
     = ''
        
        
    
$currencies
    protected
        array<string|int, mixed>
    $currencies
     = []
        
        
    
$customTags
    protected
        array<string|int, mixed>
    $customTags
     = []
        
        
    
$date
    protected
        RichDateTime|null
    $date
     = null
        
        
    
$delivery
    protected
        RichDocumentDelivery|null
    $delivery
     = null
        
        
    
$deliveryDate
    protected
        RichDateTime|null
    $deliveryDate
     = null
        
        
    
$discounts
    protected
        array<string|int, mixed>
    $discounts
     = []
        
        
    
$documentNumber
    protected
        string
    $documentNumber
     = ''
        
        
    
$documentParents
    protected
        array<string|int, mixed>
    $documentParents
     = []
        
        
    
$error
    protected
        Error|null
    $error
     = null
        
        
    
$getpId
    protected
        string
    $getpId
     = ''
        
        
    
$headquarter
    protected
        RichDocumentHeadquarter|null
    $headquarter
     = null
        
        
    
$information
    protected
        RichDocumentInformation|null
    $information
     = null
        
        
    
$items
    protected
        array<string|int, mixed>
    $items
     = []
        
        
    
$languageCode
    protected
        string
    $languageCode
     = ''
        
        
    
$onRequestAffected
    protected
        bool
    $onRequestAffected
     = false
        
        
    
$paid
    protected
        bool
    $paid
     = false
        
        
    
$paymentDate
    protected
        RichDateTime|null
    $paymentDate
     = null
        
        
    
$paymentSystem
    protected
        RichDocumentPaymentSystem|null
    $paymentSystem
     = null
        
        
    
$reverse
    protected
        bool
    $reverse
     = false
        
        
    
$reverseChargeVat
    protected
        bool
    $reverseChargeVat
     = false
        
        
    
$rewardPoints
    protected
        array<string|int, mixed>
    $rewardPoints
     = []
        
        
    
$status
    protected
        string
    $status
     = ''
        
        
    
$substatus
    protected
        string
    $substatus
     = ''
        
        
    
$taxes
    protected
        array<string|int, mixed>
    $taxes
     = []
        
        
    
$totals
    protected
        RichDocumentTotal|null
    $totals
     = null
        
        
    
$user
    protected
        RichDocumentUser|null
    $user
     = null
        
        
    
$vouchers
    protected
        array<string|int, mixed>
    $vouchers
     = []
        
        
    
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 —getAdditionalInformation()
Returns the rich document additionalInformation.
    public
                getAdditionalInformation() : array<string|int, RichDocumentAdditionalInformation>
    
    
    
        Return values
array<string|int, RichDocumentAdditionalInformation> —getAdditionalItems()
Returns the rich document additionalItems.
    public
                getAdditionalItems() : array<string|int, RichDocumentAdditionalItem>
    
    
    
        Return values
array<string|int, RichDocumentAdditionalItem> —getComment()
Returns the rich document comment.
    public
                getComment() : string
    
    
    
        Return values
string —getCurrencies()
Returns the rich document currencies.
    public
                getCurrencies() : array<string|int, RichDocumentCurrency>
    
    
    
        Return values
array<string|int, RichDocumentCurrency> —getCustomTags()
Returns the rich document customTags.
    public
                getCustomTags() : array<string|int, RichDocumentCustomTag>
    
    
    
        Return values
array<string|int, RichDocumentCustomTag> —getDate()
Returns the rich document date.
    public
                getDate() : RichDateTime|null
    
    
    
        Return values
RichDateTime|null —getDelivery()
Returns the rich document delivery.
    public
                getDelivery() : RichDocumentDelivery|null
    
    
    
        Return values
RichDocumentDelivery|null —getDeliveryDate()
Returns the rich document deliveryDate.
    public
                getDeliveryDate() : RichDateTime|null
    
    
    
        Return values
RichDateTime|null —getDiscounts()
Returns the rich document discounts.
    public
                getDiscounts() : array<string|int, RichDocumentDiscount>
    
    
    
        Return values
array<string|int, RichDocumentDiscount> —getDocumentNumber()
Returns the rich document documentNumber.
    public
                getDocumentNumber() : string
    
    
    
        Return values
string —getDocumentParents()
Returns the rich document documentParents.
    public
                getDocumentParents() : array<string|int, RichDocumentParent>
    
    
    
        Return values
array<string|int, RichDocumentParent> —getError()
Returns the current element error (if there is error).
    public
                getError() : Error|null
    
    
    
        Return values
Error|null —getGetpId()
Returns the rich document getpId.
    public
                getGetpId() : string
    
    
    
        Return values
string —getHeadquarter()
Returns the rich document headquarter.
    public
                getHeadquarter() : RichDocumentHeadquarter|null
    
    
    
        Return values
RichDocumentHeadquarter|null —getInformation()
Returns the rich document information.
    public
                getInformation() : RichDocumentInformation|null
    
    
    
        Return values
RichDocumentInformation|null —getItems()
Returns the rich document items.
    public
                getItems() : array<string|int, RichDocumentItem>
    
    
    
        Return values
array<string|int, RichDocumentItem> —getLanguageCode()
Returns the rich document languageCode.
    public
                getLanguageCode() : string
    
    
    
        Return values
string —getOnRequestAffected()
Returns the rich document onRequestAffected.
    public
                getOnRequestAffected() : bool
    
    
    
        Return values
bool —getPaid()
Returns the rich document paid.
    public
                getPaid() : bool
    
    
    
        Return values
bool —getPaymentDate()
Returns the rich document paymentDate.
    public
                getPaymentDate() : RichDateTime|null
    
    
    
        Return values
RichDateTime|null —getPaymentSystem()
Returns the rich document paymentSystem.
    public
                getPaymentSystem() : RichDocumentPaymentSystem|null
    
    
    
        Return values
RichDocumentPaymentSystem|null —getReverse()
Returns the rich document reverse.
    public
                getReverse() : bool
    
    
    
        Return values
bool —getReverseChargeVat()
Returns the rich document reverseChargeVat.
    public
                getReverseChargeVat() : bool
    
    
    
        Return values
bool —getRewardPoints()
Returns the rich document rewardPoints.
    public
                getRewardPoints() : array<string|int, RichDocumentRewardPoints>
    
    
    
        Return values
array<string|int, RichDocumentRewardPoints> —getStatus()
Returns the rich document status.
    public
                getStatus() : string
    
    
    
        Return values
string —getSubstatus()
Returns the rich document substatus.
    public
                getSubstatus() : string
    
    
    
        Return values
string —getTaxes()
Returns the rich document taxes.
    public
                getTaxes() : array<string|int, RichDocumentTax>
    
    
    
        Return values
array<string|int, RichDocumentTax> —getTotals()
Returns the rich document totals.
    public
                getTotals() : RichDocumentTotal|null
    
    
    
        Return values
RichDocumentTotal|null —getUser()
Returns the rich document user.
    public
                getUser() : RichDocumentUser|null
    
    
    
        Return values
RichDocumentUser|null —getVouchers()
Returns the rich document vouchers.
    public
                getVouchers() : array<string|int, RichDocumentVoucher>
    
    
    
        Return values
array<string|int, RichDocumentVoucher> —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 —setAdditionalInformation()
    protected
                setAdditionalInformation(array<string|int, mixed> $additionalInformation) : void
        
        Parameters
- $additionalInformation : array<string|int, mixed>
 
Return values
void —setAdditionalItems()
    protected
                setAdditionalItems(array<string|int, mixed> $additionalItems) : void
        
        Parameters
- $additionalItems : array<string|int, mixed>
 
Return values
void —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> —setCurrencies()
    protected
                setCurrencies(array<string|int, mixed> $currencies) : void
        
        Parameters
- $currencies : array<string|int, mixed>
 
Return values
void —setCustomTags()
    protected
                setCustomTags(array<string|int, mixed> $customTags) : void
        
        Parameters
- $customTags : array<string|int, mixed>
 
Return values
void —setDate()
    protected
                setDate(array<string|int, mixed> $date) : void
        
        Parameters
- $date : array<string|int, mixed>
 
Return values
void —setDelivery()
    protected
                setDelivery(array<string|int, mixed> $delivery) : void
        
        Parameters
- $delivery : array<string|int, mixed>
 
Return values
void —setDeliveryDate()
    protected
                setDeliveryDate(array<string|int, mixed> $deliveryDate) : void
        
        Parameters
- $deliveryDate : array<string|int, mixed>
 
Return values
void —setDiscounts()
    protected
                setDiscounts(array<string|int, mixed> $discounts) : void
        
        Parameters
- $discounts : array<string|int, mixed>
 
Return values
void —setDocumentParents()
    protected
                setDocumentParents(array<string|int, mixed> $documentParents) : void
        
        Parameters
- $documentParents : array<string|int, mixed>
 
Return values
void —setError()
    protected
                setError(mixed $error) : void
        
        Parameters
- $error : mixed
 
Return values
void —setHeadquarter()
    protected
                setHeadquarter(array<string|int, mixed> $headquarter) : void
        
        Parameters
- $headquarter : array<string|int, mixed>
 
Return values
void —setInformation()
    protected
                setInformation(array<string|int, mixed> $information) : void
        
        Parameters
- $information : array<string|int, mixed>
 
Return values
void —setItems()
    protected
                setItems(array<string|int, mixed> $items) : void
        
        Parameters
- $items : array<string|int, mixed>
 
Return values
void —setPaymentDate()
    protected
                setPaymentDate(array<string|int, mixed> $paymentDate) : void
        
        Parameters
- $paymentDate : array<string|int, mixed>
 
Return values
void —setPaymentSystem()
    protected
                setPaymentSystem(array<string|int, mixed> $paymentSystem) : void
        
        Parameters
- $paymentSystem : array<string|int, mixed>
 
Return values
void —setRewardPoints()
    protected
                setRewardPoints(array<string|int, mixed> $rewardPoints) : void
        
        Parameters
- $rewardPoints : array<string|int, mixed>
 
Return values
void —setTaxes()
    protected
                setTaxes(array<string|int, mixed> $taxes) : void
        
        Parameters
- $taxes : array<string|int, mixed>
 
Return values
void —setTotals()
    protected
                setTotals(array<string|int, mixed> $totals) : void
        
        Parameters
- $totals : array<string|int, mixed>
 
Return values
void —setUser()
    protected
                setUser(array<string|int, mixed> $user) : void
        
        Parameters
- $user : array<string|int, mixed>
 
Return values
void —setVouchers()
    protected
                setVouchers(array<string|int, mixed> $vouchers) : void
        
        Parameters
- $vouchers : array<string|int, mixed>