CoolCMS API

VatIdCheck extends VatIdCheck
in package

One VAT id check (`cms_system_vat_id_checks`).

History table: every VIES call or manual verification is a new row, the latest row of a country_code + vat_number pair wins. valid = null = VIES did not answer. source = manual rows carry the evidence in note (also used as proof of a non-EU business, C1).

The engine reads and writes this table with raw DBAL (see VatIdCheckRepository); the entity exists for the admin grid and for ColumnLimits.

Attributes
#[Entity]
#[Table]
$name: 'cms_system_vat_id_checks'
#[TableAlias]
'vatIdCheck'

Table of Contents

Properties

$address  : string|null
$checkedAt  : DateTime
$checkedByUserId  : int|null
$countryCode  : string
$error  : string|null
$id  : int|null
$name  : string|null
$note  : string|null
$requestIdentifier  : string|null
$source  : string
$valid  : bool|null
$vatNumber  : string

Methods

__construct()  : mixed
callInitMethods()  : void
Calls `init{TraitName}()` for every used trait that defines such a method.
getAddress()  : string|null
getAllTraits()  : array<string, string>
Returns all traits the class uses, including those used by parent classes and nested traits.
getCheckedAt()  : DateTime
getCheckedByUserId()  : int|null
getCountryCode()  : string
getError()  : string|null
getId()  : int|null
getName()  : string|null
getNote()  : string|null
getRequestIdentifier()  : string|null
getSource()  : string
getValid()  : bool|null
getVatNumber()  : string
isPersisted()  : bool
setAddress()  : $this
setCheckedAt()  : $this
setCheckedByUserId()  : $this
setCountryCode()  : $this
setError()  : $this
setId()  : $this
setName()  : $this
setNote()  : $this
setRequestIdentifier()  : $this
setSource()  : $this
setValid()  : $this
setVatNumber()  : $this
getTraitsRecursive()  : array<string, string>
Walks the trait list recursively and collects nested traits too.

Properties

$address

protected string|null $address = null
Attributes
#[Column]
$name: 'address'
$type: 'string'
$length: 255
$nullable: true

$checkedAt

protected DateTime $checkedAt = new DateTime()
Attributes
#[Column]
$name: 'checked_at'
$type: 'datetime'

$checkedByUserId

protected int|null $checkedByUserId = null
Attributes
#[Column]
$name: 'checked_by_user_id'
$type: 'integer'
$nullable: true
$options: ['unsigned' => true]

$countryCode

protected string $countryCode = ''
Attributes
#[Column]
$name: 'country_code'
$type: 'string'
$length: 2
$options: ['fixed' => true]

$error

protected string|null $error = null
Attributes
#[Column]
$name: 'error'
$type: 'string'
$length: 255
$nullable: true

$id

protected int|null $id = null
Attributes
#[Column]
$name: 'vat_id_check_id'
$type: 'integer'
$options: ['unsigned' => true]
#[GeneratedValue]
#[Id]

$name

protected string|null $name = null
Attributes
#[Column]
$name: 'name'
$type: 'string'
$length: 255
$nullable: true

$note

protected string|null $note = null
Attributes
#[Column]
$name: 'note'
$type: 'text'
$nullable: true

$requestIdentifier

protected string|null $requestIdentifier = null
Attributes
#[Column]
$name: 'request_identifier'
$type: 'string'
$length: 40
$nullable: true

$source

protected string $source = 'vies'
Attributes
#[Column]
$name: 'source'
$type: 'string'
$length: 10

$valid

protected bool|null $valid = null
Attributes
#[Column]
$name: 'valid'
$type: 'boolean'
$nullable: true

$vatNumber

protected string $vatNumber = ''
Attributes
#[Column]
$name: 'vat_number'
$type: 'string'
$length: 20

Methods

__construct()

public __construct([int|null $id = null ][, string $countryCode = '' ][, string $vatNumber = '' ][, bool|null $valid = null ][, string|null $name = null ][, string|null $address = null ][, string|null $requestIdentifier = null ][, DateTime $checkedAt = new DateTime() ][, string $source = 'vies' ][, int|null $checkedByUserId = null ][, string|null $note = null ][, string|null $error = null ]) : mixed
Parameters
$id : int|null = null
$countryCode : string = ''
$vatNumber : string = ''
$valid : bool|null = null
$name : string|null = null
$address : string|null = null
$requestIdentifier : string|null = null
$checkedAt : DateTime = new DateTime()
$source : string = 'vies'
$checkedByUserId : int|null = null
$note : string|null = null
$error : string|null = null

callInitMethods()

Calls `init{TraitName}()` for every used trait that defines such a method.

public callInitMethods() : void

getAddress()

public getAddress() : string|null
Return values
string|null

getAllTraits()

Returns all traits the class uses, including those used by parent classes and nested traits.

public getAllTraits() : array<string, string>
Return values
array<string, string>

getCheckedAt()

public getCheckedAt() : DateTime
Return values
DateTime

getCheckedByUserId()

public getCheckedByUserId() : int|null
Return values
int|null

getCountryCode()

public getCountryCode() : string
Return values
string

getError()

public getError() : string|null
Return values
string|null

getName()

public getName() : string|null
Return values
string|null

getNote()

public getNote() : string|null
Return values
string|null

getRequestIdentifier()

public getRequestIdentifier() : string|null
Return values
string|null

getSource()

public getSource() : string
Return values
string

getValid()

public getValid() : bool|null
Return values
bool|null

getVatNumber()

public getVatNumber() : string
Return values
string

setAddress()

public setAddress(string|null $address) : $this
Parameters
$address : string|null
Return values
$this

setCheckedAt()

public setCheckedAt(DateTime $checkedAt) : $this
Parameters
$checkedAt : DateTime
Return values
$this

setCheckedByUserId()

public setCheckedByUserId(int|null $checkedByUserId) : $this
Parameters
$checkedByUserId : int|null
Return values
$this

setCountryCode()

public setCountryCode(string $countryCode) : $this
Parameters
$countryCode : string
Return values
$this

setError()

public setError(string|null $error) : $this
Parameters
$error : string|null
Return values
$this

setId()

public setId(int|null $id) : $this
Parameters
$id : int|null
Return values
$this

setName()

public setName(string|null $name) : $this
Parameters
$name : string|null
Return values
$this

setNote()

public setNote(string|null $note) : $this
Parameters
$note : string|null
Return values
$this

setRequestIdentifier()

public setRequestIdentifier(string|null $requestIdentifier) : $this
Parameters
$requestIdentifier : string|null
Return values
$this

setSource()

public setSource(string $source) : $this
Parameters
$source : string
Return values
$this

setValid()

public setValid(bool|null $valid) : $this
Parameters
$valid : bool|null
Return values
$this

setVatNumber()

public setVatNumber(string $vatNumber) : $this
Parameters
$vatNumber : string
Return values
$this

getTraitsRecursive()

Walks the trait list recursively and collects nested traits too.

private static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
$traits : array<string, string>
Return values
array<string, string>
On this page

Search results