PluginProbe
MONEI Payments for WooCommerce / 4.1.0
MONEI Payments for WooCommerce v4.1.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 / Card.php

Card.php in MONEI Payments for WooCommerce 4.1.0, at includes/lib/Model/Card.php

398 lines 8.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Card
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 * Card 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 Card 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 = 'Card';
53
54 /**
55 * Array of property to type mappings. Used for (de)serialization
56 *
57 * @var string[]
58 */
59 protected static $openAPITypes = [
60 'number' => 'string',
61 'cvc' => 'string',
62 'exp_month' => 'string',
63 'exp_year' => 'string'
64 ];
65
66 /**
67 * Array of property to format mappings. Used for (de)serialization
68 *
69 * @var string[]
70 */
71 protected static $openAPIFormats = [
72 'number' => null,
73 'cvc' => null,
74 'exp_month' => null,
75 'exp_year' => null
76 ];
77
78 /**
79 * Array of property to type mappings. Used for (de)serialization
80 *
81 * @return array
82 */
83 public static function openAPITypes()
84 {
85 return self::$openAPITypes;
86 }
87
88 /**
89 * Array of property to format mappings. Used for (de)serialization
90 *
91 * @return array
92 */
93 public static function openAPIFormats()
94 {
95 return self::$openAPIFormats;
96 }
97
98 /**
99 * Array of attributes where the key is the local name,
100 * and the value is the original name
101 *
102 * @var string[]
103 */
104 protected static $attributeMap = [
105 'number' => 'number',
106 'cvc' => 'cvc',
107 'exp_month' => 'expMonth',
108 'exp_year' => 'expYear'
109 ];
110
111 /**
112 * Array of attributes to setter functions (for deserialization of responses)
113 *
114 * @var string[]
115 */
116 protected static $setters = [
117 'number' => 'setNumber',
118 'cvc' => 'setCvc',
119 'exp_month' => 'setExpMonth',
120 'exp_year' => 'setExpYear'
121 ];
122
123 /**
124 * Array of attributes to getter functions (for serialization of requests)
125 *
126 * @var string[]
127 */
128 protected static $getters = [
129 'number' => 'getNumber',
130 'cvc' => 'getCvc',
131 'exp_month' => 'getExpMonth',
132 'exp_year' => 'getExpYear'
133 ];
134
135 /**
136 * Array of attributes where the key is the local name,
137 * and the value is the original name
138 *
139 * @return array
140 */
141 public static function attributeMap()
142 {
143 return self::$attributeMap;
144 }
145
146 /**
147 * Array of attributes to setter functions (for deserialization of responses)
148 *
149 * @return array
150 */
151 public static function setters()
152 {
153 return self::$setters;
154 }
155
156 /**
157 * Array of attributes to getter functions (for serialization of requests)
158 *
159 * @return array
160 */
161 public static function getters()
162 {
163 return self::$getters;
164 }
165
166 /**
167 * The original name of the model.
168 *
169 * @return string
170 */
171 public function getModelName()
172 {
173 return self::$openAPIModelName;
174 }
175
176
177
178
179
180 /**
181 * Associative array for storing property values
182 *
183 * @var mixed[]
184 */
185 protected $container = [];
186
187 /**
188 * Constructor
189 *
190 * @param mixed[] $data Associated array of property values
191 * initializing the model
192 */
193 public function __construct(array $data = null)
194 {
195 $this->container['number'] = isset($data['number']) ? $data['number'] : null;
196 $this->container['cvc'] = isset($data['cvc']) ? $data['cvc'] : null;
197 $this->container['exp_month'] = isset($data['exp_month']) ? $data['exp_month'] : null;
198 $this->container['exp_year'] = isset($data['exp_year']) ? $data['exp_year'] : null;
199 }
200
201 /**
202 * Show all the invalid properties with reasons.
203 *
204 * @return array invalid properties with reasons
205 */
206 public function listInvalidProperties()
207 {
208 $invalidProperties = [];
209
210 return $invalidProperties;
211 }
212
213 /**
214 * Validate all the properties in the model
215 * return true if all passed
216 *
217 * @return bool True if all properties are valid
218 */
219 public function valid()
220 {
221 return count($this->listInvalidProperties()) === 0;
222 }
223
224
225 /**
226 * Gets number
227 *
228 * @return string|null
229 */
230 public function getNumber()
231 {
232 return $this->container['number'];
233 }
234
235 /**
236 * Sets number
237 *
238 * @param string|null $number The card number, as a string without any separators.
239 *
240 * @return $this
241 */
242 public function setNumber($number)
243 {
244 $this->container['number'] = $number;
245
246 return $this;
247 }
248
249 /**
250 * Gets cvc
251 *
252 * @return string|null
253 */
254 public function getCvc()
255 {
256 return $this->container['cvc'];
257 }
258
259 /**
260 * Sets cvc
261 *
262 * @param string|null $cvc Card security code.
263 *
264 * @return $this
265 */
266 public function setCvc($cvc)
267 {
268 $this->container['cvc'] = $cvc;
269
270 return $this;
271 }
272
273 /**
274 * Gets exp_month
275 *
276 * @return string|null
277 */
278 public function getExpMonth()
279 {
280 return $this->container['exp_month'];
281 }
282
283 /**
284 * Sets exp_month
285 *
286 * @param string|null $exp_month Two-digit number representing the card’s expiration month.
287 *
288 * @return $this
289 */
290 public function setExpMonth($exp_month)
291 {
292 $this->container['exp_month'] = $exp_month;
293
294 return $this;
295 }
296
297 /**
298 * Gets exp_year
299 *
300 * @return string|null
301 */
302 public function getExpYear()
303 {
304 return $this->container['exp_year'];
305 }
306
307 /**
308 * Sets exp_year
309 *
310 * @param string|null $exp_year Two-digit number representing the card’s expiration year.
311 *
312 * @return $this
313 */
314 public function setExpYear($exp_year)
315 {
316 $this->container['exp_year'] = $exp_year;
317
318 return $this;
319 }
320 /**
321 * Returns true if offset exists. False otherwise.
322 *
323 * @param integer $offset Offset
324 *
325 * @return boolean
326 */
327 public function offsetExists($offset)
328 {
329 return isset($this->container[$offset]);
330 }
331
332 /**
333 * Gets offset.
334 *
335 * @param integer $offset Offset
336 *
337 * @return mixed
338 */
339 public function offsetGet($offset)
340 {
341 return isset($this->container[$offset]) ? $this->container[$offset] : null;
342 }
343
344 /**
345 * Sets value based on offset.
346 *
347 * @param integer $offset Offset
348 * @param mixed $value Value to be set
349 *
350 * @return void
351 */
352 public function offsetSet($offset, $value)
353 {
354 if (is_null($offset)) {
355 $this->container[] = $value;
356 } else {
357 $this->container[$offset] = $value;
358 }
359 }
360
361 /**
362 * Unsets offset.
363 *
364 * @param integer $offset Offset
365 *
366 * @return void
367 */
368 public function offsetUnset($offset)
369 {
370 unset($this->container[$offset]);
371 }
372
373 /**
374 * Gets the string presentation of the object
375 *
376 * @return string
377 */
378 public function __toString()
379 {
380 return json_encode(
381 ObjectSerializer::sanitizeForSerialization($this),
382 JSON_PRETTY_PRINT
383 );
384 }
385
386 /**
387 * Gets a header-safe presentation of the object
388 *
389 * @return string
390 */
391 public function toHeaderValue()
392 {
393 return json_encode(ObjectSerializer::sanitizeForSerialization($this));
394 }
395 }
396
397
398