AddressType::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 20
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 18
c 1
b 0
f 0
nc 1
nop 17
dl 0
loc 20
rs 9.6666

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
namespace PayPal\StructType;
4
5
use \WsdlToPhp\PackageBase\AbstractStructBase;
6
7
/**
8
 * This class stands for AddressType StructType
9
 * Meta information extracted from the WSDL
10
 * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile. This element should only be used in response elements and
11
 * typically should not be used in creating request messages which specify the name of a country using the Country element (which refers to a 2-letter country code). | ISO 3166 standard country code Character limit: Two single-byte characters.
12
 * @subpackage Structs
13
 * @author WsdlToPhp <[email protected]>
14
 */
15
class AddressType extends AbstractStructBase
16
{
17
    /**
18
     * The Name
19
     * Meta information extracted from the WSDL
20
     * - documentation: Person's name associated with this address. Character length and limitations: 32 single-byte alphanumeric characters
21
     * - minOccurs: 0
22
     * @var string
23
     */
24
    public $Name;
25
    /**
26
     * The Street1
27
     * Meta information extracted from the WSDL
28
     * - documentation: First street address. Character length and limitations: 300 single-byte alphanumeric characters
29
     * - minOccurs: 0
30
     * @var string
31
     */
32
    public $Street1;
33
    /**
34
     * The Street2
35
     * Meta information extracted from the WSDL
36
     * - documentation: Second street address. Character length and limitations: 300 single-byte alphanumeric characters
37
     * - minOccurs: 0
38
     * @var string
39
     */
40
    public $Street2;
41
    /**
42
     * The CityName
43
     * Meta information extracted from the WSDL
44
     * - documentation: Name of city. Character length and limitations: 120 single-byte alphanumeric characters
45
     * - minOccurs: 0
46
     * @var string
47
     */
48
    public $CityName;
49
    /**
50
     * The StateOrProvince
51
     * Meta information extracted from the WSDL
52
     * - documentation: State or province. Character length and limitations: 120 single-byte alphanumeric characters For Canada and the USA, StateOrProvince must be the standard 2-character abbreviation of a state or province. Canadian Provinces Alberta AB
53
     * British_Columbia BC Manitoba MB New_Brunswick NB Newfoundland NF Northwest_Territories NT Nova_Scotia NS Nunavut NU Ontario ON Prince_Edward_Island PE Quebec QC Saskatchewan SK Yukon YK United States Alabama AL Alaska AK American_Samoa AS Arizona AZ
54
     * Arkansas AR California CA Colorado CO Connecticut CT Delaware DE District_Of_Columbia DC Federated_States_Of_Micronesia FM Florida FL Georgia GA Guam GU Hawaii HI Idaho ID Illinois IL Indiana IN Iowa IA Kansas KS Kentucky KY Louisiana LA Maine ME
55
     * Marshall_Islands MH Maryland MD Massachusetts MA Michigan MI Minnesota MN Mississippi MS Missouri MO Montana MT Nebraska NE Nevada NV New_Hampshire NH New_Jersey NJ New_Mexico NM New_York NY North_Carolina NC North_Dakota ND Northern_Mariana_Islands
56
     * MP Ohio OH Oklahoma OK Oregon OR Palau PW Pennsylvania PA Puerto_Rico PR Rhode_Island RI South_Carolina SC South_Dakota SD Tennessee TN Texas TX Utah UT Vermont VT Virgin_Islands VI Virginia VA Washington WA West_Virginia WV Wisconsin WI Wyoming WY
57
     * Armed_Forces_Americas AA Armed_Forces AE Armed_Forces_Pacific AP
58
     * - minOccurs: 0
59
     * @var string
60
     */
61
    public $StateOrProvince;
62
    /**
63
     * The Country
64
     * Meta information extracted from the WSDL
65
     * - minOccurs: 0
66
     * - ref: ns:Country
67
     * @var string
68
     */
69
    public $Country;
70
    /**
71
     * The CountryName
72
     * Meta information extracted from the WSDL
73
     * - minOccurs: 0
74
     * - ref: ns:CountryName
75
     * @var string
76
     */
77
    public $CountryName;
78
    /**
79
     * The Phone
80
     * Meta information extracted from the WSDL
81
     * - documentation: Telephone number associated with this address
82
     * - minOccurs: 0
83
     * @var string
84
     */
85
    public $Phone;
86
    /**
87
     * The PostalCode
88
     * Meta information extracted from the WSDL
89
     * - minOccurs: 0
90
     * @var string
91
     */
92
    public $PostalCode;
93
    /**
94
     * The AddressID
95
     * Meta information extracted from the WSDL
96
     * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile, or UpdateRecurringPaymentsProfile.
97
     * - minOccurs: 0
98
     * @var string
99
     */
100
    public $AddressID;
101
    /**
102
     * The AddressOwner
103
     * Meta information extracted from the WSDL
104
     * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile.
105
     * - minOccurs: 0
106
     * @var string
107
     */
108
    public $AddressOwner;
109
    /**
110
     * The ExternalAddressID
111
     * Meta information extracted from the WSDL
112
     * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile.
113
     * - minOccurs: 0
114
     * @var string
115
     */
116
    public $ExternalAddressID;
117
    /**
118
     * The InternationalName
119
     * Meta information extracted from the WSDL
120
     * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile. Only applicable to SellerPaymentAddress today. Seller's
121
     * international name that is associated with the payment address.
122
     * - minOccurs: 0
123
     * @var string
124
     */
125
    public $InternationalName;
126
    /**
127
     * The InternationalStateAndCity
128
     * Meta information extracted from the WSDL
129
     * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile. Only applicable to SellerPaymentAddress today. International
130
     * state and city for the seller's payment address.
131
     * - minOccurs: 0
132
     * @var string
133
     */
134
    public $InternationalStateAndCity;
135
    /**
136
     * The InternationalStreet
137
     * Meta information extracted from the WSDL
138
     * - documentation: IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile. Only applicable to SellerPaymentAddress today. Seller's
139
     * international street address that is associated with the payment address.
140
     * - minOccurs: 0
141
     * @var string
142
     */
143
    public $InternationalStreet;
144
    /**
145
     * The AddressStatus
146
     * Meta information extracted from the WSDL
147
     * - documentation: Status of the address on file with PayPal. IMPORTANT: Do not set this element for SetExpressCheckout, DoExpressCheckoutPayment, DoDirectPayment, CreateRecurringPaymentsProfile or UpdateRecurringPaymentsProfile.
148
     * - minOccurs: 0
149
     * @var string
150
     */
151
    public $AddressStatus;
152
    /**
153
     * The AddressNormalizationStatus
154
     * Meta information extracted from the WSDL
155
     * - documentation: Returns Normalization Status of the Address. Possible values are Normalized, Unnormalized, and None.
156
     * - minOccurs: 0
157
     * @var string
158
     */
159
    public $AddressNormalizationStatus;
160
    /**
161
     * Constructor method for AddressType
162
     * @uses AddressType::setName()
163
     * @uses AddressType::setStreet1()
164
     * @uses AddressType::setStreet2()
165
     * @uses AddressType::setCityName()
166
     * @uses AddressType::setStateOrProvince()
167
     * @uses AddressType::setCountry()
168
     * @uses AddressType::setCountryName()
169
     * @uses AddressType::setPhone()
170
     * @uses AddressType::setPostalCode()
171
     * @uses AddressType::setAddressID()
172
     * @uses AddressType::setAddressOwner()
173
     * @uses AddressType::setExternalAddressID()
174
     * @uses AddressType::setInternationalName()
175
     * @uses AddressType::setInternationalStateAndCity()
176
     * @uses AddressType::setInternationalStreet()
177
     * @uses AddressType::setAddressStatus()
178
     * @uses AddressType::setAddressNormalizationStatus()
179
     * @param string $name
180
     * @param string $street1
181
     * @param string $street2
182
     * @param string $cityName
183
     * @param string $stateOrProvince
184
     * @param string $country
185
     * @param string $countryName
186
     * @param string $phone
187
     * @param string $postalCode
188
     * @param string $addressID
189
     * @param string $addressOwner
190
     * @param string $externalAddressID
191
     * @param string $internationalName
192
     * @param string $internationalStateAndCity
193
     * @param string $internationalStreet
194
     * @param string $addressStatus
195
     * @param string $addressNormalizationStatus
196
     */
197
    public function __construct($name = null, $street1 = null, $street2 = null, $cityName = null, $stateOrProvince = null, $country = null, $countryName = null, $phone = null, $postalCode = null, $addressID = null, $addressOwner = null, $externalAddressID = null, $internationalName = null, $internationalStateAndCity = null, $internationalStreet = null, $addressStatus = null, $addressNormalizationStatus = null)
198
    {
199
        $this
200
            ->setName($name)
201
            ->setStreet1($street1)
202
            ->setStreet2($street2)
203
            ->setCityName($cityName)
204
            ->setStateOrProvince($stateOrProvince)
205
            ->setCountry($country)
206
            ->setCountryName($countryName)
207
            ->setPhone($phone)
208
            ->setPostalCode($postalCode)
209
            ->setAddressID($addressID)
210
            ->setAddressOwner($addressOwner)
211
            ->setExternalAddressID($externalAddressID)
212
            ->setInternationalName($internationalName)
213
            ->setInternationalStateAndCity($internationalStateAndCity)
214
            ->setInternationalStreet($internationalStreet)
215
            ->setAddressStatus($addressStatus)
216
            ->setAddressNormalizationStatus($addressNormalizationStatus);
217
    }
218
    /**
219
     * Get Name value
220
     * @return string|null
221
     */
222
    public function getName()
223
    {
224
        return $this->Name;
225
    }
226
    /**
227
     * Set Name value
228
     * @param string $name
229
     * @return \PayPal\StructType\AddressType
230
     */
231
    public function setName($name = null)
232
    {
233
        // validation for constraint: string
234
        if (!is_null($name) && !is_string($name)) {
0 ignored issues
show
introduced by
The condition is_string($name) is always true.
Loading history...
235
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($name, true), gettype($name)), __LINE__);
236
        }
