1 <?php
2
3 namespace PayPal\Api;
4
5 use PayPal\Common\PayPalModel;
6
7 /**
8 * Class RefundDetail
9 *
10 * Invoicing refund information.
11 *
12 * @package PayPal\Api
13 *
14 * @property string type
15 * @property string transaction_id
16 * @property string date
17 * @property string note
18 * @property \PayPal\Api\Currency amount
19 */
20 class RefundDetail extends PayPalModel
21 {
22 /**
23 * The PayPal refund type. Indicates whether refund was paid in invoicing flow through PayPal or externally. In the case of mark-as-refunded API, the supported refund type is `EXTERNAL`. For backward compatability, the `PAYPAL` refund type is still supported.
24 * Valid Values: ["PAYPAL", "EXTERNAL"]
25 *
26 * @param string $type
27 *
28 * @return $this
29 */
30 public function setType($type)
31 {
32 $this->type = $type;
33 return $this;
34 }
35
36 /**
37 * The PayPal refund type. Indicates whether refund was paid in invoicing flow through PayPal or externally. In the case of mark-as-refunded API, the supported refund type is `EXTERNAL`. For backward compatability, the `PAYPAL` refund type is still supported.
38 *
39 * @return string
40 */
41 public function getType()
42 {
43 return $this->type;
44 }
45
46 /**
47 * The PayPal refund transaction ID. Required with the `PAYPAL` refund type.
48 *
49 * @param string $transaction_id
50 *
51 * @return $this
52 */
53 public function setTransactionId($transaction_id)
54 {
55 $this->transaction_id = $transaction_id;
56 return $this;
57 }
58
59 /**
60 * The PayPal refund transaction ID. Required with the `PAYPAL` refund type.
61 *
62 * @return string
63 */
64 public function getTransactionId()
65 {
66 return $this->transaction_id;
67 }
68
69 /**
70 * Date on which the invoice was refunded. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
71 *
72 * @param string $date
73 *
74 * @return $this
75 */
76 public function setDate($date)
77 {
78 $this->date = $date;
79 return $this;
80 }
81
82 /**
83 * Date on which the invoice was refunded. Date format: yyyy-MM-dd z. For example, 2014-02-27 PST.
84 *
85 * @return string
86 */
87 public function getDate()
88 {
89 return $this->date;
90 }
91
92 /**
93 * Optional note associated with the refund.
94 *
95 * @param string $note
96 *
97 * @return $this
98 */
99 public function setNote($note)
100 {
101 $this->note = $note;
102 return $this;
103 }
104
105 /**
106 * Optional note associated with the refund.
107 *
108 * @return string
109 */
110 public function getNote()
111 {
112 return $this->note;
113 }
114
115 /**
116 * Amount to be recorded as refund against invoice. If this field is not passed, the total invoice paid amount is recorded as refund.
117 *
118 * @param \PayPal\Api\Currency $amount
119 *
120 * @return $this
121 */
122 public function setAmount($amount)
123 {
124 $this->amount = $amount;
125 return $this;
126 }
127
128 /**
129 * Amount to be recorded as refund against invoice. If this field is not passed, the total invoice paid amount is recorded as refund.
130 *
131 * @return \PayPal\Api\Currency
132 */
133 public function getAmount()
134 {
135 return $this->amount;
136 }
137
138 }
139