1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace net\authorize\api\contract\v1; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class representing GetMerchantDetailsResponse |
7
|
|
|
*/ |
8
|
|
|
class GetMerchantDetailsResponse extends ANetApiResponseType |
9
|
|
|
{ |
10
|
|
|
|
11
|
|
|
/** |
12
|
|
|
* @property boolean $isTestMode |
13
|
|
|
*/ |
14
|
|
|
private $isTestMode = null; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* @property \net\authorize\api\contract\v1\ProcessorType[] $processors |
18
|
|
|
*/ |
19
|
|
|
private $processors = null; |
20
|
|
|
|
21
|
|
|
/** |
22
|
|
|
* @property string $merchantName |
23
|
|
|
*/ |
24
|
|
|
private $merchantName = null; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @property string $gatewayId |
28
|
|
|
*/ |
29
|
|
|
private $gatewayId = null; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @property string[] $marketTypes |
33
|
|
|
*/ |
34
|
|
|
private $marketTypes = null; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @property string[] $productCodes |
38
|
|
|
*/ |
39
|
|
|
private $productCodes = null; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @property string[] $paymentMethods |
43
|
|
|
*/ |
44
|
|
|
private $paymentMethods = null; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @property string[] $currencies |
48
|
|
|
*/ |
49
|
|
|
private $currencies = null; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @property string $publicClientKey |
53
|
|
|
*/ |
54
|
|
|
private $publicClientKey = null; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* Gets as isTestMode |
58
|
|
|
* |
59
|
|
|
* @return boolean |
60
|
|
|
*/ |
61
|
|
|
public function getIsTestMode() |
62
|
|
|
{ |
63
|
|
|
return $this->isTestMode; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Sets a new isTestMode |
68
|
|
|
* |
69
|
|
|
* @param boolean $isTestMode |
70
|
|
|
* @return self |
71
|
|
|
*/ |
72
|
|
|
public function setIsTestMode($isTestMode) |
73
|
|
|
{ |
74
|
|
|
$this->isTestMode = $isTestMode; |
75
|
|
|
return $this; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Adds as processor |
80
|
|
|
* |
81
|
|
|
* @return self |
82
|
|
|
* @param \net\authorize\api\contract\v1\ProcessorType $processor |
83
|
|
|
*/ |
84
|
|
|
public function addToProcessors(\net\authorize\api\contract\v1\ProcessorType $processor) |
85
|
|
|
{ |
86
|
|
|
$this->processors[] = $processor; |
87
|
|
|
return $this; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* isset processors |
92
|
|
|
* |
93
|
|
|
* @param scalar $index |
94
|
|
|
* @return boolean |
95
|
|
|
*/ |
96
|
|
|
public function issetProcessors($index) |
97
|
|
|
{ |
98
|
|
|
return isset($this->processors[$index]); |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
/** |
102
|
|
|
* unset processors |
103
|
|
|
* |
104
|
|
|
* @param scalar $index |
105
|
|
|
* @return void |
106
|
|
|
*/ |
107
|
|
|
public function unsetProcessors($index) |
108
|
|
|
{ |
109
|
|
|
unset($this->processors[$index]); |
110
|
|
|
} |
111
|
|
|
|
112
|
|
|
/** |
113
|
|
|
* Gets as processors |
114
|
|
|
* |
115
|
|
|
* @return \net\authorize\api\contract\v1\ProcessorType[] |
116
|
|
|
*/ |
117
|
|
|
public function getProcessors() |
118
|
|
|
{ |
119
|
|
|
return $this->processors; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* Sets a new processors |
124
|
|
|
* |
125
|
|
|
* @param \net\authorize\api\contract\v1\ProcessorType[] $processors |
126
|
|
|
* @return self |
127
|
|
|
*/ |
128
|
|
|
public function setProcessors(array $processors) |
129
|
|
|
{ |
130
|
|
|
$this->processors = $processors; |
131
|
|
|
return $this; |
132
|
|
|
} |
133
|
|
|
|
134
|
|
|
/** |
135
|
|
|
* Gets as merchantName |
136
|
|
|
* |
137
|
|
|
* @return string |
138
|
|
|
*/ |
139
|
|
|
public function getMerchantName() |
140
|
|
|
{ |
141
|
|
|
return $this->merchantName; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
/** |
145
|
|
|
* Sets a new merchantName |
146
|
|
|
* |
147
|
|
|
* @param string $merchantName |
148
|
|
|
* @return self |
149
|
|
|
*/ |
150
|
|
|
public function setMerchantName($merchantName) |
151
|
|
|
{ |
152
|
|
|
$this->merchantName = $merchantName; |
153
|
|
|
return $this; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* Gets as gatewayId |
158
|
|
|
* |
159
|
|
|
* @return string |
160
|
|
|
*/ |
161
|
|
|
public function getGatewayId() |
162
|
|
|
{ |
163
|
|
|
return $this->gatewayId; |
164
|
|
|
} |
165
|
|
|
|
166
|
|
|
/** |
167
|
|
|
* Sets a new gatewayId |
168
|
|
|
* |
169
|
|
|
* @param string $gatewayId |
170
|
|
|
* @return self |
171
|
|
|
*/ |
172
|
|
|
public function setGatewayId($gatewayId) |
173
|
|
|
{ |
174
|
|
|
$this->gatewayId = $gatewayId; |
175
|
|
|
return $this; |
176
|
|
|
} |
177
|
|
|
|
178
|
|
|
/** |
179
|
|
|
* Adds as marketType |
180
|
|
|
* |
181
|
|
|
* @return self |
182
|
|
|
* @param string $marketType |
183
|
|
|
*/ |
184
|
|
|
public function addToMarketTypes($marketType) |
185
|
|
|
{ |
186
|
|
|
$this->marketTypes[] = $marketType; |
187
|
|
|
return $this; |
188
|
|
|
} |
189
|
|
|
|
190
|
|
|
/** |
191
|
|
|
* isset marketTypes |
192
|
|
|
* |
193
|
|
|
* @param scalar $index |
194
|
|
|
* @return boolean |
195
|
|
|
*/ |
196
|
|
|
public function issetMarketTypes($index) |
197
|
|
|
{ |
198
|
|
|
return isset($this->marketTypes[$index]); |
199
|
|
|
} |
200
|
|
|
|
201
|
|
|
/** |
202
|
|
|
* unset marketTypes |
203
|
|
|
* |
204
|
|
|
* @param scalar $index |
205
|
|
|
* @return void |
206
|
|
|
*/ |
207
|
|
|
public function unsetMarketTypes($index) |
208
|
|
|
{ |
209
|
|
|
unset($this->marketTypes[$index]); |
210
|
|
|
} |
211
|
|
|
|
212
|
|
|
/** |
213
|
|
|
* Gets as marketTypes |
214
|
|
|
* |
215
|
|
|
* @return string[] |
216
|
|
|
*/ |
217
|
|
|
public function getMarketTypes() |
218
|
|
|
{ |
219
|
|
|
return $this->marketTypes; |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
/** |
223
|
|
|
* Sets a new marketTypes |
224
|
|
|
* |
225
|
|
|
* @param string $marketTypes |
226
|
|
|
* @return self |
227
|
|
|
*/ |
228
|
|
|
public function setMarketTypes(array $marketTypes) |
229
|
|
|
{ |
230
|
|
|
$this->marketTypes = $marketTypes; |
231
|
|
|
return $this; |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
/** |
235
|
|
|
* Adds as productCode |
236
|
|
|
* |
237
|
|
|
* @return self |
238
|
|
|
* @param string $productCode |
239
|
|
|
*/ |
240
|
|
|
public function addToProductCodes($productCode) |
241
|
|
|
{ |
242
|
|
|
$this->productCodes[] = $productCode; |
243
|
|
|
return $this; |
244
|
|
|
} |
245
|
|
|
|
246
|
|
|
/** |
247
|
|
|
* isset productCodes |
248
|
|
|
* |
249
|
|
|
* @param scalar $index |
250
|
|
|
* @return boolean |
251
|
|
|
*/ |
252
|
|
|
public function issetProductCodes($index) |
253
|
|
|
{ |
254
|
|
|
return isset($this->productCodes[$index]); |
255
|
|
|
} |
256
|
|
|
|
257
|
|
|
/** |
258
|
|
|
* unset productCodes |
259
|
|
|
* |
260
|
|
|
* @param scalar $index |
261
|
|
|
* @return void |
262
|
|
|
*/ |
263
|
|
|
public function unsetProductCodes($index) |
264
|
|
|
{ |
265
|
|
|
unset($this->productCodes[$index]); |
266
|
|
|
} |
267
|
|
|
|
268
|
|
|
/** |
269
|
|
|
* Gets as productCodes |
270
|
|
|
* |
271
|
|
|
* @return string[] |
272
|
|
|
*/ |
273
|
|
|
public function getProductCodes() |
274
|
|
|
{ |
275
|
|
|
return $this->productCodes; |
276
|
|
|
} |
277
|
|
|
|
278
|
|
|
/** |
279
|
|
|
* Sets a new productCodes |
280
|
|
|
* |
281
|
|
|
* @param string $productCodes |
282
|
|
|
* @return self |
283
|
|
|
*/ |
284
|
|
|
public function setProductCodes(array $productCodes) |
285
|
|
|
{ |
286
|
|
|
$this->productCodes = $productCodes; |
287
|
|
|
return $this; |
288
|
|
|
} |
289
|
|
|
|
290
|
|
|
/** |
291
|
|
|
* Adds as paymentMethod |
292
|
|
|
* |
293
|
|
|
* @return self |
294
|
|
|
* @param string $paymentMethod |
295
|
|
|
*/ |
296
|
|
|
public function addToPaymentMethods($paymentMethod) |
297
|
|
|
{ |
298
|
|
|
$this->paymentMethods[] = $paymentMethod; |
299
|
|
|
return $this; |
300
|
|
|
} |
301
|
|
|
|
302
|
|
|
/** |
303
|
|
|
* isset paymentMethods |
304
|
|
|
* |
305
|
|
|
* @param scalar $index |
306
|
|
|
* @return boolean |
307
|
|
|
*/ |
308
|
|
|
public function issetPaymentMethods($index) |
309
|
|
|
{ |
310
|
|
|
return isset($this->paymentMethods[$index]); |
311
|
|
|
} |
312
|
|
|
|
313
|
|
|
/** |
314
|
|
|
* unset paymentMethods |
315
|
|
|
* |
316
|
|
|
* @param scalar $index |
317
|
|
|
* @return void |
318
|
|
|
*/ |
319
|
|
|
public function unsetPaymentMethods($index) |
320
|
|
|
{ |
321
|
|
|
unset($this->paymentMethods[$index]); |
322
|
|
|
} |
323
|
|
|
|
324
|
|
|
/** |
325
|
|
|
* Gets as paymentMethods |
326
|
|
|
* |
327
|
|
|
* @return string[] |
328
|
|
|
*/ |
329
|
|
|
public function getPaymentMethods() |
330
|
|
|
{ |
331
|
|
|
return $this->paymentMethods; |
332
|
|
|
} |
333
|
|
|
|
334
|
|
|
/** |
335
|
|
|
* Sets a new paymentMethods |
336
|
|
|
* |
337
|
|
|
* @param string $paymentMethods |
338
|
|
|
* @return self |
339
|
|
|
*/ |
340
|
|
|
public function setPaymentMethods(array $paymentMethods) |
341
|
|
|
{ |
342
|
|
|
$this->paymentMethods = $paymentMethods; |
343
|
|
|
return $this; |
344
|
|
|
} |
345
|
|
|
|
346
|
|
|
/** |
347
|
|
|
* Adds as currency |
348
|
|
|
* |
349
|
|
|
* @return self |
350
|
|
|
* @param string $currency |
351
|
|
|
*/ |
352
|
|
|
public function addToCurrencies($currency) |
353
|
|
|
{ |
354
|
|
|
$this->currencies[] = $currency; |
355
|
|
|
return $this; |
356
|
|
|
} |
357
|
|
|
|
358
|
|
|
/** |
359
|
|
|
* isset currencies |
360
|
|
|
* |
361
|
|
|
* @param scalar $index |
362
|
|
|
* @return boolean |
363
|
|
|
*/ |
364
|
|
|
public function issetCurrencies($index) |
365
|
|
|
{ |
366
|
|
|
return isset($this->currencies[$index]); |
367
|
|
|
} |
368
|
|
|
|
369
|
|
|
/** |
370
|
|
|
* unset currencies |
371
|
|
|
* |
372
|
|
|
* @param scalar $index |
373
|
|
|
* @return void |
374
|
|
|
*/ |
375
|
|
|
public function unsetCurrencies($index) |
376
|
|
|
{ |
377
|
|
|
unset($this->currencies[$index]); |
378
|
|
|
} |
379
|
|
|
|
380
|
|
|
/** |
381
|
|
|
* Gets as currencies |
382
|
|
|
* |
383
|
|
|
* @return string[] |
384
|
|
|
*/ |
385
|
|
|
public function getCurrencies() |
386
|
|
|
{ |
387
|
|
|
return $this->currencies; |
388
|
|
|
} |
389
|
|
|
|
390
|
|
|
/** |
391
|
|
|
* Sets a new currencies |
392
|
|
|
* |
393
|
|
|
* @param string $currencies |
394
|
|
|
* @return self |
395
|
|
|
*/ |
396
|
|
|
public function setCurrencies(array $currencies) |
397
|
|
|
{ |
398
|
|
|
$this->currencies = $currencies; |
399
|
|
|
return $this; |
400
|
|
|
} |
401
|
|
|
|
402
|
|
|
/** |
403
|
|
|
* Gets as publicClientKey |
404
|
|
|
* |
405
|
|
|
* @return string |
406
|
|
|
*/ |
407
|
|
|
public function getPublicClientKey() |
408
|
|
|
{ |
409
|
|
|
return $this->publicClientKey; |
410
|
|
|
} |
411
|
|
|
|
412
|
|
|
/** |
413
|
|
|
* Sets a new publicClientKey |
414
|
|
|
* |
415
|
|
|
* @param string $publicClientKey |
416
|
|
|
* @return self |
417
|
|
|
*/ |
418
|
|
|
public function setPublicClientKey($publicClientKey) |
419
|
|
|
{ |
420
|
|
|
$this->publicClientKey = $publicClientKey; |
421
|
|
|
return $this; |
422
|
|
|
} |
423
|
|
|
|
424
|
|
|
|
425
|
|
|
// Json Set Code |
426
|
|
|
public function set($data) |
427
|
|
|
{ |
428
|
|
|
if(is_array($data) || is_object($data)) { |
429
|
|
|
$mapper = \net\authorize\util\Mapper::Instance(); |
430
|
|
|
foreach($data AS $key => $value) { |
431
|
|
|
$classDetails = $mapper->getClass(get_class() , $key); |
432
|
|
|
|
433
|
|
|
if($classDetails !== NULL ) { |
434
|
|
|
if ($classDetails->isArray) { |
435
|
|
|
if ($classDetails->isCustomDefined) { |
436
|
|
|
foreach($value AS $keyChild => $valueChild) { |
437
|
|
|
$type = new $classDetails->className; |
438
|
|
|
$type->set($valueChild); |
439
|
|
|
$this->{'addTo' . $key}($type); |
440
|
|
|
} |
441
|
|
|
} |
442
|
|
|
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) { |
443
|
|
|
foreach($value AS $keyChild => $valueChild) { |
444
|
|
|
$type = new \DateTime($valueChild); |
445
|
|
|
$this->{'addTo' . $key}($type); |
446
|
|
|
} |
447
|
|
|
} |
448
|
|
|
else { |
449
|
|
|
foreach($value AS $keyChild => $valueChild) { |
450
|
|
|
$this->{'addTo' . $key}($valueChild); |
451
|
|
|
} |
452
|
|
|
} |
453
|
|
|
} |
454
|
|
|
else { |
455
|
|
|
if ($classDetails->isCustomDefined){ |
456
|
|
|
$type = new $classDetails->className; |
457
|
|
|
$type->set($value); |
458
|
|
|
$this->{'set' . $key}($type); |
459
|
|
|
} |
460
|
|
|
else if ($classDetails->className === 'DateTime' || $classDetails->className === 'Date' ) { |
461
|
|
|
$type = new \DateTime($value); |
462
|
|
|
$this->{'set' . $key}($type); |
463
|
|
|
} |
464
|
|
|
else { |
465
|
|
|
$this->{'set' . $key}($value); |
466
|
|
|
} |
467
|
|
|
} |
468
|
|
|
} |
469
|
|
|
} |
470
|
|
|
} |
471
|
|
|
} |
472
|
|
|
|
473
|
|
|
} |
474
|
|
|
|
475
|
|
|
|