API reference / Quittio \ Core \ Data \ Payment
PaymentTerms
final readonly class in quittio/core · uses Immutable
Quittio\Core\Data\Payment\PaymentTerms · Source
Structured payment terms. Serialised into BT-20 text (and structured elements where the profile allows).
Properties#
| Property | Type | Description |
|---|---|---|
$discounts readonly | list<CashDiscount> | |
$dueDays readonly | ?int | |
$lateFeeTerms readonly | ?PenaltyTerms | |
$text readonly | ?string |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->isEmpty() | |
->toArray() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(
?string $text = null,
?int $dueDays = null,
list<CashDiscount> $discounts = [],
?PenaltyTerms $lateFeeTerms = null,
)| Parameter | Type | Description |
|---|---|---|
$text | ?string = null | |
$dueDays | ?int = null | |
$discounts | list<CashDiscount> = [] | |
$lateFeeTerms | ?PenaltyTerms = null |
isEmpty()#
public function isEmpty(): bool- Returns
bool
toArray()#
public function toArray(): array<string, mixed>- Returns
array<string, mixed>
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