API reference / Quittio \ Core \ Validation \ Plausibility
VatIdVerification
final readonly class in quittio/core
Quittio\Core\Validation\Plausibility\VatIdVerification · Source
Result of an online VAT identifier check. $valid is null if no statement is possible: the service was not reachable or answered with an error, or it does not cover the identifier ($supported = false).
Properties#
| Property | Type | Description |
|---|---|---|
$address readonly | ?string | |
$error readonly | ?string | |
$name readonly | ?string | |
$supported readonly | bool | |
$valid readonly | ?bool | |
$vatId readonly | string |
Methods#
| Method | Description |
|---|---|
->__construct() | |
::notSupported() | The verifier does not cover this identifier (e.g. a Swiss VAT number for VIES). |
->toArray() |
__construct()#
public function __construct(
string $vatId,
?bool $valid,
?string $name = null,
?string $address = null,
?string $error = null,
bool $supported = true,
)| Parameter | Type | Description |
|---|---|---|
$vatId | string | |
$valid | ?bool | |
$name | ?string = null | |
$address | ?string = null | |
$error | ?string = null | |
$supported | bool = true |
notSupported()#
public static function notSupported(string $vatId, ?string $reason = null): selfThe verifier does not cover this identifier (e.g. a Swiss VAT number for VIES).
| Parameter | Type | Description |
|---|---|---|
$vatId | string | |
$reason | ?string = null |
- Returns
self
toArray()#
public function toArray(): array{vatId: string, valid: ?bool, name: ?string, address: ?string, error: ?string, supported: bool}- Returns
array{vatId: string, valid: ?bool, name: ?string, address: ?string, error: ?string, supported: bool}