AddShipment::__construct()   B
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 30
Code Lines 28

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 30
rs 8.8571
c 0
b 0
f 0
cc 1
eloc 28
nc 1
nop 26

How to fix   Many Parameters   

Many Parameters

Methods with many parameters are not only hard to understand, but their parameters also often become inconsistent when you need more, or different data.

There are several approaches to avoid long parameter lists:

1
<?php
2
3
/*
4
 * This file is part of Smsa WebService package.
5
 * (c) Hamoud Alhoqbani <[email protected]>
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
10
namespace Alhoqbani\SmsaWebService\Soap\Type;
11
12
use \WsdlToPhp\PackageBase\AbstractStructBase;
13
14
/**
15
 * This class stands for addShipment Type
16
 *
17
 * @date 2018/04/06
18
 * @codeVersion 0.0.1
19
 */
20
class AddShipment extends AbstractStructBase
21
{
22
    /**
23
     * The PCs
24
     * Meta informations extracted from the WSDL
25
     * - maxOccurs: 1
26
     * - minOccurs: 1
27
     *
28
     * @var int
29
     */
30
    public $PCs;
31
    /**
32
     * The passKey
33
     * Meta informations extracted from the WSDL
34
     * - maxOccurs: 1
35
     * - minOccurs: 0
36
     *
37
     * @var string
38
     */
39
    public $passKey;
40
    /**
41
     * The refNo
42
     * Meta informations extracted from the WSDL
43
     * - maxOccurs: 1
44
     * - minOccurs: 0
45
     *
46
     * @var string
47
     */
48
    public $refNo;
49
    /**
50
     * The sentDate
51
     * Meta informations extracted from the WSDL
52
     * - maxOccurs: 1
53
     * - minOccurs: 0
54
     *
55
     * @var string
56
     */
57
    public $sentDate;
58
    /**
59
     * The idNo
60
     * Meta informations extracted from the WSDL
61
     * - maxOccurs: 1
62
     * - minOccurs: 0
63
     *
64
     * @var string
65
     */
66
    public $idNo;
67
    /**
68
     * The cName
69
     * Meta informations extracted from the WSDL
70
     * - maxOccurs: 1
71
     * - minOccurs: 0
72
     *
73
     * @var string
74
     */
75
    public $cName;
76
    /**
77
     * The cntry
78
     * Meta informations extracted from the WSDL
79
     * - maxOccurs: 1
80
     * - minOccurs: 0
81
     *
82
     * @var string
83
     */
84
    public $cntry;
85
    /**
86
     * The cCity
87
     * Meta informations extracted from the WSDL
88
     * - maxOccurs: 1
89
     * - minOccurs: 0
90
     *
91
     * @var string
92
     */
93
    public $cCity;
94
    /**
95
     * The cZip
96
     * Meta informations extracted from the WSDL
97
     * - maxOccurs: 1
98
     * - minOccurs: 0
99
     *
100
     * @var string
101
     */
102
    public $cZip;
103
    /**
104
     * The cPOBox
105
     * Meta informations extracted from the WSDL
106
     * - maxOccurs: 1
107
     * - minOccurs: 0
108
     *
109
     * @var string
110
     */
111
    public $cPOBox;
112
    /**
113
     * The cMobile
114
     * Meta informations extracted from the WSDL
115
     * - maxOccurs: 1
116
     * - minOccurs: 0
117
     *
118
     * @var string
119
     */
120
    public $cMobile;
121
    /**
122
     * The cTel1
123
     * Meta informations extracted from the WSDL
124
     * - maxOccurs: 1
125
     * - minOccurs: 0
126
     *
127
     * @var string
128
     */
129
    public $cTel1;
130
    /**
131
     * The cTel2
132
     * Meta informations extracted from the WSDL
133
     * - maxOccurs: 1
134
     * - minOccurs: 0
135
     *
136
     * @var string
137
     */
138
    public $cTel2;
139
    /**
140
     * The cAddr1
141
     * Meta informations extracted from the WSDL
142
     * - maxOccurs: 1
143
     * - minOccurs: 0
144
     *
145
     * @var string
146
     */
147
    public $cAddr1;
148
    /**
149
     * The cAddr2
150
     * Meta informations extracted from the WSDL
151
     * - maxOccurs: 1
152
     * - minOccurs: 0
153
     *
154
     * @var string
155
     */
156
    public $cAddr2;
157
    /**
158
     * The shipType
159
     * Meta informations extracted from the WSDL
160
     * - maxOccurs: 1
161
     * - minOccurs: 0
162
     *
163
     * @var string
164
     */
165
    public $shipType;
166
    /**
167
     * The cEmail
168
     * Meta informations extracted from the WSDL
169
     * - maxOccurs: 1
170
     * - minOccurs: 0
171
     *
172
     * @var string
173
     */
174
    public $cEmail;
175
    /**
176
     * The carrValue
177
     * Meta informations extracted from the WSDL
178
     * - maxOccurs: 1
179
     * - minOccurs: 0
180
     *
181
     * @var string
182
     */
183
    public $carrValue;
184
    /**
185
     * The carrCurr
186
     * Meta informations extracted from the WSDL
187
     * - maxOccurs: 1
188
     * - minOccurs: 0
189
     *
190
     * @var string
191
     */
192
    public $carrCurr;
193
    /**
194
     * The codAmt
195
     * Meta informations extracted from the WSDL
196
     * - maxOccurs: 1
197
     * - minOccurs: 0
198
     *
199
     * @var string
200
     */
201
    public $codAmt;
202
    /**
203
     * The weight
204
     * Meta informations extracted from the WSDL
205
     * - maxOccurs: 1
206
     * - minOccurs: 0
207
     *
208
     * @var string
209
     */
210
    public $weight;
211
    /**
212
     * The custVal
213
     * Meta informations extracted from the WSDL
214
     * - maxOccurs: 1
215
     * - minOccurs: 0
216
     *
217
     * @var string
218
     */
219
    public $custVal;
220
    /**
221
     * The custCurr
222
     * Meta informations extracted from the WSDL
223
     * - maxOccurs: 1
224
     * - minOccurs: 0
225
     *
226
     * @var string
227
     */
228
    public $custCurr;
229
    /**
230
     * The insrAmt
231
     * Meta informations extracted from the WSDL
232
     * - maxOccurs: 1
233
     * - minOccurs: 0
234
     *
235
     * @var string
236
     */
237
    public $insrAmt;
238
    /**
239
     * The insrCurr
240
     * Meta informations extracted from the WSDL
241
     * - maxOccurs: 1
242
     * - minOccurs: 0
243
     *
244
     * @var string
245
     */
246
    public $insrCurr;
247
    /**
248
     * The itemDesc
249
     * Meta informations extracted from the WSDL
250
     * - maxOccurs: 1
251
     * - minOccurs: 0
252
     *
253
     * @var string
254
     */
255
    public $itemDesc;
256
257
    /**
258
     * Constructor method for addShipment
259
     *
260
     * @uses AddShipment::setPCs()
261
     * @uses AddShipment::setPassKey()
262
     * @uses AddShipment::setRefNo()
263
     * @uses AddShipment::setSentDate()
264
     * @uses AddShipment::setIdNo()
265
     * @uses AddShipment::setCName()
266
     * @uses AddShipment::setCntry()
267
     * @uses AddShipment::setCCity()
268
     * @uses AddShipment::setCZip()
269
     * @uses AddShipment::setCPOBox()
270
     * @uses AddShipment::setCMobile()
271
     * @uses AddShipment::setCTel1()
272
     * @uses AddShipment::setCTel2()
273
     * @uses AddShipment::setCAddr1()
274
     * @uses AddShipment::setCAddr2()
275
     * @uses AddShipment::setShipType()
276
     * @uses AddShipment::setCEmail()
277
     * @uses AddShipment::setCarrValue()
278
     * @uses AddShipment::setCarrCurr()
279
     * @uses AddShipment::setCodAmt()
280
     * @uses AddShipment::setWeight()
281
     * @uses AddShipment::setCustVal()
282
     * @uses AddShipment::setCustCurr()
283
     * @uses AddShipment::setInsrAmt()
284
     * @uses AddShipment::setInsrCurr()
285
     * @uses AddShipment::setItemDesc()
286
     *
287
     * @param int    $pCs
288
     * @param string $passKey
289
     * @param string $refNo
290
     * @param string $sentDate
291
     * @param string $idNo
292
     * @param string $cName
293
     * @param string $cntry
294
     * @param string $cCity
295
     * @param string $cZip
296
     * @param string $cPOBox
297
     * @param string $cMobile
298
     * @param string $cTel1
299
     * @param string $cTel2
300
     * @param string $cAddr1
301
     * @param string $cAddr2
302
     * @param string $shipType
303
     * @param string $cEmail
304
     * @param string $carrValue
305
     * @param string $carrCurr
306
     * @param string $codAmt
307
     * @param string $weight
308
     * @param string $custVal
309
     * @param string $custCurr
310
     * @param string $insrAmt
311
     * @param string $insrCurr
312
     * @param string $itemDesc
313
     */
314
    public function __construct($pCs = null, $passKey = null, $refNo = null, $sentDate = null, $idNo = null, $cName = null, $cntry = null, $cCity = null, $cZip = null, $cPOBox = null, $cMobile = null, $cTel1 = null, $cTel2 = null, $cAddr1 = null, $cAddr2 = null, $shipType = null, $cEmail = null, $carrValue = null, $carrCurr = null, $codAmt = null, $weight = null, $custVal = null, $custCurr = null, $insrAmt = null, $insrCurr = null, $itemDesc = null)
315
    {
316
        $this
317
            ->setPCs($pCs)
318
            ->setPassKey($passKey)
319
            ->setRefNo($refNo)
320
            ->setSentDate($sentDate)
321
            ->setIdNo($idNo)
322
            ->setCName($cName)
323
            ->setCntry($cntry)
324
            ->setCCity($cCity)
325
            ->setCZip($cZip)
326
            ->setCPOBox($cPOBox)
327
            ->setCMobile($cMobile)
328
            ->setCTel1($cTel1)
329
            ->setCTel2($cTel2)
330
            ->setCAddr1($cAddr1)
331
            ->setCAddr2($cAddr2)
332
            ->setShipType($shipType)
333
            ->setCEmail($cEmail)
334
            ->setCarrValue($carrValue)
335
            ->setCarrCurr($carrCurr)
336
            ->setCodAmt($codAmt)
337
            ->setWeight($weight)
338
            ->setCustVal($custVal)
339
            ->setCustCurr($custCurr)
340
            ->setInsrAmt($insrAmt)
341
            ->setInsrCurr($insrCurr)
342
            ->setItemDesc($itemDesc);
343
    }
344
345
    /**
346
     * Get PCs value
347
     *
348
     * @return int
349
     */
350
    public function getPCs()
351
    {
352
        return $this->PCs;
353
    }
354
355
    /**
356
     * Set PCs value
357
     *
358
     * @param int $pCs
359
     *
360
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
361
     */
362
    public function setPCs($pCs = null)
363
    {
364
        // validation for constraint: int
365
        if (!is_null($pCs) && !is_numeric($pCs)) {
366
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($pCs)), __LINE__);
367
        }
