PHP Class DragonBe\Vies\CheckVatResponse

This is the response object from the VIES web service for validation of VAT numbers of companies registered in the European Union.
See also: DragonBe\Vies\Exception
Datei anzeigen Open project: dragonbe/vies Class Usage Examples

Protected Properties

Property Type Description
$address The registered address of a validated company (optional)
$countryCode The country code for a member of the European Union
$identifier The request Identifier (optional)
$name The registered name of a validated company (optional)
$requestDate The date of the request
$valid Flag indicating the VAT number is valid
$vatNumber The VAT number of a registered European company

Public Methods

Method Description
__construct ( null | StdClass $params = null ) Constructor for this response object
getAddress ( ) : string Retrieves the registered address of a company
getCountryCode ( ) : string Retrieves the two-character country code from a member of the European Union.
getIdentifier ( ) : mixed get requerst Identifier
getName ( ) : string Retrieves the registered name of the company
getRequestDate ( ) : DateTime Retrieves the date- and timestamp the VIES service response was created
getVatNumber ( ) : string Retrieves the VAT number from a company within the European Union
isValid ( ) : boolean Checks to see if a request is valid with given parameters
populate ( array | stdClass $row ) Populates this response object with external data
setAddress ( string $address ) : CheckVatResponse Sets the registered address of a company
setCountryCode ( string $countryCode ) : CheckVatResponse Sets the two-character country code for a member of the European Union
setIdentifier ( $identifier ) : CheckVatResponse Sets request Identifier
setName ( string $name ) : CheckVatResponse Sets optionally the registered name of the company
setRequestDate ( string $requestDate ) : CheckVatResponse Sets the date- and timestamp when the VIES service response was created
setValid ( boolean $flag ) : CheckVatResponse Sets the flag to indicate the provided details were valid or not
setVatNumber ( string $vatNumber ) : CheckVatResponse Sets the VAT number of a company within the European Union
toArray ( )

Method Details

__construct() public method

Constructor for this response object
public __construct ( null | StdClass $params = null )
$params null | StdClass

getAddress() public method

Retrieves the registered address of a company
public getAddress ( ) : string
return string

getCountryCode() public method

Retrieves the two-character country code from a member of the European Union.
public getCountryCode ( ) : string
return string

getIdentifier() public method

get requerst Identifier
public getIdentifier ( ) : mixed
return mixed

getName() public method

Retrieves the registered name of the company
public getName ( ) : string
return string

getRequestDate() public method

Retrieves the date- and timestamp the VIES service response was created
public getRequestDate ( ) : DateTime
return DateTime

getVatNumber() public method

Retrieves the VAT number from a company within the European Union
public getVatNumber ( ) : string
return string

isValid() public method

Checks to see if a request is valid with given parameters
public isValid ( ) : boolean
return boolean

populate() public method

Populates this response object with external data
public populate ( array | stdClass $row )
$row array | stdClass

setAddress() public method

Sets the registered address of a company
public setAddress ( string $address ) : CheckVatResponse
$address string
return CheckVatResponse

setCountryCode() public method

Sets the two-character country code for a member of the European Union
public setCountryCode ( string $countryCode ) : CheckVatResponse
$countryCode string
return CheckVatResponse

setIdentifier() public method

Sets request Identifier
public setIdentifier ( $identifier ) : CheckVatResponse
$identifier
return CheckVatResponse

setName() public method

Sets optionally the registered name of the company
public setName ( string $name ) : CheckVatResponse
$name string
return CheckVatResponse

setRequestDate() public method

Sets the date- and timestamp when the VIES service response was created
public setRequestDate ( string $requestDate ) : CheckVatResponse
$requestDate string
return CheckVatResponse

setValid() public method

Sets the flag to indicate the provided details were valid or not
public setValid ( boolean $flag ) : CheckVatResponse
$flag boolean
return CheckVatResponse

setVatNumber() public method

Sets the VAT number of a company within the European Union
public setVatNumber ( string $vatNumber ) : CheckVatResponse
$vatNumber string
return CheckVatResponse

toArray() public method

public toArray ( )

Property Details

$address protected_oe property

The registered address of a validated company (optional)
protected $address

$countryCode protected_oe property

The country code for a member of the European Union
protected $countryCode

$identifier protected_oe property

The request Identifier (optional)
protected $identifier

$name protected_oe property

The registered name of a validated company (optional)
protected $name

$requestDate protected_oe property

The date of the request
protected $requestDate

$valid protected_oe property

Flag indicating the VAT number is valid
protected $valid

$vatNumber protected_oe property

The VAT number of a registered European company
protected $vatNumber