/**
  * Usage: vat_number.
  *
  * @param string $attribute
  * @param mixed  $value
  * @param array  $parameters
  *
  * @return bool
  */
 public function validateVatNumber($attribute, $value, $parameters)
 {
     try {
         return VatCalculator::isValidVATNumber($value);
     } catch (VATCheckUnavailableException $e) {
         return false;
     }
 }
 /**
  * Usage: vat_number.
  *
  * @param string $attribute
  * @param mixed  $value
  * @param array  $parameters
  * @param $validator
  *
  * @return bool
  */
 public function validateVatNumber($attribute, $value, $parameters, $validator)
 {
     $validator->setCustomMessages(['vat_number' => $validator->getTranslator()->get('vatnumber-validator::validation.vat_number')]);
     try {
         return VatCalculator::isValidVATNumber($value);
     } catch (VATCheckUnavailableException $e) {
         return false;
     }
 }
 /**
  * Get the tax percentage to apply to the subscription.
  *
  * @return int
  */
 public function getTaxPercent()
 {
     return VatCalculator::getTaxRateForCountry($this->userCountryCode, $this->userIsCompany) * 100;
 }