368
        $this->PCs = $pCs;
0 ignored issues
show
Documentation Bug introduced by
It seems like $pCs can also be of type double or string. However, the property $PCs is declared as type integer. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
369
370
        return $this;
371
    }
372
373
    /**
374
     * Get passKey value
375
     *
376
     * @return string|null
377
     */
378
    public function getPassKey()
379
    {
380
        return $this->passKey;
381
    }
382
383
    /**
384
     * Set passKey value
385
     *
386
     * @param string $passKey
387
     *
388
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
389
     */
390
    public function setPassKey($passKey = null)
391
    {
392
        // validation for constraint: string
393
        if (!is_null($passKey) && !is_string($passKey)) {
394
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($passKey)), __LINE__);
395
        }
396
        $this->passKey = $passKey;
397
398
        return $this;
399
    }
400
401
    /**
402
     * Get refNo value
403
     *
404
     * @return string|null
405
     */
406
    public function getRefNo()
407
    {
408
        return $this->refNo;
409
    }
410
411
    /**
412
     * Set refNo value
413
     *
414
     * @param string $refNo
415
     *
416
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
417
     */
418
    public function setRefNo($refNo = null)
419
    {
420
        // validation for constraint: string
421
        if (!is_null($refNo) && !is_string($refNo)) {
422
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($refNo)), __LINE__);
423
        }
