VatNumberValidator

Implements \VatNumberValidatorInterface

Class VatNumberValidator

This class provides methods for validating VAT numbers

category

System

package

Customer

subpackage

Validation

implements

VatNumberValidatorInterface

Methods

Initialize the VAT number validator.

__construct(\vat_validation_ORIGIN $vatValidation = null) 

Arguments

$vatValidation

\vat_validation_ORIGIN

VAT validation.

Writes the validation results to cache.

_putValidationCache(string $p_vatNumber, integer $p_countryId, boolean $p_isGuest) 

Arguments

$p_vatNumber

string

VAT number.

$p_countryId

integer

Country ID.

$p_isGuest

boolean

Is customer a guest?

TODO Write validation results to cache.

Returns the customer status ID.

getCustomerStatusId(string $p_vatNumber, integer $p_countryId, boolean $p_isGuest) : integer

Arguments

$p_vatNumber

string

VAT number.

$p_countryId

integer

Country ID.

$p_isGuest

boolean

Is customer a guest?

Response

integer

Customer status ID.

Returns the error status

getErrorStatus(string $p_vatNumber, integer $p_countryId, boolean $p_isGuest) : boolean

Arguments

$p_vatNumber

string

VAT number.

$p_countryId

integer

Country ID.

$p_isGuest

boolean

Is customer a guest?

Response

boolean

Error status.

Returns the VAT number status code ID.

getVatNumberStatusCodeId(string $p_vatNumber, integer $p_countryId, boolean $p_isGuest) : integer

Arguments

$p_vatNumber

string

VAT number.

$p_countryId

integer

Country ID.

$p_isGuest

boolean

Is customer a guest?

Response

integer

VAT number status code ID.

Properties

VAT validation.

vatValidation : \vat_validation_ORIGIN
var

Type(s)

\vat_validation_ORIGIN