Currencies (Währungen)
Read-only API wrapper for the Billomat currency list at /currencies.
Access
$billomat->currenciesJustpilot\Billomat\Api\CurrenciesApi, created lazily on first access to $billomat->currencies.
Endpoints
| Method | HTTP | Path |
|---|---|---|
list() | GET | /currencies |
listPage() | GET | /currencies (page with metadata) |
iterateAll() | GET | /currencies (lazy over all pages) |
Fetching a single currency by ID (GET /currencies/{id}) is not implemented in the SDK; the list endpoint supports the filter code for ISO currency codes.
Methods
list(): list<Currency>
Lists all currencies.
$currencies = $billomat->currencies->list();
foreach ($currencies as $currency) {
echo $currency->code . ': ' . $currency->name . PHP_EOL;
}list() takes no filters. To look up a single currency (e.g. EUR), pass code to listPage() or filter the list on the client side:
$page = $billomat->currencies->listPage(['code' => 'EUR']);
$eur = $page->items[0] ?? null;Exceptions: AuthenticationException, HttpException.
listPage(array $filters = []): Page<Currency>
Like list(), with pagination metadata (page, perPage, total) in $page->info.
iterateAll(array $filters = [], int $pageSize = 100): Generator<int, Currency>
Lazy iteration over all pages.
Read model: Currency
final readonly class Justpilot\Billomat\Model\Currency
| Property | Type | Mapping |
|---|---|---|
code | string | code (fallback: currency_code) |
name | ?string | name |
symbol | ?string | symbol |
id | ?int | id |
extra | array<string,mixed> | Fields the SDK doesn't map yet, raw (see Read models) |
Currency::fromArray($data) hydrates from the wire format; Currency::toArray() writes snake_case back.