1: <?php
2: /*
3: * This class was auto-generated from the API references found at
4: * https://apireference.connect.worldline-solutions.com/
5: */
6: namespace Worldline\Connect\Sdk\V1;
7:
8: use Worldline\Connect\Sdk\Domain\DataObject;
9:
10: /**
11: * Class IdempotenceException
12: *
13: * @package Worldline\Connect\Sdk\V1
14: */
15: class IdempotenceException extends ResponseException
16: {
17: /** @var string */
18: private $idempotenceKey;
19:
20: /** @var string */
21: private $idempotenceRequestTimestamp;
22:
23: /**
24: * @param int $httpStatusCode
25: * @param DataObject $response
26: * @param string $message
27: * @param string $idempotenceKey
28: * @param string $idempotenceRequestTimestamp;
29: */
30: public function __construct(
31: $httpStatusCode,
32: DataObject $response,
33: $message = null,
34: $idempotenceKey = '',
35: $idempotenceRequestTimestamp = ''
36: ) {
37: if ($message == null) {
38: $message = 'the Worldline Global Collect platform returned a duplicate request error response';
39: }
40: parent::__construct($httpStatusCode, $response, $message);
41: $this->idempotenceKey = $idempotenceKey;
42: $this->idempotenceRequestTimestamp = $idempotenceRequestTimestamp;
43: }
44:
45: /**
46: * @return string
47: */
48: public function getIdempotenceKey()
49: {
50: return $this->idempotenceKey;
51: }
52:
53: /**
54: * @return string
55: */
56: public function getIdempotenceRequestTimestamp()
57: {
58: return $this->idempotenceRequestTimestamp;
59: }
60: }
61: