API reference / Quittio \ Core \ Data \ References
DocumentReference
final readonly class in quittio/core · uses Immutable
Quittio\Core\Data\References\DocumentReference · Source
Reference to a related document on line level or as additional reference (profile EXTENDED), e.g. delivery note, order, contract or receiving advice.
$typeCode uses UNTDID 1001 (e.g. 130 invoiced object, 916 additional document) where applicable.
Constants#
| Constant | Value | Description |
|---|---|---|
TYPE_CONTRACT | 'contract' | |
TYPE_DESPATCH_ADVICE | 'despatch_advice' | |
TYPE_ORDER | 'order' | |
TYPE_OTHER | 'other' | |
TYPE_RECEIVING_ADVICE | 'receiving_advice' |
Properties#
| Property | Type | Description |
|---|---|---|
$description readonly | ?string | |
$id readonly | string | |
$issueDate readonly | ?Date | |
$kind readonly | string | |
$lineId readonly | ?string | |
$typeCode readonly | ?RawCode |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(
string $id,
string $kind = self::TYPE_OTHER,
?string $lineId = null,
?Date $issueDate = null,
?RawCode $typeCode = null,
?string $description = null,
)| Parameter | Type | Description |
|---|---|---|
$id | string | |
$kind | string = self::TYPE_OTHER | |
$lineId | ?string = null | |
$issueDate | ?Date = null | |
$typeCode | ?RawCode = null | |
$description | ?string = null |
with()#
public function with(array<string, mixed> $changes): staticReturns a copy with the given properties replaced.
| Parameter | Type | Description |
|---|---|---|
$changes | array<string, mixed> |
- Returns
static