424
        $this->refNo = $refNo;
425
426
        return $this;
427
    }
428
429
    /**
430
     * Get sentDate value
431
     *
432
     * @return string|null
433
     */
434
    public function getSentDate()
435
    {
436
        return $this->sentDate;
437
    }
438
439
    /**
440
     * Set sentDate value
441
     *
442
     * @param string $sentDate
443
     *
444
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
445
     */
446
    public function setSentDate($sentDate = null)
447
    {
448
        // validation for constraint: string
449
        if (!is_null($sentDate) && !is_string($sentDate)) {
450
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($sentDate)), __LINE__);
451
        }
452
        $this->sentDate = $sentDate;
453
454
        return $this;
455
    }
456
457
    /**
458
     * Get idNo value
459
     *
460
     * @return string|null
461
     */
462
    public function getIdNo()
463
    {
464
        return $this->idNo;
465
    }
466
467
    /**
468
     * Set idNo value
469
     *
470
     * @param string $idNo
471
     *
472
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
473
     */
474
    public function setIdNo($idNo = null)
475
    {
476
        // validation for constraint: string
477
        if (!is_null($idNo) && !is_string($idNo)) {
478
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($idNo)), __LINE__);
479
        }
480
        $this->idNo = $idNo;
481
482
        return $this;
