1: | <?php |
2: | namespace Worldline\Connect\Sdk\Webhooks; |
3: | |
4: | use RuntimeException; |
5: | |
6: | |
7: | |
8: | |
9: | |
10: | |
11: | class ApiVersionMismatchException extends RuntimeException |
12: | { |
13: | |
14: | private $eventApiVersion; |
15: | |
16: | |
17: | private $sdkApiVersion; |
18: | |
19: | |
20: | |
21: | |
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: | |
32: | |
33: | public function getEventApiVersion() |
34: | { |
35: | return $this->eventApiVersion; |
36: | } |
37: | |
38: | |
39: | |
40: | |
41: | public function getSdkApiVersion() |
42: | { |
43: | return $this->sdkApiVersion; |
44: | } |
45: | } |
46: | |