18 lines
571 B
PHP
18 lines
571 B
PHP
<?php
|
|
|
|
namespace App\Services\Tax;
|
|
|
|
interface VatIdVerifier
|
|
{
|
|
/**
|
|
* Ask the register whether this VAT number exists.
|
|
*
|
|
* Takes the number in any shape a person might type it — spaces, dots, a
|
|
* lower-case country prefix — and normalises it itself, so no caller has to
|
|
* remember to. Returns UNAVAILABLE rather than throwing when the register
|
|
* cannot be reached: an outage is an answer callers have to handle, not an
|
|
* exception to be swallowed at each call site.
|
|
*/
|
|
public function check(string $vatId): VatIdCheck;
|
|
}
|