1 <?php
2
3 namespace PayPal\Api;
4
5 use PayPal\Common\PayPalModel;
6
7 /**
8 * Class RefundRequest
9 *
10 * A refund transaction.
11 *
12 * @package PayPal\Api
13 *
14 * @property \PayPal\Api\Amount amount
15 * @property string description
16 * @property string refund_source
17 * @property string reason
18 * @property string invoice_number
19 * @property bool refund_advice
20 */
21 class RefundRequest extends PayPalModel
22 {
23 /**
24 * Details including both refunded amount (to payer) and refunded fee (to payee).
25 *
26 * @param \PayPal\Api\Amount $amount
27 *
28 * @return $this
29 */
30 public function setAmount($amount)
31 {
32 $this->amount = $amount;
33 return $this;
34 }
35
36 /**
37 * Details including both refunded amount (to payer) and refunded fee (to payee).
38 *
39 * @return \PayPal\Api\Amount
40 */
41 public function getAmount()
42 {
43 return $this->amount;
44 }
45
46 /**
47 * Description of what is being refunded for. Character length and limitations: 255 single-byte alphanumeric characters.
48 *
49 * @param string $description
50 *
51 * @return $this
52 */
53 public function setDescription($description)
54 {
55 $this->description = $description;
56 return $this;
57 }
58
59 /**
60 * Description of what is being refunded for. Character length and limitations: 255 single-byte alphanumeric characters.
61 *
62 * @return string
63 */
64 public function getDescription()
65 {
66 return $this->description;
67 }
68
69 /**
70 * Type of PayPal funding source (balance or eCheck) that can be used for auto refund.
71 * Valid Values: ["INSTANT_FUNDING_SOURCE", "ECHECK", "UNRESTRICTED"]
72 *
73 * @param string $refund_source
74 *
75 * @return $this
76 */
77 public function setRefundSource($refund_source)
78 {
79 $this->refund_source = $refund_source;
80 return $this;
81 }
82
83 /**
84 * Type of PayPal funding source (balance or eCheck) that can be used for auto refund.
85 *
86 * @return string
87 */
88 public function getRefundSource()
89 {
90 return $this->refund_source;
91 }
92
93 /**
94 * Reason description for the Sale transaction being refunded.
95 *
96 * @param string $reason
97 *
98 * @return $this
99 */
100 public function setReason($reason)
101 {
102 $this->reason = $reason;
103 return $this;
104 }
105
106 /**
107 * Reason description for the Sale transaction being refunded.
108 *
109 * @return string
110 */
111 public function getReason()
112 {
113 return $this->reason;
114 }
115
116 /**
117 * The invoice number that is used to track this payment. Character length and limitations: 127 single-byte alphanumeric characters.
118 *
119 * @param string $invoice_number
120 *
121 * @return $this
122 */
123 public function setInvoiceNumber($invoice_number)
124 {
125 $this->invoice_number = $invoice_number;
126 return $this;
127 }
128
129 /**
130 * The invoice number that is used to track this payment. Character length and limitations: 127 single-byte alphanumeric characters.
131 *
132 * @return string
133 */
134 public function getInvoiceNumber()
135 {
136 return $this->invoice_number;
137 }
138
139 /**
140 * Flag to indicate that the buyer was already given store credit for a given transaction.
141 *
142 * @param bool $refund_advice
143 *
144 * @return $this
145 */
146 public function setRefundAdvice($refund_advice)
147 {
148 $this->refund_advice = $refund_advice;
149 return $this;
150 }
151
152 /**
153 * Flag to indicate that the buyer was already given store credit for a given transaction.
154 *
155 * @return bool
156 */
157 public function getRefundAdvice()
158 {
159 return $this->refund_advice;
160 }
161
162 }
163