PluginProbe
MONEI Payments for WooCommerce / 4.0.0
MONEI Payments for WooCommerce v4.0.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 / CapturePaymentRequest.php

CapturePaymentRequest.php in MONEI Payments for WooCommerce 4.0.0, at includes/lib/Model/CapturePaymentRequest.php

308 lines 6.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * CapturePaymentRequest
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 * CapturePaymentRequest 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 CapturePaymentRequest 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 = 'CapturePaymentRequest';
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 ];
62
63 /**
64 * Array of property to format mappings. Used for (de)serialization
65 *
66 * @var string[]
67 */
68 protected static $openAPIFormats = [
69 'amount' => null
70 ];
71
72 /**
73 * Array of property to type mappings. Used for (de)serialization
74 *
75 * @return array
76 */
77 public static function openAPITypes()
78 {
79 return self::$openAPITypes;
80 }
81
82 /**
83 * Array of property to format mappings. Used for (de)serialization
84 *
85 * @return array
86 */
87 public static function openAPIFormats()
88 {
89 return self::$openAPIFormats;
90 }
91
92 /**
93 * Array of attributes where the key is the local name,
94 * and the value is the original name
95 *
96 * @var string[]
97 */
98 protected static $attributeMap = [
99 'amount' => 'amount'
100 ];
101
102 /**
103 * Array of attributes to setter functions (for deserialization of responses)
104 *
105 * @var string[]
106 */
107 protected static $setters = [
108 'amount' => 'setAmount'
109 ];
110
111 /**
112 * Array of attributes to getter functions (for serialization of requests)
113 *
114 * @var string[]
115 */
116 protected static $getters = [
117 'amount' => 'getAmount'
118 ];
119
120 /**
121 * Array of attributes where the key is the local name,
122 * and the value is the original name
123 *
124 * @return array
125 */
126 public static function attributeMap()
127 {
128 return self::$attributeMap;
129 }
130
131 /**
132 * Array of attributes to setter functions (for deserialization of responses)
133 *
134 * @return array
135 */
136 public static function setters()
137 {
138 return self::$setters;
139 }
140
141 /**
142 * Array of attributes to getter functions (for serialization of requests)
143 *
144 * @return array
145 */
146 public static function getters()
147 {
148 return self::$getters;
149 }
150
151 /**
152 * The original name of the model.
153 *
154 * @return string
155 */
156 public function getModelName()
157 {
158 return self::$openAPIModelName;
159 }
160
161
162
163
164
165 /**
166 * Associative array for storing property values
167 *
168 * @var mixed[]
169 */
170 protected $container = [];
171
172 /**
173 * Constructor
174 *
175 * @param mixed[] $data Associated array of property values
176 * initializing the model
177 */
178 public function __construct(array $data = null)
179 {
180 $this->container['amount'] = isset($data['amount']) ? $data['amount'] : null;
181 }
182
183 /**
184 * Show all the invalid properties with reasons.
185 *
186 * @return array invalid properties with reasons
187 */
188 public function listInvalidProperties()
189 {
190 $invalidProperties = [];
191
192 return $invalidProperties;
193 }
194
195 /**
196 * Validate all the properties in the model
197 * return true if all passed
198 *
199 * @return bool True if all properties are valid
200 */
201 public function valid()
202 {
203 return count($this->listInvalidProperties()) === 0;
204 }
205
206
207 /**
208 * Gets amount
209 *
210 * @return int|null
211 */
212 public function getAmount()
213 {
214 return $this->container['amount'];
215 }
216
217 /**
218 * Sets amount
219 *
220 * @param int|null $amount The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded.
221 *
222 * @return $this
223 */
224 public function setAmount($amount)
225 {
226 $this->container['amount'] = $amount;
227
228 return $this;
229 }
230 /**
231 * Returns true if offset exists. False otherwise.
232 *
233 * @param integer $offset Offset
234 *
235 * @return boolean
236 */
237 public function offsetExists($offset)
238 {
239 return isset($this->container[$offset]);
240 }
241
242 /**
243 * Gets offset.
244 *
245 * @param integer $offset Offset
246 *
247 * @return mixed
248 */
249 public function offsetGet($offset)
250 {
251 return isset($this->container[$offset]) ? $this->container[$offset] : null;
252 }
253
254 /**
255 * Sets value based on offset.
256 *
257 * @param integer $offset Offset
258 * @param mixed $value Value to be set
259 *
260 * @return void
261 */
262 public function offsetSet($offset, $value)
263 {
264 if (is_null($offset)) {
265 $this->container[] = $value;
266 } else {
267 $this->container[$offset] = $value;
268 }
269 }
270
271 /**
272 * Unsets offset.
273 *
274 * @param integer $offset Offset
275 *
276 * @return void
277 */
278 public function offsetUnset($offset)
279 {
280 unset($this->container[$offset]);
281 }
282
283 /**
284 * Gets the string presentation of the object
285 *
286 * @return string
287 */
288 public function __toString()
289 {
290 return json_encode(
291 ObjectSerializer::sanitizeForSerialization($this),
292 JSON_PRETTY_PRINT
293 );
294 }
295
296 /**
297 * Gets a header-safe presentation of the object
298 *
299 * @return string
300 */
301 public function toHeaderValue()
302 {
303 return json_encode(ObjectSerializer::sanitizeForSerialization($this));
304 }
305 }
306
307
308