237
        $this->Name = $name;
238
        return $this;
239
    }
240
    /**
241
     * Get Street1 value
242
     * @return string|null
243
     */
244
    public function getStreet1()
245
    {
246
        return $this->Street1;
247
    }
248
    /**
249
     * Set Street1 value
250
     * @param string $street1
251
     * @return \PayPal\StructType\AddressType
252
     */
253
    public function setStreet1($street1 = null)
254
    {
255
        // validation for constraint: string
256
        if (!is_null($street1) && !is_string($street1)) {
0 ignored issues
show
introduced by
The condition is_string($street1) is always true.
Loading history...
257
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($street1, true), gettype($street1)), __LINE__);
258
        }
259
        $this->Street1 = $street1;
260
        return $this;
261
    }
262
    /**
263
     * Get Street2 value
264
     * @return string|null
265
     */
266
    public function getStreet2()
267
    {
268
        return $this->Street2;
269
    }
270
    /**
271
     * Set Street2 value
272
     * @param string $street2
273
     * @return \PayPal\StructType\AddressType
274
     */
275
    public function setStreet2($street2 = null)
276
    {
277
        // validation for constraint: string
278
        if (!is_null($street2) && !is_string($street2)) {
0 ignored issues
show
introduced by
The condition is_string($street2) is always true.
Loading history...
279
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($street2, true), gettype($street2)), __LINE__);
280
        }
281
        $this->Street2 = $street2;
282
        return $this;
283
    }
284
    /**
285
     * Get CityName value
286
     * @return string|null
287
     */
288
    public function getCityName()
289
    {
290
        return $this->CityName;
291
    }
292
    /**
293
     * Set CityName value
294
     * @param string $cityName
295
     * @return \PayPal\StructType\AddressType
296
     */
297
    public function setCityName($cityName = null)
298
    {
299
        // validation for constraint: string
300
        if (!is_null($cityName) && !is_string($cityName)) {
0 ignored issues
show
introduced by
The condition is_string($cityName) is always true.
Loading history...
301
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($cityName, true), gettype($cityName)), __LINE__);
302
        }
303
        $this->CityName = $cityName;
304
        return $this;
305
    }
306
    /**
307
     * Get StateOrProvince value
308
     * @return string|null
309
     */
310
    public function getStateOrProvince()
311
    {
312
        return $this->StateOrProvince;
313
    }
314
    /**
315
     * Set StateOrProvince value
316
     * @param string $stateOrProvince
317
     * @return \PayPal\StructType\AddressType
318
     */
319
    public function setStateOrProvince($stateOrProvince = null)
320
    {
321
        // validation for constraint: string
322
        if (!is_null($stateOrProvince) && !is_string($stateOrProvince)) {
0 ignored issues
show
introduced by
The condition is_string($stateOrProvince) is always true.
Loading history...
323
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($stateOrProvince, true), gettype($stateOrProvince)), __LINE__);
324
        }
325
        $this->StateOrProvince = $stateOrProvince;
326
        return $this;
327
    }
328
    /**
329
     * Get Country value
330
     * @return string|null
331
     */
332
    public function getCountry()
333
    {
334
        return $this->Country;
335
    }
336
    /**
337
     * Set Country value
338
     * @uses \PayPal\EnumType\CountryCodeType::valueIsValid()
339
     * @uses \PayPal\EnumType\CountryCodeType::getValidValues()
340
     * @throws \InvalidArgumentException
341
     * @param string $country
342
     * @return \PayPal\StructType\AddressType
343
     */
344
    public function setCountry($country = null)
345
    {
346
        // validation for constraint: enumeration
347
        if (!\PayPal\EnumType\CountryCodeType::valueIsValid($country)) {
348
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\CountryCodeType', is_array($country) ? implode(', ', $country) : var_export($country, true), implode(', ', \PayPal\EnumType\CountryCodeType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($country) is always false.
Loading history...
349
        }
350
        $this->Country = $country;
351
        return $this;
352
    }
353
    /**
354
     * Get CountryName value
355
     * @return string|null
356
     */
357
    public function getCountryName()
358
    {
359
        return $this->CountryName;
360
    }
361
    /**
362
     * Set CountryName value
363
     * @param string $countryName
364
     * @return \PayPal\StructType\AddressType
365
     */
366
    public function setCountryName($countryName = null)
367
    {
368
        // validation for constraint: string
369
        if (!is_null($countryName) && !is_string($countryName)) {
0 ignored issues
show
introduced by
The condition is_string($countryName) is always true.
Loading history...
370
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($countryName, true), gettype($countryName)), __LINE__);
371
        }
372
        $this->CountryName = $countryName;
373
        return $this;
374
    }
375
    /**
376
     * Get Phone value
377
     * @return string|null
378
     */
379
    public function getPhone()
380
    {
381
        return $this->Phone;
382
    }
383
    /**
384
     * Set Phone value
385
     * @param string $phone
386
     * @return \PayPal\StructType\AddressType
387
     */
388
    public function setPhone($phone = null)
389
    {
390
        // validation for constraint: string
391
        if (!is_null($phone) && !is_string($phone)) {
0 ignored issues
show
introduced by
The condition is_string($phone) is always true.
Loading history...
392
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($phone, true), gettype($phone)), __LINE__);
393
        }
394
        $this->Phone = $phone;
395
        return $this;
396
    }
397
    /**
398
     * Get PostalCode value
399
     * @return string|null
400
     */
401
    public function getPostalCode()
402
    {
403
        return $this->PostalCode;
404
    }
405
    /**
406
     * Set PostalCode value
407
     * @param string $postalCode
408
     * @return \PayPal\StructType\AddressType
409
     */
410
    public function setPostalCode($postalCode = null)
411
    {
412
        // validation for constraint: string
413
        if (!is_null($postalCode) && !is_string($postalCode)) {
0 ignored issues
show
introduced by
The condition is_string($postalCode) is always true.
Loading history...
414
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($postalCode, true), gettype($postalCode)), __LINE__);
415
        }
416
        $this->PostalCode = $postalCode;
417
        return $this;
418
    }
419
    /**
420
     * Get AddressID value
421
     * @return string|null
422
     */
423
    public function getAddressID()
424
    {
425
        return $this->AddressID;
426
    }
427
    /**
428
     * Set AddressID value
429
     * @param string $addressID
430
     * @return \PayPal\StructType\AddressType
431
     */
432
    public function setAddressID($addressID = null)
433
    {
434
        // validation for constraint: string
435
        if (!is_null($addressID) && !is_string($addressID)) {
0 ignored issues
show
introduced by
The condition is_string($addressID) is always true.
Loading history...
436
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($addressID, true), gettype($addressID)), __LINE__);
437
        }
438
        $this->AddressID = $addressID;
439
        return $this;
440
    }
441
    /**
442
     * Get AddressOwner value
443
     * @return string|null
444
     */
445
    public function getAddressOwner()
446
    {
447
        return $this->AddressOwner;
448
    }
449
    /**
450
     * Set AddressOwner value
451
     * @uses \PayPal\EnumType\AddressOwnerCodeType::valueIsValid()
452
     * @uses \PayPal\EnumType\AddressOwnerCodeType::getValidValues()
453
     * @throws \InvalidArgumentException
454
     * @param string $addressOwner
455
     * @return \PayPal\StructType\AddressType
456
     */
457
    public function setAddressOwner($addressOwner = null)
458
    {
459
        // validation for constraint: enumeration
460
        if (!\PayPal\EnumType\AddressOwnerCodeType::valueIsValid($addressOwner)) {
461
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\AddressOwnerCodeType', is_array($addressOwner) ? implode(', ', $addressOwner) : var_export($addressOwner, true), implode(', ', \PayPal\EnumType\AddressOwnerCodeType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($addressOwner) is always false.
Loading history...
462
        }
463
        $this->AddressOwner = $addressOwner;
464
        return $this;
465
    }
466
    /**
467
     * Get ExternalAddressID value
468
     * @return string|null
469
     */
470
    public function getExternalAddressID()
471
    {
472
        return $this->ExternalAddressID;
473
    }
474
    /**
475
     * Set ExternalAddressID value
476
     * @param string $externalAddressID
477
     * @return \PayPal\StructType\AddressType
478
     */
479
    public function setExternalAddressID($externalAddressID = null)
480
    {
481
        // validation for constraint: string
482
        if (!is_null($externalAddressID) && !is_string($externalAddressID)) {
0 ignored issues
show
introduced by
The condition is_string($externalAddressID) is always true.
Loading history...
483
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($externalAddressID, true), gettype($externalAddressID)), __LINE__);
484
        }
485
        $this->ExternalAddressID = $externalAddressID;
486
        return $this;
487
    }
488
    /**
489
     * Get InternationalName value
490
     * @return string|null
491
     */
492
    public function getInternationalName()
493
    {
494
        return $this->InternationalName;
495
    }
496
    /**
497
     * Set InternationalName value
498
     * @param string $internationalName
499
     * @return \PayPal\StructType\AddressType
500
     */
501
    public function setInternationalName($internationalName = null)
502
    {
503
        // validation for constraint: string
504
        if (!is_null($internationalName) && !is_string($internationalName)) {
0 ignored issues
show
introduced by
The condition is_string($internationalName) is always true.
Loading history...
505
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($internationalName, true), gettype($internationalName)), __LINE__);
506
        }
507
        $this->InternationalName = $internationalName;
508
        return $this;
509
    }
510
    /**
511
     * Get InternationalStateAndCity value
512
     * @return string|null
513
     */
514
    public function getInternationalStateAndCity()
515
    {
516
        return $this->InternationalStateAndCity;
517
    }
518
    /**
519
     * Set InternationalStateAndCity value
520
     * @param string $internationalStateAndCity
521
     * @return \PayPal\StructType\AddressType
522
     */
523
    public function setInternationalStateAndCity($internationalStateAndCity = null)
524
    {
525
        // validation for constraint: string
526
        if (!is_null($internationalStateAndCity) && !is_string($internationalStateAndCity)) {
0 ignored issues
show
introduced by
The condition is_string($internationalStateAndCity) is always true.
Loading history...
527
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($internationalStateAndCity, true), gettype($internationalStateAndCity)), __LINE__);
528
        }
529
        $this->InternationalStateAndCity = $internationalStateAndCity;
530
        return $this;
531
    }
532
    /**
533
     * Get InternationalStreet value
534
     * @return string|null
535
     */
536
    public function getInternationalStreet()
537
    {
538
        return $this->InternationalStreet;
539
    }
540
    /**
541
     * Set InternationalStreet value
542
     * @param string $internationalStreet
543
     * @return \PayPal\StructType\AddressType
544
     */
545
    public function setInternationalStreet($internationalStreet = null)
546
    {
547
        // validation for constraint: string
548
        if (!is_null($internationalStreet) && !is_string($internationalStreet)) {
0 ignored issues
show
introduced by
The condition is_string($internationalStreet) is always true.
Loading history...
549
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($internationalStreet, true), gettype($internationalStreet)), __LINE__);
550
        }
551
        $this->InternationalStreet = $internationalStreet;
552
        return $this;
553
    }
554
    /**
555
     * Get AddressStatus value
556
     * @return string|null
557
     */
558
    public function getAddressStatus()
559
    {
560
        return $this->AddressStatus;
561
    }
562
    /**
563
     * Set AddressStatus value
564
     * @uses \PayPal\EnumType\AddressStatusCodeType::valueIsValid()
565
     * @uses \PayPal\EnumType\AddressStatusCodeType::getValidValues()
566
     * @throws \InvalidArgumentException
567
     * @param string $addressStatus
568
     * @return \PayPal\StructType\AddressType
569
     */
570
    public function setAddressStatus($addressStatus = null)
571
    {
572
        // validation for constraint: enumeration
573
        if (!\PayPal\EnumType\AddressStatusCodeType::valueIsValid($addressStatus)) {
574
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\AddressStatusCodeType', is_array($addressStatus) ? implode(', ', $addressStatus) : var_export($addressStatus, true), implode(', ', \PayPal\EnumType\AddressStatusCodeType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($addressStatus) is always false.
Loading history...
575
        }
576
        $this->AddressStatus = $addressStatus;
577
        return $this;
578
    }
579
    /**
580
     * Get AddressNormalizationStatus value
581
     * @return string|null
582
     */
583
    public function getAddressNormalizationStatus()
584
    {
585
        return $this->AddressNormalizationStatus;
586
    }
587
    /**
588
     * Set AddressNormalizationStatus value
589
     * @uses \PayPal\EnumType\AddressNormalizationStatusCodeType::valueIsValid()
590
     * @uses \PayPal\EnumType\AddressNormalizationStatusCodeType::getValidValues()
591
     * @throws \InvalidArgumentException
592
     * @param string $addressNormalizationStatus
593
     * @return \PayPal\StructType\AddressType
594
     */
595
    public function setAddressNormalizationStatus($addressNormalizationStatus = null)
596
    {
597
        // validation for constraint: enumeration
598
        if (!\PayPal\EnumType\AddressNormalizationStatusCodeType::valueIsValid($addressNormalizationStatus)) {
599
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \PayPal\EnumType\AddressNormalizationStatusCodeType', is_array($addressNormalizationStatus) ? implode(', ', $addressNormalizationStatus) : var_export($addressNormalizationStatus, true), implode(', ', \PayPal\EnumType\AddressNormalizationStatusCodeType::getValidValues())), __LINE__);
0 ignored issues
show
introduced by
The condition is_array($addressNormalizationStatus) is always false.
Loading history...
600
        }
601
        $this->AddressNormalizationStatus = $addressNormalizationStatus;
602
        return $this;
603
    }
604
}
605