protected function resolveTargetCountry($target): CountryInterface
    {
        if (null === $target) {
            return $this->countryProvider->getCountry();
        }

        if ($target instanceof CountryInterface) {
            return $target;
        }

        if ($target instanceof SaleInterface) {
            $country = $this->resolveSaleTargetCountry($target);
        } elseif ($target instanceof CustomerInterface) {
            $country = $this->resolveCustomerTargetCountry($target);
        } elseif(is_string($target) && 2 == strlen($target)) {
            $country = $this->getCountryByCode($target);
        } else {
            throw new InvalidArgumentException("Unexpected taxation target.");
        }

        return $country ?: $this->countryProvider->getCountry();
    }