PluginProbe
MONEI Payments for WooCommerce / 4.2.0
MONEI Payments for WooCommerce v4.2.0
7.3.3 7.3.2 7.3.1 7.3.0 7.2.4 7.2.3 7.2.2 7.2.0 7.2.1 7.1.3 2.1.0 3.0.0 3.1.0 3.1.1 4.0.0 4.1.0 4.1.1 4.2.0 4.2.1 5.0 5.1.0 5.1.1 5.1.2 5.2.2 5.2.3 All 87 releases
monei / includes / lib / Model / RefundPaymentRequest.php

RefundPaymentRequest.php in MONEI Payments for WooCommerce 4.2.0, at includes/lib/Model/RefundPaymentRequest.php

338 lines 7.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * RefundPaymentRequest
4 *
5 * PHP version 5
6 *
7 * @category Class
8 * @package OpenAPI\Client
9 * @author OpenAPI Generator team
10 * @link https://openapi-generator.tech
11 */
12
13 /**
14 * MONEI API v1
15 *
16 * The MONEI API is organized around [REST](https://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
17 *
18 * The version of the OpenAPI document: 1.0.0
19 *
20 * Generated by: https://openapi-generator.tech
21 * OpenAPI Generator version: 4.3.1
22 */
23
24 /**
25 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26 * https://openapi-generator.tech
27 * Do not edit the class manually.
28 */
29
30 namespace OpenAPI\Client\Model;
31
32 use \ArrayAccess;
33 use \OpenAPI\Client\ObjectSerializer;
34
35 /**
36 * RefundPaymentRequest Class Doc Comment
37 *
38 * @category Class
39 * @package OpenAPI\Client
40 * @author OpenAPI Generator team
41 * @link https://openapi-generator.tech
42 */
43 class RefundPaymentRequest implements ModelInterface, ArrayAccess
44 {
45 const DISCRIMINATOR = null;
46
47 /**
48 * The original name of the model.
49 *
50 * @var string
51 */
52 protected static $openAPIModelName = 'RefundPaymentRequest';
53
54 /**
55 * Array of property to type mappings. Used for (de)serialization
56 *
57 * @var string[]
58 */
59 protected static $openAPITypes = [
60 'amount' => 'int',
61 'refund_reason' => '\OpenAPI\Client\Model\PaymentRefundReason'
62 ];
63
64 /**
65 * Array of property to format mappings. Used for (de)serialization
66 *
67 * @var string[]
68 */
69 protected static $openAPIFormats = [
70 'amount' => null,
71 'refund_reason' => null
72 ];
73
74 /**
75 * Array of property to type mappings. Used for (de)serialization
76 *
77 * @return array
78 */
79 public static function openAPITypes()
80 {
81 return self::$openAPITypes;
82 }
83
84 /**
85 * Array of property to format mappings. Used for (de)serialization
86 *
87 * @return array
88 */
89 public static function openAPIFormats()
90 {
91 return self::$openAPIFormats;
92 }
93
94 /**
95 * Array of attributes where the key is the local name,
96 * and the value is the original name
97 *
98 * @var string[]
99 */
100 protected static $attributeMap = [
101 'amount' => 'amount',
102 'refund_reason' => 'refundReason'
103 ];
104
105 /**
106 * Array of attributes to setter functions (for deserialization of responses)
107 *
108 * @var string[]
109 */
110 protected static $setters = [
111 'amount' => 'setAmount',
112 'refund_reason' => 'setRefundReason'
113 ];
114
115 /**
116 * Array of attributes to getter functions (for serialization of requests)
117 *
118 * @var string[]
119 */
120 protected static $getters = [
121 'amount' => 'getAmount',
122 'refund_reason' => 'getRefundReason'
123 ];
124
125 /**
126 * Array of attributes where the key is the local name,
127 * and the value is the original name
128 *
129 * @return array
130 */
131 public static function attributeMap()
132 {
133 return self::$attributeMap;
134 }
135
136 /**
137 * Array of attributes to setter functions (for deserialization of responses)
138 *
139 * @return array
140 */
141 public static function setters()
142 {
143 return self::$setters;
144 }
145
146 /**
147 * Array of attributes to getter functions (for serialization of requests)
148 *
149 * @return array
150 */
151 public static function getters()
152 {
153 return self::$getters;
154 }
155
156 /**
157 * The original name of the model.
158 *
159 * @return string
160 */
161 public function getModelName()
162 {
163 return self::$openAPIModelName;
164 }
165
166
167
168
169
170 /**
171 * Associative array for storing property values
172 *
173 * @var mixed[]
174 */
175 protected $container = [];
176
177 /**
178 * Constructor
179 *
180 * @param mixed[] $data Associated array of property values
181 * initializing the model
182 */
183 public function __construct(array $data = null)
184 {
185 $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
186 $this->container['refund_reason'] = isset($data['refund_reason']) ? $data['refund_reason'] : null;
187 }
188
189 /**
190 * Show all the invalid properties with reasons.
191 *
192 * @return array invalid properties with reasons
193 */
194 public function listInvalidProperties()
195 {
196 $invalidProperties = [];
197
198 return $invalidProperties;
199 }
200
201 /**
202 * Validate all the properties in the model
203 * return true if all passed
204 *
205 * @return bool True if all properties are valid
206 */
207 public function valid()
208 {
209 return count($this->listInvalidProperties()) === 0;
210 }
211
212
213 /**
214 * Gets amount
215 *
216 * @return int|null
217 */
218 public function getAmount()
219 {
220 return $this->container['amount'];
221 }
222
223 /**
224 * Sets amount
225 *
226 * @param int|null $amount The amount to refund, which must be less than or equal to the original amount.
227 *
228 * @return $this
229 */
230 public function setAmount($amount)
231 {
232 $this->container['amount'] = $amount;
233
234 return $this;
235 }
236
237 /**
238 * Gets refund_reason
239 *
240 * @return \OpenAPI\Client\Model\PaymentRefundReason|null
241 */
242 public function getRefundReason()
243 {
244 return $this->container['refund_reason'];
245 }
246
247 /**
248 * Sets refund_reason
249 *
250 * @param \OpenAPI\Client\Model\PaymentRefundReason|null $refund_reason refund_reason
251 *
252 * @return $this
253 */
254 public function setRefundReason($refund_reason)
255 {
256 $this->container['refund_reason'] = $refund_reason;
257
258 return $this;
259 }
260 /**
261 * Returns true if offset exists. False otherwise.
262 *
263 * @param integer $offset Offset
264 *
265 * @return boolean
266 */
267 public function offsetExists($offset)
268 {
269 return isset($this->container[$offset]);
270 }
271
272 /**
273 * Gets offset.
274 *
275 * @param integer $offset Offset
276 *
277 * @return mixed
278 */
279 public function offsetGet($offset)
280 {
281 return isset($this->container[$offset]) ? $this->container[$offset] : null;
282 }
283
284 /**
285 * Sets value based on offset.
286 *
287 * @param integer $offset Offset
288 * @param mixed $value Value to be set
289 *
290 * @return void
291 */
292 public function offsetSet($offset, $value)
293 {
294 if (is_null($offset)) {
295 $this->container[] = $value;
296 } else {
297 $this->container[$offset] = $value;
298 }
299 }
300
301 /**
302 * Unsets offset.
303 *
304 * @param integer $offset Offset
305 *
306 * @return void
307 */
308 public function offsetUnset($offset)
309 {
310 unset($this->container[$offset]);
311 }
312
313 /**
314 * Gets the string presentation of the object
315 *
316 * @return string
317 */
318 public function __toString()
319 {
320 return json_encode(
321 ObjectSerializer::sanitizeForSerialization($this),
322 JSON_PRETTY_PRINT
323 );
324 }
325
326 /**
327 * Gets a header-safe presentation of the object
328 *
329 * @return string
330 */
331 public function toHeaderValue()
332 {
333 return json_encode(ObjectSerializer::sanitizeForSerialization($this));
334 }
335 }
336
337
338