1 <?php
2 /**
3 * @author Krzysztof Gzocha <krzysztof.gzocha@xsolve.pl>
4 */
5
6 namespace Team3\PayU\Communication\Response;
7
8 use JMS\Serializer\Annotation as JMS;
9 use Team3\PayU\Communication\Request\Model\RequestStatus;
10 use Team3\PayU\Communication\Request\OrderCancelRequest;
11 use Team3\PayU\Communication\Request\PayURequestInterface;
12
13 /**
14 * This object will be returned from {@link RequestProcess}
15 * if {@link OrderCancelRequest} will be passed.
16 *
17 * Class OrderCancelResponse
18 * @package Team3\PayU\Communication\Response
19 */
20 class OrderCancelResponse implements ResponseInterface
21 {
22 /**
23 * @var string
24 * @JMS\Type("string")
25 * @JMS\Accessor(
26 * setter="setPayUOrderId",
27 * getter="getPayUOrderId"
28 * )
29 */
30 private $orderId;
31
32 /**
33 * @var string
34 * @JMS\Type("string")
35 * @JMS\Accessor(
36 * setter="setOrderId",
37 * getter="getOrderId"
38 * )
39 */
40 private $extOrderId;
41
42 /**
43 * @var RequestStatus
44 * @JMS\Type("Team3\PayU\Communication\Request\Model\RequestStatus")
45 */
46 private $status;
47
48 /**
49 * @param PayURequestInterface $payURequest
50 *
51 * @return bool
52 */
53 public function supports(PayURequestInterface $payURequest)
54 {
55 return $payURequest instanceof OrderCancelRequest;
56 }
57
58 /**
59 * @return string
60 */
61 public function getPayUOrderId()
62 {
63 return $this->orderId;
64 }
65
66 /**
67 * @param string $orderId
68 *
69 * @return OrderCancelResponse
70 */
71 public function setPayUOrderId($orderId)
72 {
73 $this->orderId = $orderId;
74
75 return $this;
76 }
77
78 /**
79 * @return string
80 */
81 public function getOrderId()
82 {
83 return $this->extOrderId;
84 }
85
86 /**
87 * @param string $orderId
88 *
89 * @return OrderCancelResponse
90 */
91 public function setOrderId($orderId)
92 {
93 $this->extOrderId = $orderId;
94
95 return $this;
96 }
97
98 /**
99 * @return RequestStatus
100 */
101 public function getStatus()
102 {
103 return $this->status;
104 }
105
106 /**
107 * @param RequestStatus $status
108 *
109 * @return OrderCancelResponse
110 */
111 public function setStatus(RequestStatus $status)
112 {
113 $this->status = $status;
114
115 return $this;
116 }
117 }
118