API reference / Quittio \ Country \ DE \ Dunning
BaseRates
final class in quittio/country-de
Quittio\Country\DE\Dunning\BaseRates · Source
Base rates (section 247 BGB) of the application in addition to the table shipped with Quittio, e.g. rates published after the release or fetched with BundesbankBaseRates. DefaultInterest uses table() unless it is given a table of its own. In Laravel the GermanyServiceProvider registers the configured and the fetched rates.
Methods#
| Method | Description |
|---|---|
::normalise() | Checks and normalises rates: the base rate changes on 1 January and 1 July only (section 247 (1) sentence 2 BGB), values are decimal percentages. |
::register() | Adds or replaces rates. Later registrations win for the same date. |
::registered() | |
::reset() | Forgets the registered rates; the shipped table stays. Quittio::resetState() calls it. |
::table() | The shipped table with the registered rates. |
normalise()#
public static function normalise(array<array-key, mixed> $rates): array<string, string>Checks and normalises rates: the base rate changes on 1 January and 1 July only (section 247 (1) sentence 2 BGB), values are decimal percentages.
| Parameter | Type | Description |
|---|---|---|
$rates | array<array-key, mixed> |
- Returns
array<string, string>
register()#
public static function register(array<array-key, mixed> $rates): voidAdds or replaces rates. Later registrations win for the same date.
| Parameter | Type | Description |
|---|---|---|
$rates | array<array-key, mixed> | ISO date (1 January or 1 July) => rate in percent, e.g. ['2027-01-01' => '1.27'] |
registered()#
public static function registered(): array<string, string>- Returns
array<string, string>
reset()#
public static function reset(): voidForgets the registered rates; the shipped table stays. Quittio::resetState() calls it.
table()#
public static function table(): BaseRateTableThe shipped table with the registered rates.
- Returns
BaseRateTable