VatIdVerification
in package
Read onlyYes
FinalYes
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).
Table of Contents
Properties
- $address : string|null
- $error : string|null
- $name : string|null
- $supported : bool
- $valid : bool|null
- $vatId : string
Methods
- __construct() : mixed
- notSupported() : self
- The verifier does not cover this identifier (e.g. a Swiss VAT number for VIES).
- toArray() : array{vatId: string, valid: ?bool, name: ?string, address: ?string, error: ?string, supported: bool}
Properties
$address
public
string|null
$address
= null
$error
public
string|null
$error
= null
$name
public
string|null
$name
= null
$supported
public
bool
$supported
= true
$valid
public
bool|null
$valid
$vatId
public
string
$vatId
Methods
__construct()
public
__construct(string $vatId, bool|null $valid[, string|null $name = null ][, string|null $address = null ][, string|null $error = null ][, bool $supported = true ]) : mixed
Parameters
- $vatId : string
- $valid : bool|null
- $name : string|null = null
- $address : string|null = null
- $error : string|null = null
- $supported : bool = true
notSupported()
The verifier does not cover this identifier (e.g. a Swiss VAT number for VIES).
public
static notSupported(string $vatId[, string|null $reason = null ]) : self
Parameters
- $vatId : string
- $reason : string|null = null
Return values
selftoArray()
public
toArray() : array{vatId: string, valid: ?bool, name: ?string, address: ?string, error: ?string, supported: bool}