483
    }
484
485
    /**
486
     * Get cName value
487
     *
488
     * @return string|null
489
     */
490
    public function getCName()
491
    {
492
        return $this->cName;
493
    }
494
495
    /**
496
     * Set cName value
497
     *
498
     * @param string $cName
499
     *
500
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
501
     */
502
    public function setCName($cName = null)
503
    {
504
        // validation for constraint: string
505
        if (!is_null($cName) && !is_string($cName)) {
506
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cName)), __LINE__);
507
        }
508
        $this->cName = $cName;
509
510
        return $this;
511
    }
512
513
    /**
514
     * Get cntry value
515
     *
516
     * @return string|null
517
     */
518
    public function getCntry()
519
    {
520
        return $this->cntry;
521
    }
522
523
    /**
524
     * Set cntry value
525
     *
526
     * @param string $cntry
527
     *
528
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
529
     */
530
    public function setCntry($cntry = null)
531
    {
532
        // validation for constraint: string
533
        if (!is_null($cntry) && !is_string($cntry)) {
534
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cntry)), __LINE__);
535
        }
536
        $this->cntry = $cntry;
537
538
        return $this;
539
    }
540
541
    /**
542
     * Get cCity value
543
     *
544
     * @return string|null
545
     */
546
    public function getCCity()
547
    {
548
        return $this->cCity;
549
    }
550
551
    /**
552
     * Set cCity value
553
     *
554
     * @param string $cCity
555
     *
556
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
557
     */
558
    public function setCCity($cCity = null)
559
    {
560
        // validation for constraint: string
561
        if (!is_null($cCity) && !is_string($cCity)) {
562
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cCity)), __LINE__);
563
        }
564
        $this->cCity = $cCity;
565
566
        return $this;
567
    }
568
569
    /**
570
     * Get cZip value
571
     *
572
     * @return string|null
573
     */
574
    public function getCZip()
575
    {
576
        return $this->cZip;
577
    }
578
579
    /**
580
     * Set cZip value
581
     *
582
     * @param string $cZip
583
     *
584
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
585
     */
