1: <?php
2: namespace Worldline\Connect\Sdk\Webhooks;
3:
4: use RuntimeException;
5:
6: /**
7: * Class ApiVersionMismatchException
8: *
9: * @package Worldline\Connect\Sdk\Webhooks
10: */
11: class ApiVersionMismatchException extends RuntimeException
12: {
13: /** @var string */
14: private $eventApiVersion;
15:
16: /** @var string */
17: private $sdkApiVersion;
18:
19: /**
20: * @param string $eventApiVersion
21: * @param string $sdkApiVersion
22: */
23: public function __construct($eventApiVersion, $sdkApiVersion)
24: {
25: parent::__construct('event API version ' . $eventApiVersion . ' is not compatible with SDK API version ' . $sdkApiVersion);
26: $this->eventApiVersion = $eventApiVersion;
27: $this->sdkApiVersion = $sdkApiVersion;
28: }
29:
30: /**
31: * @return string
32: */
33: public function getEventApiVersion()
34: {
35: return $this->eventApiVersion;
36: }
37:
38: /**
39: * @return string
40: */
41: public function getSdkApiVersion()
42: {
43: return $this->sdkApiVersion;
44: }
45: }
46: