From dee349220c1e505763f07fe34e5373763f06c50a Mon Sep 17 00:00:00 2001 From: Alexey Chelnakov Date: Mon, 25 Jun 2018 18:23:39 +0300 Subject: [PATCH] is version methods --- .../Configuration/Connection.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/AtolOnlineClient/Configuration/Connection.php b/src/AtolOnlineClient/Configuration/Connection.php index d283dea..a7edb1f 100644 --- a/src/AtolOnlineClient/Configuration/Connection.php +++ b/src/AtolOnlineClient/Configuration/Connection.php @@ -2,6 +2,7 @@ namespace AtolOnlineClient\Configuration; +use AtolOnlineClient\AtolOnlineApi; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Mapping\ClassMetadata; @@ -152,4 +153,20 @@ class Connection { return $this->version; } + + /** + * @return bool + */ + public function isVersion3() + { + return $this->getVersion() === AtolOnlineApi::API_VERSION_V3; + } + + /** + * @return bool + */ + public function isVersion4() + { + return $this->getVersion() === AtolOnlineApi::API_VERSION_V4; + } }