586
    public function setCZip($cZip = null)
587
    {
588
        // validation for constraint: string
589
        if (!is_null($cZip) && !is_string($cZip)) {
590
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cZip)), __LINE__);
591
        }
592
        $this->cZip = $cZip;
593
594
        return $this;
595
    }
596
597
    /**
598
     * Get cPOBox value
599
     *
600
     * @return string|null
601
     */
602
    public function getCPOBox()
603
    {
604
        return $this->cPOBox;
605
    }
606
607
    /**
608
     * Set cPOBox value
609
     *
610
     * @param string $cPOBox
611
     *
612
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
613
     */
614
    public function setCPOBox($cPOBox = null)
615
    {
616
        // validation for constraint: string
617
        if (!is_null($cPOBox) && !is_string($cPOBox)) {
618
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cPOBox)), __LINE__);
619
        }
620
        $this->cPOBox = $cPOBox;
621
622
        return $this;
623
    }
624
625
    /**
626
     * Get cMobile value
627
     *
628
     * @return string|null
629
     */
630
    public function getCMobile()
631
    {
632
        return $this->cMobile;
633
    }
634
635
    /**
636
     * Set cMobile value
637
     *
638
     * @param string $cMobile
639
     *
640
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
641
     */
642
    public function setCMobile($cMobile = null)
643
    {
644
        // validation for constraint: string
645
        if (!is_null($cMobile) && !is_string($cMobile)) {
646
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cMobile)), __LINE__);
647
        }
648
        $this->cMobile = $cMobile;
649
650
        return $this;
651
    }
652
653
    /**
654
     * Get cTel1 value
655
     *
656
     * @return string|null
657
     */
658
    public function getCTel1()
659
    {
660
        return $this->cTel1;
661
    }
662
663
    /**
664
     * Set cTel1 value
665
     *
666
     * @param string $cTel1
667
     *
668
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
669
     */
670
    public function setCTel1($cTel1 = null)
671
    {
672
        // validation for constraint: string
673
        if (!is_null($cTel1) && !is_string($cTel1)) {
674
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cTel1)), __LINE__);
675
        }
676
        $this->cTel1 = $cTel1;
677
678
        return $this;
679
    }
680
681
    /**
682
     * Get cTel2 value
683
     *
684
     * @return string|null
685
     */
686
    public function getCTel2()
687
    {
688
        return $this->cTel2;
689
    }
690
691
    /**
692
     * Set cTel2 value
693
     *
694
     * @param string $cTel2
695
     *
696
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
697
     */
698
    public function setCTel2($cTel2 = null)
699
    {
700
        // validation for constraint: string
701
        if (!is_null($cTel2) && !is_string($cTel2)) {
702
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cTel2)), __LINE__);
703
        }
704
        $this->cTel2 = $cTel2;
705
706
        return $this;
707
    }
708
709
    /**
710
     * Get cAddr1 value
711
     *
712
     * @return string|null
713
     */
714
    public function getCAddr1()
715
    {
716
        return $this->cAddr1;
717
    }
718
719
    /**
720
     * Set cAddr1 value
721
     *
722
     * @param string $cAddr1
723
     *
724
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
725
     */
726
    public function setCAddr1($cAddr1 = null)
727
    {
728
        // validation for constraint: string
729
        if (!is_null($cAddr1) && !is_string($cAddr1)) {
730
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cAddr1)), __LINE__);
731
        }
732
        $this->cAddr1 = $cAddr1;
733
734
        return $this;
735
    }
736
737
    /**
738
     * Get cAddr2 value
739
     *
740
     * @return string|null
741
     */
742
    public function getCAddr2()
743
    {
744
        return $this->cAddr2;
745
    }
746
747
    /**
748
     * Set cAddr2 value
749
     *
750
     * @param string $cAddr2
751
     *
752
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
753
     */
754
    public function setCAddr2($cAddr2 = null)
755
    {
756
        // validation for constraint: string
757
        if (!is_null($cAddr2) && !is_string($cAddr2)) {
758
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cAddr2)), __LINE__);
759
        }
