Class
public static function factoryFromIdentifier(string $identifier): selfParameters
| Type | Name | Description |
|---|---|---|
string | $identifier |
Returns static
public static function factoryFromInput(string $input): selfCreate new instance, normalizing input prior to instantiation
Parameters
| Type | Name | Description |
|---|---|---|
string | $input |
Returns static
public function getIdentifier(): stringFull string representation of a VAT number
Returns string
public function getPrefix(): string(country) prefix related to the VAT number.
WHMCS has a legacy that UK VAT number may or may not have the GB prefix.
Returns string
public function getNumber(): stringThe number portion of the VAT number (ie, sans any prefix). Note while by convention this is named a number, there may be alpha characters present.
Returns string
public function isUK(): boolShould the VAT number be treated as belonging to a UK business entity
Returns bool
public function isEU(): boolShould the VAT number be treated as belonging to a country in the EEA
Returns bool
public function isValid(): bool