|
Apache/2.4.41 (Ubuntu) Linux vmi616275.contaboserver.net 5.4.0-84-generic #94-Ubuntu SMP Thu Aug 26 20:27:37 UTC 2021 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) server ip : 62.171.164.128 | your ip : 127.0.0.1 safemode OFF > / home / dev2.destoffenstraat.com / app / code / Geissweb / Euvat / Model / |
Filename | /home/dev2.destoffenstraat.com/app/code/Geissweb/Euvat/Model/Validation.php |
Size | 6.32 kb |
Permission | rwxrwxrwx |
Owner | root : root |
Create time | 17-Aug-2025 10:26 |
Last modified | 09-Jul-2024 08:39 |
Last accessed | 22-Aug-2025 02:07 |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
<?php
/**
* ||GEISSWEB| EU VAT Enhanced
*
* NOTICE OF LICENSE
*
* This source file is subject to the GEISSWEB End User License Agreement
* that is available through the world-wide-web at this URL: https://www.geissweb.de/legal-information/eula
*
* DISCLAIMER
*
* Do not edit this file if you wish to update the extension in the future. If you wish to customize the extension
* for your needs please refer to our support for more information.
*
* @copyright Copyright (c) 2015 GEISS Weblösungen (https://www.geissweb.de)
* @license https://www.geissweb.de/legal-information/eula GEISSWEB End User License Agreement
*/
declare(strict_types=1);
namespace Geissweb\Euvat\Model;
use Geissweb\Euvat\Api\Data\ValidationInterface;
use Magento\Framework\Model\AbstractModel;
/**
* Class Validation
* Implements the validation interface (database representation)
*/
class Validation extends AbstractModel implements ValidationInterface
{
/**
* Constructor
*
* @return void
*/
protected function _construct()
{
$this->_init(\Geissweb\Euvat\Model\ResourceModel\Validation::class);
}
/**
* Get validation_id
*
* @return string
*/
public function getValidationId() : ?string
{
return $this->getData(self::VALIDATION_ID);
}
/**
* Set validation_id
*
* @param string $validationId
*
* @return $this
*/
public function setValidationId(string $validationId) : ValidationInterface
{
return $this->setData(self::VALIDATION_ID, $validationId);
}
/**
* Get vat_id
*
* @return string
*/
public function getVatId() : ?string
{
return $this->getData(self::VAT_ID);
}
/**
* Set vat_id
*
* @param string $vat_id
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatId(string $vat_id) : ValidationInterface
{
return $this->setData(self::VAT_ID, $vat_id);
}
/**
* Get vat_is_valid
*
* @return bool
*/
public function getVatIsValid() : ?bool
{
return $this->returnBool($this->getData(self::VAT_IS_VALID));
}
/**
* Set vat_is_valid
*
* @param bool $vat_is_valid
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatIsValid(bool $vat_is_valid) : ValidationInterface
{
return $this->setData(self::VAT_IS_VALID, $vat_is_valid);
}
/**
* Get vat_request_success
*
* @return bool
*/
public function getVatRequestSuccess() : ?bool
{
return $this->returnBool($this->getData(self::VAT_REQUEST_SUCCESS));
}
/**
* Returns boolean value from boolish strings
*
* @param bool|string $value
*/
private function returnBool($value): bool
{
if (is_bool($value)) {
return $value;
}
if ($value === "1") {
return true;
}
return false;
}
/**
* Set vat_request_success
*
* @param bool $vat_request_success
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatRequestSuccess(bool $vat_request_success) : ValidationInterface
{
return $this->setData(self::VAT_REQUEST_SUCCESS, $vat_request_success);
}
/**
* Get vat_request_id
*
* @return string
*/
public function getVatRequestId() : ?string
{
return $this->getData(self::VAT_REQUEST_ID);
}
/**
* Set vat_request_id
*
* @param string|null $vat_request_id
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatRequestId(?string $vat_request_id) : ValidationInterface
{
return $this->setData(self::VAT_REQUEST_ID, $vat_request_id);
}
/**
* Get vat_request_date
*
* @return string
*/
public function getVatRequestDate() : ?string
{
return $this->getData(self::VAT_REQUEST_DATE);
}
/**
* Set vat_request_date
*
* @param string|null $vat_request_date
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatRequestDate(?string $vat_request_date) : ValidationInterface
{
return $this->setData(self::VAT_REQUEST_DATE, $vat_request_date);
}
/**
* Get vat_trader_name
*
* @return string
*/
public function getVatTraderName() : ?string
{
return $this->getData(self::VAT_TRADER_NAME);
}
/**
* Set vat_trader_name
*
* @param string|null $vat_trader_name
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatTraderName(?string $vat_trader_name) : ValidationInterface
{
return $this->setData(self::VAT_TRADER_NAME, $vat_trader_name);
}
/**
* Get vat_trader_address
*
* @return string
*/
public function getVatTraderAddress() : ?string
{
return $this->getData(self::VAT_TRADER_ADDRESS);
}
/**
* Set vat_trader_address
*
* @param string|null $vat_trader_address
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatTraderAddress(?string $vat_trader_address) : ValidationInterface
{
return $this->setData(self::VAT_TRADER_ADDRESS, $vat_trader_address);
}
/**
* Get handle
*
* @return string
*/
public function getHandle() : ?string
{
return $this->getData(self::HANDLE);
}
/**
* Set handle
*
* @param string|null $handle
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setHandle(?string $handle) : ValidationInterface
{
return $this->setData(self::HANDLE, $handle);
}
/**
* Get request_message
*
* @return string
*/
public function getRequestMessage() : ?string
{
return $this->getData(self::REQUEST_MESSAGE);
}
/**
* Set request_message
*
* @param string|null $request_message
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setRequestMessage(?string $request_message) : ValidationInterface
{
return $this->setData(self::REQUEST_MESSAGE, $request_message);
}
}
/**
* ||GEISSWEB| EU VAT Enhanced
*
* NOTICE OF LICENSE
*
* This source file is subject to the GEISSWEB End User License Agreement
* that is available through the world-wide-web at this URL: https://www.geissweb.de/legal-information/eula
*
* DISCLAIMER
*
* Do not edit this file if you wish to update the extension in the future. If you wish to customize the extension
* for your needs please refer to our support for more information.
*
* @copyright Copyright (c) 2015 GEISS Weblösungen (https://www.geissweb.de)
* @license https://www.geissweb.de/legal-information/eula GEISSWEB End User License Agreement
*/
declare(strict_types=1);
namespace Geissweb\Euvat\Model;
use Geissweb\Euvat\Api\Data\ValidationInterface;
use Magento\Framework\Model\AbstractModel;
/**
* Class Validation
* Implements the validation interface (database representation)
*/
class Validation extends AbstractModel implements ValidationInterface
{
/**
* Constructor
*
* @return void
*/
protected function _construct()
{
$this->_init(\Geissweb\Euvat\Model\ResourceModel\Validation::class);
}
/**
* Get validation_id
*
* @return string
*/
public function getValidationId() : ?string
{
return $this->getData(self::VALIDATION_ID);
}
/**
* Set validation_id
*
* @param string $validationId
*
* @return $this
*/
public function setValidationId(string $validationId) : ValidationInterface
{
return $this->setData(self::VALIDATION_ID, $validationId);
}
/**
* Get vat_id
*
* @return string
*/
public function getVatId() : ?string
{
return $this->getData(self::VAT_ID);
}
/**
* Set vat_id
*
* @param string $vat_id
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatId(string $vat_id) : ValidationInterface
{
return $this->setData(self::VAT_ID, $vat_id);
}
/**
* Get vat_is_valid
*
* @return bool
*/
public function getVatIsValid() : ?bool
{
return $this->returnBool($this->getData(self::VAT_IS_VALID));
}
/**
* Set vat_is_valid
*
* @param bool $vat_is_valid
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatIsValid(bool $vat_is_valid) : ValidationInterface
{
return $this->setData(self::VAT_IS_VALID, $vat_is_valid);
}
/**
* Get vat_request_success
*
* @return bool
*/
public function getVatRequestSuccess() : ?bool
{
return $this->returnBool($this->getData(self::VAT_REQUEST_SUCCESS));
}
/**
* Returns boolean value from boolish strings
*
* @param bool|string $value
*/
private function returnBool($value): bool
{
if (is_bool($value)) {
return $value;
}
if ($value === "1") {
return true;
}
return false;
}
/**
* Set vat_request_success
*
* @param bool $vat_request_success
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatRequestSuccess(bool $vat_request_success) : ValidationInterface
{
return $this->setData(self::VAT_REQUEST_SUCCESS, $vat_request_success);
}
/**
* Get vat_request_id
*
* @return string
*/
public function getVatRequestId() : ?string
{
return $this->getData(self::VAT_REQUEST_ID);
}
/**
* Set vat_request_id
*
* @param string|null $vat_request_id
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatRequestId(?string $vat_request_id) : ValidationInterface
{
return $this->setData(self::VAT_REQUEST_ID, $vat_request_id);
}
/**
* Get vat_request_date
*
* @return string
*/
public function getVatRequestDate() : ?string
{
return $this->getData(self::VAT_REQUEST_DATE);
}
/**
* Set vat_request_date
*
* @param string|null $vat_request_date
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatRequestDate(?string $vat_request_date) : ValidationInterface
{
return $this->setData(self::VAT_REQUEST_DATE, $vat_request_date);
}
/**
* Get vat_trader_name
*
* @return string
*/
public function getVatTraderName() : ?string
{
return $this->getData(self::VAT_TRADER_NAME);
}
/**
* Set vat_trader_name
*
* @param string|null $vat_trader_name
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatTraderName(?string $vat_trader_name) : ValidationInterface
{
return $this->setData(self::VAT_TRADER_NAME, $vat_trader_name);
}
/**
* Get vat_trader_address
*
* @return string
*/
public function getVatTraderAddress() : ?string
{
return $this->getData(self::VAT_TRADER_ADDRESS);
}
/**
* Set vat_trader_address
*
* @param string|null $vat_trader_address
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setVatTraderAddress(?string $vat_trader_address) : ValidationInterface
{
return $this->setData(self::VAT_TRADER_ADDRESS, $vat_trader_address);
}
/**
* Get handle
*
* @return string
*/
public function getHandle() : ?string
{
return $this->getData(self::HANDLE);
}
/**
* Set handle
*
* @param string|null $handle
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setHandle(?string $handle) : ValidationInterface
{
return $this->setData(self::HANDLE, $handle);
}
/**
* Get request_message
*
* @return string
*/
public function getRequestMessage() : ?string
{
return $this->getData(self::REQUEST_MESSAGE);
}
/**
* Set request_message
*
* @param string|null $request_message
*
* @return \Geissweb\Euvat\Api\Data\ValidationInterface
*/
public function setRequestMessage(?string $request_message) : ValidationInterface
{
return $this->setData(self::REQUEST_MESSAGE, $request_message);
}
}