760
        $this->cAddr2 = $cAddr2;
761
762
        return $this;
763
    }
764
765
    /**
766
     * Get shipType value
767
     *
768
     * @return string|null
769
     */
770
    public function getShipType()
771
    {
772
        return $this->shipType;
773
    }
774
775
    /**
776
     * Set shipType value
777
     *
778
     * @param string $shipType
779
     *
780
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
781
     */
782
    public function setShipType($shipType = null)
783
    {
784
        // validation for constraint: string
785
        if (!is_null($shipType) && !is_string($shipType)) {
786
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($shipType)), __LINE__);
787
        }
788
        $this->shipType = $shipType;
789
790
        return $this;
791
    }
792
793
    /**
794
     * Get cEmail value
795
     *
796
     * @return string|null
797
     */
798
    public function getCEmail()
799
    {
800
        return $this->cEmail;
801
    }
802
803
    /**
804
     * Set cEmail value
805
     *
806
     * @param string $cEmail
807
     *
808
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
809
     */
810
    public function setCEmail($cEmail = null)
811
    {
812
        // validation for constraint: string
813
        if (!is_null($cEmail) && !is_string($cEmail)) {
814
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cEmail)), __LINE__);
815
        }
816
        $this->cEmail = $cEmail;
817
818
        return $this;
819
    }
820
821
    /**
822
     * Get carrValue value
823
     *
824
     * @return string|null
825
     */
826
    public function getCarrValue()
827
    {
828
        return $this->carrValue;
829
    }
830
831
    /**
832
     * Set carrValue value
833
     *
834
     * @param string $carrValue
835
     *
836
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
837
     */
838
    public function setCarrValue($carrValue = null)
839
    {
840
        // validation for constraint: string
841
        if (!is_null($carrValue) && !is_string($carrValue)) {
842
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($carrValue)), __LINE__);
843
        }
844
        $this->carrValue = $carrValue;
845
846
        return $this;
847
    }
848
849
    /**
850
     * Get carrCurr value
851
     *
852
     * @return string|null
853
     */
854
    public function getCarrCurr()
855
    {
856
        return $this->carrCurr;
857
    }
858
859
    /**
860
     * Set carrCurr value
861
     *
862
     * @param string $carrCurr
863
     *
864
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
865
     */
866
    public function setCarrCurr($carrCurr = null)
867
    {
868
        // validation for constraint: string
869
        if (!is_null($carrCurr) && !is_string($carrCurr)) {
870
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($carrCurr)), __LINE__);
871
        }
872
        $this->carrCurr = $carrCurr;
873
874
        return $this;
875
    }
876
877
    /**
878
     * Get codAmt value
879
     *
880
     * @return string|null
881
     */
882
    public function getCodAmt()
883
    {
884
        return $this->codAmt;
885
    }
886
887
    /**
888
     * Set codAmt value
889
     *
890
     * @param string $codAmt
891
     *
892
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
893
     */
894
    public function setCodAmt($codAmt = null)
895
    {
896
        // validation for constraint: string
897
        if (!is_null($codAmt) && !is_string($codAmt)) {
898
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($codAmt)), __LINE__);
899
        }
900
        $this->codAmt = $codAmt;
901
902
        return $this;
903
    }
904
905
    /**
906
     * Get weight value
907
     *
908
     * @return string|null
909
     */
910
    public function getWeight()
911
    {
912
        return $this->weight;
913
    }
914
915
    /**
916
     * Set weight value
917
     *
918
     * @param string $weight
919
     *
920
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
921
     */
922
    public function setWeight($weight = null)
923
    {
924
        // validation for constraint: string
925
        if (!is_null($weight) && !is_string($weight)) {
926
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($weight)), __LINE__);
927
        }
928
        $this->weight = $weight;
929
930
        return $this;
931
    }
932
933
    /**
934
     * Get custVal value
935
     *
936
     * @return string|null
937
     */
938
    public function getCustVal()
939
    {
940
        return $this->custVal;
941
    }
