RichDocumentTotal extends Element
in package
Uses ElementTrait

This is the rich document total class.

The document will be stored in that class and will remain immutable (only get methods are available)

Tags
see
RichDocumentTotal::getTotalRows()
see
RichDocumentTotal::getTotalRowsWithTaxes()
see
RichDocumentTotal::getTotalShippingsWithDiscounts()
see
RichDocumentTotal::getTotalShippingsWithDiscountsWithTaxes()
see
RichDocumentTotal::getTotalPaymentSystem()
see
RichDocumentTotal::getTotalPaymentSystemWithTaxes()
see
RichDocumentTotal::getTotal()
see
RichDocumentTotal::getTotalWithDiscounts()
see
RichDocumentTotal::getTotalTaxesValue()
see
RichDocumentTotal::getTotalWithDiscountsWithTaxes()
see
RichDocumentTotal::getTotalRowsDiscountsValue()
see
RichDocumentTotal::getTotalBasketDiscountsValue()
see
RichDocumentTotal::getTotalShippingDiscountsValue()
see
RichDocumentTotal::getTotalVouchers()
see
Element
see
ElementTrait

Table of Contents

$error  : Error|null
$total  : string
$totalBasketDiscountsValue  : string
$totalPaymentSystem  : string
$totalPaymentSystemWithTaxes  : string
$totalRows  : string
$totalRowsDiscountsValue  : string
$totalRowsWithTaxes  : string
$totalShippingDiscountsValue  : string
$totalShippingsWithDiscounts  : string
$totalShippingsWithDiscountsWithTaxes  : string
$totalTaxesValue  : string
$totalVouchers  : string
$totalWithDiscounts  : string
$totalWithDiscountsWithTaxes  : string
__construct() Elements constructor.  : mixed
__toString() Uses "json_encode" function to return the JSON format of the element.  : string
getError() Returns the current element error (if there is error).  : Error|null
getTotal() Returns the rich document total total.  : string
getTotalBasketDiscountsValue() Returns the rich document total totalBasketDiscountsValue.  : string
getTotalPaymentSystem() Returns the rich document total totalPaymentSystem.  : string
getTotalPaymentSystemWithTaxes() Returns the rich document total totalPaymentSystemWithTaxes.  : string
getTotalRows() Returns the rich document total totalRows.  : string
getTotalRowsDiscountsValue() Returns the rich document total totalRowsDiscountsValue.  : string
getTotalRowsWithTaxes() Returns the rich document total totalRowsWithTaxes.  : string
getTotalShippingDiscountsValue() Returns the rich document total totalShippingDiscountsValue.  : string
getTotalShippingsWithDiscounts() Returns the rich document total totalShippingsWithDiscounts.  : string
getTotalShippingsWithDiscountsWithTaxes() Returns the rich document total totalShippingsWithDiscountsWithTaxes.  : string
getTotalTaxesValue() Returns the rich document total totalTaxesValue.  : string
getTotalVouchers() Returns the rich document total totalVouchers.  : string
getTotalWithDiscounts() Returns the rich document total totalWithDiscounts.  : string
getTotalWithDiscountsWithTaxes() Returns the rich document total totalWithDiscountsWithTaxes.  : 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

Properties

$totalPaymentSystemWithTaxes

protected string $totalPaymentSystemWithTaxes = ''

$totalShippingDiscountsValue

protected string $totalShippingDiscountsValue = ''

$totalShippingsWithDiscounts

protected string $totalShippingsWithDiscounts = ''

$totalShippingsWithDiscountsWithTaxes

protected string $totalShippingsWithDiscountsWithTaxes = ''

$totalWithDiscountsWithTaxes

protected string $totalWithDiscountsWithTaxes = ''

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

getError()

Returns the current element error (if there is error).

public getError() : Error|null
Return values
Error|null

getTotal()

Returns the rich document total total.

public getTotal() : string
Return values
string

getTotalBasketDiscountsValue()

Returns the rich document total totalBasketDiscountsValue.

public getTotalBasketDiscountsValue() : string
Return values
string

getTotalPaymentSystem()

Returns the rich document total totalPaymentSystem.

public getTotalPaymentSystem() : string
Return values
string

getTotalPaymentSystemWithTaxes()

Returns the rich document total totalPaymentSystemWithTaxes.

public getTotalPaymentSystemWithTaxes() : string
Return values
string

getTotalRows()

Returns the rich document total totalRows.

public getTotalRows() : string
Return values
string

getTotalRowsDiscountsValue()

Returns the rich document total totalRowsDiscountsValue.

public getTotalRowsDiscountsValue() : string
Return values
string

getTotalRowsWithTaxes()

Returns the rich document total totalRowsWithTaxes.

public getTotalRowsWithTaxes() : string
Return values
string

getTotalShippingDiscountsValue()

Returns the rich document total totalShippingDiscountsValue.

public getTotalShippingDiscountsValue() : string
Return values
string

getTotalShippingsWithDiscounts()

Returns the rich document total totalShippingsWithDiscounts.

public getTotalShippingsWithDiscounts() : string
Return values
string

getTotalShippingsWithDiscountsWithTaxes()

Returns the rich document total totalShippingsWithDiscountsWithTaxes.

public getTotalShippingsWithDiscountsWithTaxes() : string
Return values
string

getTotalTaxesValue()

Returns the rich document total totalTaxesValue.

public getTotalTaxesValue() : string
Return values
string

getTotalVouchers()

Returns the rich document total totalVouchers.

public getTotalVouchers() : string
Return values
string

getTotalWithDiscounts()

Returns the rich document total totalWithDiscounts.

public getTotalWithDiscounts() : string
Return values
string

getTotalWithDiscountsWithTaxes()

Returns the rich document total totalWithDiscountsWithTaxes.

public getTotalWithDiscountsWithTaxes() : 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

Search results