Countries (Länder)
Read-only API wrapper for the Billomat country list at /countries.
Access
$billomat->countriesJustpilot\Billomat\Api\CountriesApi, created lazily on first access to $billomat->countries.
Endpoints
| Method | HTTP | Path |
|---|---|---|
list() | GET | /countries |
listPage() | GET | /countries (page with metadata) |
iterateAll() | GET | /countries (lazy over all pages) |
Fetching a single country by ID (GET /countries/{id}) is not implemented in the SDK; the list endpoint accepts the filter code and returns the matching country directly.
Methods
list(): list<Country>
Lists all countries.
$countries = $billomat->countries->list();
foreach ($countries as $country) {
echo $country->code . ': ' . $country->name . PHP_EOL;
}Note: unlike users->list(), list() takes no filters. The Billomat endpoint does support the query parameter code (ISO 3166 alpha-2). To look up a single country, pass it to listPage() or filter the list on the client side:
$page = $billomat->countries->listPage(['code' => 'DE']);
$de = $page->items[0] ?? null;Exceptions: AuthenticationException, HttpException.
listPage(array $filters = []): Page<Country>
Like list(), with pagination metadata (page, perPage, total) in $page->info.
iterateAll(array $filters = [], int $pageSize = 100): Generator<int, Country>
Lazy iteration over all pages.
Read model: Country
final readonly class Justpilot\Billomat\Model\Country
| Property | Type | Mapping |
|---|---|---|
code | string | code (fallback: country_code) |
name | ?string | name |
id | ?int | id |
extra | array<string,mixed> | Fields the SDK doesn't map yet, raw (see Read models) |
Country::fromArray($data) hydrates from the wire format; Country::toArray() writes snake_case back.