BaseRates
in package
FinalYes
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.
Table of Contents
Methods
- normalise() : 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.
- register() : void
- Adds or replaces rates. Later registrations win for the same date.
- registered() : array<string, string>
- reset() : void
- Forgets the registered rates; the shipped table stays. Quittio::resetState() calls it.
- table() : BaseRateTable
- The shipped table with the registered rates.
Methods
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.
public
static normalise(array<string|int, mixed> $rates) : array<string, string>
Parameters
- $rates : array<string|int, mixed>
Return values
array<string, string>register()
Adds or replaces rates. Later registrations win for the same date.
public
static register(array<string|int, mixed> $rates) : void
Parameters
- $rates : array<string|int, mixed>
-
ISO date (1 January or 1 July) => rate in percent, e.g. ['2027-01-01' => '1.27']
registered()
public
static registered() : array<string, string>
Return values
array<string, string>reset()
Forgets the registered rates; the shipped table stays. Quittio::resetState() calls it.
public
static reset() : void
table()
The shipped table with the registered rates.
public
static table() : BaseRateTable