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

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

458 lines 9.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Address
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 * Address 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 Address 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 = 'Address';
53
54 /**
55 * Array of property to type mappings. Used for (de)serialization
56 *
57 * @var string[]
58 */
59 protected static $openAPITypes = [
60 'country' => 'string',
61 'city' => 'string',
62 'line1' => 'string',
63 'line2' => 'string',
64 'zip' => 'string',
65 'state' => 'string'
66 ];
67
68 /**
69 * Array of property to format mappings. Used for (de)serialization
70 *
71 * @var string[]
72 */
73 protected static $openAPIFormats = [
74 'country' => null,
75 'city' => null,
76 'line1' => null,
77 'line2' => null,
78 'zip' => null,
79 'state' => null
80 ];
81
82 /**
83 * Array of property to type mappings. Used for (de)serialization
84 *
85 * @return array
86 */
87 public static function openAPITypes()
88 {
89 return self::$openAPITypes;
90 }
91
92 /**
93 * Array of property to format mappings. Used for (de)serialization
94 *
95 * @return array
96 */
97 public static function openAPIFormats()
98 {
99 return self::$openAPIFormats;
100 }
101
102 /**
103 * Array of attributes where the key is the local name,
104 * and the value is the original name
105 *
106 * @var string[]
107 */
108 protected static $attributeMap = [
109 'country' => 'country',
110 'city' => 'city',
111 'line1' => 'line1',
112 'line2' => 'line2',
113 'zip' => 'zip',
114 'state' => 'state'
115 ];
116
117 /**
118 * Array of attributes to setter functions (for deserialization of responses)
119 *
120 * @var string[]
121 */
122 protected static $setters = [
123 'country' => 'setCountry',
124 'city' => 'setCity',
125 'line1' => 'setLine1',
126 'line2' => 'setLine2',
127 'zip' => 'setZip',
128 'state' => 'setState'
129 ];
130
131 /**
132 * Array of attributes to getter functions (for serialization of requests)
133 *
134 * @var string[]
135 */
136 protected static $getters = [
137 'country' => 'getCountry',
138 'city' => 'getCity',
139 'line1' => 'getLine1',
140 'line2' => 'getLine2',
141 'zip' => 'getZip',
142 'state' => 'getState'
143 ];
144
145 /**
146 * Array of attributes where the key is the local name,
147 * and the value is the original name
148 *
149 * @return array
150 */
151 public static function attributeMap()
152 {
153 return self::$attributeMap;
154 }
155
156 /**
157 * Array of attributes to setter functions (for deserialization of responses)
158 *
159 * @return array
160 */
161 public static function setters()
162 {
163 return self::$setters;
164 }
165
166 /**
167 * Array of attributes to getter functions (for serialization of requests)
168 *
169 * @return array
170 */
171 public static function getters()
172 {
173 return self::$getters;
174 }
175
176 /**
177 * The original name of the model.
178 *
179 * @return string
180 */
181 public function getModelName()
182 {
183 return self::$openAPIModelName;
184 }
185
186
187
188
189
190 /**
191 * Associative array for storing property values
192 *
193 * @var mixed[]
194 */
195 protected $container = [];
196
197 /**
198 * Constructor
199 *
200 * @param mixed[] $data Associated array of property values
201 * initializing the model
202 */
203 public function __construct(array $data = null)
204 {
205 $this->container['country'] = isset($data['country']) ? $data['country'] : null;
206 $this->container['city'] = isset($data['city']) ? $data['city'] : null;
207 $this->container['line1'] = isset($data['line1']) ? $data['line1'] : null;
208 $this->container['line2'] = isset($data['line2']) ? $data['line2'] : null;
209 $this->container['zip'] = isset($data['zip']) ? $data['zip'] : null;
210 $this->container['state'] = isset($data['state']) ? $data['state'] : null;
211 }
212
213 /**
214 * Show all the invalid properties with reasons.
215 *
216 * @return array invalid properties with reasons
217 */
218 public function listInvalidProperties()
219 {
220 $invalidProperties = [];
221
222 return $invalidProperties;
223 }
224
225 /**
226 * Validate all the properties in the model
227 * return true if all passed
228 *
229 * @return bool True if all properties are valid
230 */
231 public function valid()
232 {
233 return count($this->listInvalidProperties()) === 0;
234 }
235
236
237 /**
238 * Gets country
239 *
240 * @return string|null
241 */
242 public function getCountry()
243 {
244 return $this->container['country'];
245 }
246
247 /**
248 * Sets country
249 *
250 * @param string|null $country Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
251 *
252 * @return $this
253 */
254 public function setCountry($country)
255 {
256 $this->container['country'] = $country;
257
258 return $this;
259 }
260
261 /**
262 * Gets city
263 *
264 * @return string|null
265 */
266 public function getCity()
267 {
268 return $this->container['city'];
269 }
270
271 /**
272 * Sets city
273 *
274 * @param string|null $city City, district, suburb, town, or village.
275 *
276 * @return $this
277 */
278 public function setCity($city)
279 {
280 $this->container['city'] = $city;
281
282 return $this;
283 }
284
285 /**
286 * Gets line1
287 *
288 * @return string|null
289 */
290 public function getLine1()
291 {
292 return $this->container['line1'];
293 }
294
295 /**
296 * Sets line1
297 *
298 * @param string|null $line1 Address line 1 (e.g., street, PO Box, or company name).
299 *
300 * @return $this
301 */
302 public function setLine1($line1)
303 {
304 $this->container['line1'] = $line1;
305
306 return $this;
307 }
308
309 /**
310 * Gets line2
311 *
312 * @return string|null
313 */
314 public function getLine2()
315 {
316 return $this->container['line2'];
317 }
318
319 /**
320 * Sets line2
321 *
322 * @param string|null $line2 Address line 2 (e.g., apartment, suite, unit, or building).
323 *
324 * @return $this
325 */
326 public function setLine2($line2)
327 {
328 $this->container['line2'] = $line2;
329
330 return $this;
331 }
332
333 /**
334 * Gets zip
335 *
336 * @return string|null
337 */
338 public function getZip()
339 {
340 return $this->container['zip'];
341 }
342
343 /**
344 * Sets zip
345 *
346 * @param string|null $zip ZIP or postal code.
347 *
348 * @return $this
349 */
350 public function setZip($zip)
351 {
352 $this->container['zip'] = $zip;
353
354 return $this;
355 }
356
357 /**
358 * Gets state
359 *
360 * @return string|null
361 */
362 public function getState()
363 {
364 return $this->container['state'];
365 }
366
367 /**
368 * Sets state
369 *
370 * @param string|null $state State, county, province, or region.
371 *
372 * @return $this
373 */
374 public function setState($state)
375 {
376 $this->container['state'] = $state;
377
378 return $this;
379 }
380 /**
381 * Returns true if offset exists. False otherwise.
382 *
383 * @param integer $offset Offset
384 *
385 * @return boolean
386 */
387 public function offsetExists($offset)
388 {
389 return isset($this->container[$offset]);
390 }
391
392 /**
393 * Gets offset.
394 *
395 * @param integer $offset Offset
396 *
397 * @return mixed
398 */
399 public function offsetGet($offset)
400 {
401 return isset($this->container[$offset]) ? $this->container[$offset] : null;
402 }
403
404 /**
405 * Sets value based on offset.
406 *
407 * @param integer $offset Offset
408 * @param mixed $value Value to be set
409 *
410 * @return void
411 */
412 public function offsetSet($offset, $value)
413 {
414 if (is_null($offset)) {
415 $this->container[] = $value;
416 } else {
417 $this->container[$offset] = $value;
418 }
419 }
420
421 /**
422 * Unsets offset.
423 *
424 * @param integer $offset Offset
425 *
426 * @return void
427 */
428 public function offsetUnset($offset)
429 {
430 unset($this->container[$offset]);
431 }
432
433 /**
434 * Gets the string presentation of the object
435 *
436 * @return string
437 */
438 public function __toString()
439 {
440 return json_encode(
441 ObjectSerializer::sanitizeForSerialization($this),
442 JSON_PRETTY_PRINT
443 );
444 }
445
446 /**
447 * Gets a header-safe presentation of the object
448 *
449 * @return string
450 */
451 public function toHeaderValue()
452 {
453 return json_encode(ObjectSerializer::sanitizeForSerialization($this));
454 }
455 }
456
457
458