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

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

339 lines 7.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * PaymentShop
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 * PaymentShop Class Doc Comment
37 *
38 * @category Class
39 * @description The information about the shop (used in [hosted payment page](https://docs.monei.net/docs/use-prebuilt-payment-page)).
40 * @package OpenAPI\Client
41 * @author OpenAPI Generator team
42 * @link https://openapi-generator.tech
43 */
44 class PaymentShop implements ModelInterface, ArrayAccess
45 {
46 const DISCRIMINATOR = null;
47
48 /**
49 * The original name of the model.
50 *
51 * @var string
52 */
53 protected static $openAPIModelName = 'Payment-Shop';
54
55 /**
56 * Array of property to type mappings. Used for (de)serialization
57 *
58 * @var string[]
59 */
60 protected static $openAPITypes = [
61 'name' => 'string',
62 'country' => '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 'name' => null,
72 'country' => null
73 ];
74
75 /**
76 * Array of property to type mappings. Used for (de)serialization
77 *
78 * @return array
79 */
80 public static function openAPITypes()
81 {
82 return self::$openAPITypes;
83 }
84
85 /**
86 * Array of property to format mappings. Used for (de)serialization
87 *
88 * @return array
89 */
90 public static function openAPIFormats()
91 {
92 return self::$openAPIFormats;
93 }
94
95 /**
96 * Array of attributes where the key is the local name,
97 * and the value is the original name
98 *
99 * @var string[]
100 */
101 protected static $attributeMap = [
102 'name' => 'name',
103 'country' => 'country'
104 ];
105
106 /**
107 * Array of attributes to setter functions (for deserialization of responses)
108 *
109 * @var string[]
110 */
111 protected static $setters = [
112 'name' => 'setName',
113 'country' => 'setCountry'
114 ];
115
116 /**
117 * Array of attributes to getter functions (for serialization of requests)
118 *
119 * @var string[]
120 */
121 protected static $getters = [
122 'name' => 'getName',
123 'country' => 'getCountry'
124 ];
125
126 /**
127 * Array of attributes where the key is the local name,
128 * and the value is the original name
129 *
130 * @return array
131 */
132 public static function attributeMap()
133 {
134 return self::$attributeMap;
135 }
136
137 /**
138 * Array of attributes to setter functions (for deserialization of responses)
139 *
140 * @return array
141 */
142 public static function setters()
143 {
144 return self::$setters;
145 }
146
147 /**
148 * Array of attributes to getter functions (for serialization of requests)
149 *
150 * @return array
151 */
152 public static function getters()
153 {
154 return self::$getters;
155 }
156
157 /**
158 * The original name of the model.
159 *
160 * @return string
161 */
162 public function getModelName()
163 {
164 return self::$openAPIModelName;
165 }
166
167
168
169
170
171 /**
172 * Associative array for storing property values
173 *
174 * @var mixed[]
175 */
176 protected $container = [];
177
178 /**
179 * Constructor
180 *
181 * @param mixed[] $data Associated array of property values
182 * initializing the model
183 */
184 public function __construct(array $data = null)
185 {
186 $this->container['name'] = isset($data['name']) ? $data['name'] : null;
187 $this->container['country'] = isset($data['country']) ? $data['country'] : null;
188 }
189
190 /**
191 * Show all the invalid properties with reasons.
192 *
193 * @return array invalid properties with reasons
194 */
195 public function listInvalidProperties()
196 {
197 $invalidProperties = [];
198
199 return $invalidProperties;
200 }
201
202 /**
203 * Validate all the properties in the model
204 * return true if all passed
205 *
206 * @return bool True if all properties are valid
207 */
208 public function valid()
209 {
210 return count($this->listInvalidProperties()) === 0;
211 }
212
213
214 /**
215 * Gets name
216 *
217 * @return string|null
218 */
219 public function getName()
220 {
221 return $this->container['name'];
222 }
223
224 /**
225 * Sets name
226 *
227 * @param string|null $name The shop name.
228 *
229 * @return $this
230 */
231 public function setName($name)
232 {
233 $this->container['name'] = $name;
234
235 return $this;
236 }
237
238 /**
239 * Gets country
240 *
241 * @return string|null
242 */
243 public function getCountry()
244 {
245 return $this->container['country'];
246 }
247
248 /**
249 * Sets country
250 *
251 * @param string|null $country Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)).
252 *
253 * @return $this
254 */
255 public function setCountry($country)
256 {
257 $this->container['country'] = $country;
258
259 return $this;
260 }
261 /**
262 * Returns true if offset exists. False otherwise.
263 *
264 * @param integer $offset Offset
265 *
266 * @return boolean
267 */
268 public function offsetExists($offset)
269 {
270 return isset($this->container[$offset]);
271 }
272
273 /**
274 * Gets offset.
275 *
276 * @param integer $offset Offset
277 *
278 * @return mixed
279 */
280 public function offsetGet($offset)
281 {
282 return isset($this->container[$offset]) ? $this->container[$offset] : null;
283 }
284
285 /**
286 * Sets value based on offset.
287 *
288 * @param integer $offset Offset
289 * @param mixed $value Value to be set
290 *
291 * @return void
292 */
293 public function offsetSet($offset, $value)
294 {
295 if (is_null($offset)) {
296 $this->container[] = $value;
297 } else {
298 $this->container[$offset] = $value;
299 }
300 }
301
302 /**
303 * Unsets offset.
304 *
305 * @param integer $offset Offset
306 *
307 * @return void
308 */
309 public function offsetUnset($offset)
310 {
311 unset($this->container[$offset]);
312 }
313
314 /**
315 * Gets the string presentation of the object
316 *
317 * @return string
318 */
319 public function __toString()
320 {
321 return json_encode(
322 ObjectSerializer::sanitizeForSerialization($this),
323 JSON_PRETTY_PRINT
324 );
325 }
326
327 /**
328 * Gets a header-safe presentation of the object
329 *
330 * @return string
331 */
332 public function toHeaderValue()
333 {
334 return json_encode(ObjectSerializer::sanitizeForSerialization($this));
335 }
336 }
337
338
339