Skip to content

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#

PropertyTypeDescription
$discounts readonlylist<CashDiscount>
$dueDays readonly?int
$lateFeeTerms readonly?PenaltyTerms
$text readonly?string

Methods#

MethodDescription
->__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,
)
ParameterTypeDescription
$text?string = null
$dueDays?int = null
$discountslist<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): static

Returns a copy with the given properties replaced.

ParameterTypeDescription
$changesarray<string, mixed>
Returns
static

The open core packages are MIT licensed. The legal wording of the country packs must be confirmed by a tax adviser.