VatIdCheckTrait
VAT id verification bridge calls ({@see \App\UI\Api\System\Presenters\Traits\Actions\VatIdCheckVerifyTrait}).
Absolute endpoint — the trait is not tied to the endpoint of the repository that uses it.
Table of Contents
Methods
- fetchVatIdCheckHistory() : array<string, mixed>
- Evidence history (`api/system/vat-id-check/history`, admin only) — read only.
- fetchVatIdVerification() : array<string, mixed>
- saveVatIdManual() : Result
Methods
fetchVatIdCheckHistory()
Evidence history (`api/system/vat-id-check/history`, admin only) — read only.
public
fetchVatIdCheckHistory(string $number, string|null $countryCode) : array<string, mixed>
Parameters
- $number : string
- $countryCode : string|null
Return values
array<string, mixed> —countryCode, vatNumber, nonEuBusiness, businessDocumented, checks; empty on a bridge failure
fetchVatIdVerification()
public
fetchVatIdVerification(string $vatId, bool $forceOnline, string|null $countryCode[, bool $automatic = false ]) : array<string, mixed>
Parameters
- $vatId : string
- $forceOnline : bool
- $countryCode : string|null
- $automatic : bool = false
Return values
array<string, mixed> —empty on a bridge failure (RBAC deny, invalid input)
saveVatIdManual()
public
saveVatIdManual(string $countryCode, string $vatNumber, bool $valid, string $note) : Result
Parameters
- $countryCode : string
- $vatNumber : string
- $valid : bool
- $note : string