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 / PaymentCustomer.php

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

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