Zum Inhalt springen

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#

PropertyTypeDescription
$address readonly?string
$error readonly?string
$name readonly?string
$supported readonlybool
$valid readonly?bool
$vatId readonlystring

Methods#

MethodDescription
->__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,
)
ParameterTypeDescription
$vatIdstring
$valid?bool
$name?string = null
$address?string = null
$error?string = null
$supportedbool = true

notSupported()#

public static function notSupported(string $vatId, ?string $reason = null): self

static

The verifier does not cover this identifier (e.g. a Swiss VAT number for VIES).

ParameterTypeDescription
$vatIdstring
$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}

Die Open-Core-Pakete stehen unter der MIT-Lizenz. Die rechtlichen Formulierungen der Länderpakete sind mit einer Steuerberatung abzustimmen.