1 <?php
2 3 4
5 namespace Team3\PayU\Communication\Request\Model;
6
7 use Team3\PayU\Order\Model\Money\MoneyInterface;
8 use Team3\PayU\Order\Model\OrderInterface;
9 use JMS\Serializer\Annotation as JMS;
10 use Team3\PayU\Serializer\SerializableInterface;
11
12 13 14 15 16
17 class RefundRequestModel implements SerializableInterface
18 {
19 20 21 22
23 private $refund;
24
25 26 27 28
29 private $orderId;
30
31 32 33 34 35 36
37 public function __construct(
38 OrderInterface $order,
39 $description,
40 $bankDescription = null,
41 MoneyInterface $amount = null
42 ) {
43 $this->orderId = $order->getOrderId();
44 $this->refund = new RefundModel($description, $bankDescription, $amount);
45 }
46
47 48 49
50 public function getRefund()
51 {
52 return $this->refund;
53 }
54
55 56 57
58 public function getOrderId()
59 {
60 return $this->orderId;
61 }
62 }
63