API reference / Quittio \ Core \ Dunning
ReferenceRates
interface in quittio/core
Quittio\Core\Dunning\ReferenceRates · Source
The reference interest rate of a country's late payment law, e.g. the German Basiszinssatz (section 247 BGB) or the ECB main refinancing rate. Default interest is the reference rate plus the points of the DunningLaw.
Methods#
| Method | Description |
|---|---|
->periods() | Periods with a constant rate between two dates (inclusive start, exclusive end). |
->rateOn() | The rate in percent on the date. |
periods()#
public function periods(
Date $from,
Date $until,
): list<array{from: Date, until: Date, rate: BigDecimal}>Periods with a constant rate between two dates (inclusive start, exclusive end).
| Parameter | Type | Description |
|---|---|---|
$from | Date | |
$until | Date |
- Returns
list<array{from: Date, until: Date, rate: Brick\Math\BigDecimal}>- Throws
InvalidArgumentException– when no rate is known for part of the time
rateOn()#
public function rateOn(Date $date): BigDecimalThe rate in percent on the date.
| Parameter | Type | Description |
|---|---|---|
$date | Date |
- Returns
Brick\Math\BigDecimal- Throws
InvalidArgumentException– when no rate is known for the date