API reference / Quittio \ Core \ Data \ Delivery
Period
final readonly class in quittio/core · uses Immutable
Quittio\Core\Data\Delivery\Period · Source
Invoicing period (BG-14: BT-73, BT-74) or invoice line period (BG-26: BT-134, BT-135). At least one of start or end must be set; the end must not lie before the start.
Properties#
| Property | Type | Description |
|---|---|---|
$end readonly | ?Date | |
$start readonly | ?Date |
Methods#
| Method | Description |
|---|---|
->__construct() | |
::between() | |
->isValid() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(?Date $start = null, ?Date $end = null)| Parameter | Type | Description |
|---|---|---|
$start | ?Date = null | |
$end | ?Date = null |
between()#
public static function between(Date|string|null $start, Date|string|null $end): self| Parameter | Type | Description |
|---|---|---|
$start | Date|string|null | |
$end | Date|string|null |
- Returns
self
isValid()#
public function isValid(): bool- Returns
bool
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