API reference / Quittio \ Core \ Countries
DefaultCountryResolver
final readonly class in quittio/core · implements CountryResolver
Quittio\Core\Countries\DefaultCountryResolver · Source
The seller's country (BT-40) determines the leading pack. The buyer's country (BT-55) adds rules for cross-border invoices. A country without a pack of its own takes the pack of the country whose VAT territory it belongs to (VatTerritory::vatCountry(): Monaco the French, Liechtenstein the Swiss pack). Without an installed pack, a generic pack is used.
Methods#
| Method | Description |
|---|---|
->__construct() | |
->resolve() |
__construct()#
public function __construct(CountryRegistry $registry, ?string $defaultCountry = null)| Parameter | Type | Description |
|---|---|---|
$registry | CountryRegistry | |
$defaultCountry | ?string = null |
resolve()#
public function resolve(
InvoiceData $invoice,
?string $countryOverride = null,
): ResolvedCountries| Parameter | Type | Description |
|---|---|---|
$invoice | InvoiceData | |
$countryOverride | ?string = null |
- Returns
ResolvedCountries