|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace ColissimoTracking\StructType; |
|
6
|
|
|
|
|
7
|
|
|
use InvalidArgumentException; |
|
8
|
|
|
use WsdlToPhp\PackageBase\AbstractStructBase; |
|
9
|
|
|
|
|
10
|
|
|
/** |
|
11
|
|
|
* This class stands for track StructType |
|
12
|
|
|
* Meta information extracted from the WSDL |
|
13
|
|
|
* - type: tns:track |
|
14
|
|
|
* @subpackage Structs |
|
15
|
|
|
* @author WsdlToPhp <[email protected]> |
|
16
|
|
|
*/ |
|
17
|
|
|
class Track extends AbstractStructBase |
|
18
|
|
|
{ |
|
19
|
|
|
/** |
|
20
|
|
|
* The accountNumber |
|
21
|
|
|
* Meta information extracted from the WSDL |
|
22
|
|
|
* - minOccurs: 0 |
|
23
|
|
|
* @var string|null |
|
24
|
|
|
*/ |
|
25
|
|
|
protected ?string $accountNumber = null; |
|
26
|
|
|
/** |
|
27
|
|
|
* The password |
|
28
|
|
|
* Meta information extracted from the WSDL |
|
29
|
|
|
* - minOccurs: 0 |
|
30
|
|
|
* @var string|null |
|
31
|
|
|
*/ |
|
32
|
|
|
protected ?string $password = null; |
|
33
|
|
|
/** |
|
34
|
|
|
* The skybillNumber |
|
35
|
|
|
* Meta information extracted from the WSDL |
|
36
|
|
|
* - minOccurs: 0 |
|
37
|
|
|
* @var string|null |
|
38
|
|
|
*/ |
|
39
|
|
|
protected ?string $skybillNumber = null; |
|
40
|
|
|
/** |
|
41
|
|
|
* The apiKey |
|
42
|
|
|
* Meta information extracted from the WSDL |
|
43
|
|
|
* - minOccurs: 0 |
|
44
|
|
|
* @var string|null |
|
45
|
|
|
*/ |
|
46
|
|
|
protected ?string $apiKey = null; |
|
47
|
|
|
/** |
|
48
|
|
|
* Constructor method for track |
|
49
|
|
|
* @uses Track::setAccountNumber() |
|
50
|
|
|
* @uses Track::setPassword() |
|
51
|
|
|
* @uses Track::setSkybillNumber() |
|
52
|
|
|
* @uses Track::setApiKey() |
|
53
|
|
|
* @param string $accountNumber |
|
54
|
|
|
* @param string $password |
|
55
|
|
|
* @param string $skybillNumber |
|
56
|
|
|
* @param string $apiKey |
|
57
|
|
|
*/ |
|
58
|
|
|
public function __construct(?string $accountNumber = null, ?string $password = null, ?string $skybillNumber = null, ?string $apiKey = null) |
|
59
|
|
|
{ |
|
60
|
|
|
$this |
|
61
|
|
|
->setAccountNumber($accountNumber) |
|
62
|
|
|
->setPassword($password) |
|
63
|
|
|
->setSkybillNumber($skybillNumber) |
|
64
|
|
|
->setApiKey($apiKey); |
|
65
|
|
|
} |
|
66
|
|
|
/** |
|
67
|
|
|
* Get accountNumber value |
|
68
|
|
|
* @return string|null |
|
69
|
|
|
*/ |
|
70
|
|
|
public function getAccountNumber(): ?string |
|
71
|
|
|
{ |
|
72
|
|
|
return $this->accountNumber; |
|
73
|
|
|
} |
|
74
|
|
|
/** |
|
75
|
|
|
* Set accountNumber value |
|
76
|
|
|
* @param string $accountNumber |
|
77
|
|
|
* @return \ColissimoTracking\StructType\Track |
|
78
|
|
|
*/ |
|
79
|
|
|
public function setAccountNumber(?string $accountNumber = null): self |
|
80
|
|
|
{ |
|
81
|
|
|
// validation for constraint: string |
|
82
|
|
|
if (!is_null($accountNumber) && !is_string($accountNumber)) { |
|
|
|
|
|
|
83
|
|
|
throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($accountNumber, true), gettype($accountNumber)), __LINE__); |
|
84
|
|
|
} |
|
85
|
|
|
$this->accountNumber = $accountNumber; |
|
86
|
|
|
|
|
87
|
|
|
return $this; |
|
88
|
|
|
} |
|
89
|
|
|
/** |
|
90
|
|
|
* Get password value |
|
91
|
|
|
* @return string|null |
|
92
|
|
|
*/ |
|
93
|
|
|
public function getPassword(): ?string |
|
94
|
|
|
{ |
|
95
|
|
|
return $this->password; |
|
96
|
|
|
} |
|
97
|
|
|
/** |
|
98
|
|
|
* Set password value |
|
99
|
|
|
* @param string $password |
|
100
|
|
|
* @return \ColissimoTracking\StructType\Track |
|
101
|
|
|
*/ |
|
102
|
|
|
public function setPassword(?string $password = null): self |
|
103
|
|
|
{ |
|
104
|
|
|
// validation for constraint: string |
|
105
|
|
|
if (!is_null($password) && !is_string($password)) { |
|
|
|
|
|
|
106
|
|
|
throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($password, true), gettype($password)), __LINE__); |
|
107
|
|
|
} |
|
108
|
|
|
$this->password = $password; |
|
109
|
|
|
|
|
110
|
|
|
return $this; |
|
111
|
|
|
} |
|
112
|
|
|
/** |
|
113
|
|
|
* Get skybillNumber value |
|
114
|
|
|
* @return string|null |
|
115
|
|
|
*/ |
|
116
|
|
|
public function getSkybillNumber(): ?string |
|
117
|
|
|
{ |
|
118
|
|
|
return $this->skybillNumber; |
|
119
|
|
|
} |
|
120
|
|
|
/** |
|
121
|
|
|
* Set skybillNumber value |
|
122
|
|
|
* @param string $skybillNumber |
|
123
|
|
|
* @return \ColissimoTracking\StructType\Track |
|
124
|
|
|
*/ |
|
125
|
|
|
public function setSkybillNumber(?string $skybillNumber = null): self |
|
126
|
|
|
{ |
|
127
|
|
|
// validation for constraint: string |
|
128
|
|
|
if (!is_null($skybillNumber) && !is_string($skybillNumber)) { |
|
|
|
|
|
|
129
|
|
|
throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($skybillNumber, true), gettype($skybillNumber)), __LINE__); |
|
130
|
|
|
} |
|
131
|
|
|
$this->skybillNumber = $skybillNumber; |
|
132
|
|
|
|
|
133
|
|
|
return $this; |
|
134
|
|
|
} |
|
135
|
|
|
/** |
|
136
|
|
|
* Get apiKey value |
|
137
|
|
|
* @return string|null |
|
138
|
|
|
*/ |
|
139
|
|
|
public function getApiKey(): ?string |
|
140
|
|
|
{ |
|
141
|
|
|
return $this->apiKey; |
|
142
|
|
|
} |
|
143
|
|
|
/** |
|
144
|
|
|
* Set apiKey value |
|
145
|
|
|
* @param string $apiKey |
|
146
|
|
|
* @return \ColissimoTracking\StructType\Track |
|
147
|
|
|
*/ |
|
148
|
|
|
public function setApiKey(?string $apiKey = null): self |
|
149
|
|
|
{ |
|
150
|
|
|
// validation for constraint: string |
|
151
|
|
|
if (!is_null($apiKey) && !is_string($apiKey)) { |
|
|
|
|
|
|
152
|
|
|
throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($apiKey, true), gettype($apiKey)), __LINE__); |
|
153
|
|
|
} |
|
154
|
|
|
$this->apiKey = $apiKey; |
|
155
|
|
|
|
|
156
|
|
|
return $this; |
|
157
|
|
|
} |
|
158
|
|
|
} |
|
159
|
|
|
|