942
943
    /**
944
     * Set custVal value
945
     *
946
     * @param string $custVal
947
     *
948
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
949
     */
950
    public function setCustVal($custVal = null)
951
    {
952
        // validation for constraint: string
953
        if (!is_null($custVal) && !is_string($custVal)) {
954
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($custVal)), __LINE__);
955
        }
956
        $this->custVal = $custVal;
957
958
        return $this;
959
    }
960
961
    /**
962
     * Get custCurr value
963
     *
964
     * @return string|null
965
     */
966
    public function getCustCurr()
967
    {
968
        return $this->custCurr;
969
    }
970
971
    /**
972
     * Set custCurr value
973
     *
974
     * @param string $custCurr
975
     *
976
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
977
     */
978
    public function setCustCurr($custCurr = null)
979
    {
980
        // validation for constraint: string
981
        if (!is_null($custCurr) && !is_string($custCurr)) {
982
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($custCurr)), __LINE__);
983
        }
984
        $this->custCurr = $custCurr;
985
986
        return $this;
987
    }
988
989
    /**
990
     * Get insrAmt value
991
     *
992
     * @return string|null
993
     */
994
    public function getInsrAmt()
995
    {
996
        return $this->insrAmt;
997
    }
998
999
    /**
1000
     * Set insrAmt value
1001
     *
1002
     * @param string $insrAmt
1003
     *
1004
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
1005
     */
1006
    public function setInsrAmt($insrAmt = null)
1007
    {
1008
        // validation for constraint: string
1009
        if (!is_null($insrAmt) && !is_string($insrAmt)) {
1010
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($insrAmt)), __LINE__);
1011
        }
1012
        $this->insrAmt = $insrAmt;
1013
1014
        return $this;
1015
    }
1016
1017
    /**
1018
     * Get insrCurr value
1019
     *
1020
     * @return string|null
1021
     */
1022
    public function getInsrCurr()
1023
    {
1024
        return $this->insrCurr;
1025
    }
1026
1027
    /**
1028
     * Set insrCurr value
1029
     *
1030
     * @param string $insrCurr
1031
     *
1032
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
1033
     */
1034
    public function setInsrCurr($insrCurr = null)
1035
    {
1036
        // validation for constraint: string
1037
        if (!is_null($insrCurr) && !is_string($insrCurr)) {
1038
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($insrCurr)), __LINE__);
1039
        }
1040
        $this->insrCurr = $insrCurr;
1041
1042
        return $this;
1043
    }
1044
1045
    /**
1046
     * Get itemDesc value
1047
     *
1048
     * @return string|null
1049
     */
1050
    public function getItemDesc()
1051
    {
1052
        return $this->itemDesc;
1053
    }
1054
1055
    /**
1056
     * Set itemDesc value
1057
     *
1058
     * @param string $itemDesc
1059
     *
1060
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
1061
     */
1062
    public function setItemDesc($itemDesc = null)
1063
    {
1064
        // validation for constraint: string
1065
        if (!is_null($itemDesc) && !is_string($itemDesc)) {
1066
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($itemDesc)), __LINE__);
1067
        }
1068
        $this->itemDesc = $itemDesc;
1069
1070
        return $this;
1071
    }
1072
1073
    /**
1074
     * Method called when an object has been exported with var_export() functions
1075
     * It allows to return an object instantiated with the values
1076
     *
1077
     * @see AbstractStructBase::__set_state()
1078
     *
1079
     * @uses AbstractStructBase::__set_state()
1080
     *
1081
     * @param array $array the exported values
1082
     *
1083
     * @return \Alhoqbani\SmsaWebService\Soap\Type\AddShipment
1084
     */
1085
    public static function __set_state(array $array)
1086
    {
1087
        return parent::__set_state($array);
1088
    }
1089
1090
    /**
1091
     * Method returning the class name
1092
     *
1093
     * @return string __CLASS__
1094
     */
1095
    public function __toString()
1096
    {
1097
        return __CLASS__;
1098
    }
1099
}
1100