commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
UserProvidedIdentifiersModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
17 use stdClass;
18 
23 {
28  protected $key;
29 
34  protected $externalId;
35 
40  protected $orderNumber;
41 
46  protected $customerNumber;
47 
52  protected $sku;
53 
58  protected $slug;
59 
64  protected $containerAndKey;
65 
66 
70  public function __construct(
71  ?string $key = null,
72  ?string $externalId = null,
73  ?string $orderNumber = null,
74  ?string $customerNumber = null,
75  ?string $sku = null,
76  ?LocalizedString $slug = null,
78  ) {
79  $this->key = $key;
80  $this->externalId = $externalId;
81  $this->orderNumber = $orderNumber;
82  $this->customerNumber = $customerNumber;
83  $this->sku = $sku;
84  $this->slug = $slug;
85  $this->containerAndKey = $containerAndKey;
86  }
87 
94  public function getKey()
95  {
96  if (is_null($this->key)) {
98  $data = $this->raw(self::FIELD_KEY);
99  if (is_null($data)) {
100  return null;
101  }
102  $this->key = (string) $data;
103  }
104 
105  return $this->key;
106  }
107 
114  public function getExternalId()
115  {
116  if (is_null($this->externalId)) {
118  $data = $this->raw(self::FIELD_EXTERNAL_ID);
119  if (is_null($data)) {
120  return null;
121  }
122  $this->externalId = (string) $data;
123  }
124 
125  return $this->externalId;
126  }
127 
134  public function getOrderNumber()
135  {
136  if (is_null($this->orderNumber)) {
138  $data = $this->raw(self::FIELD_ORDER_NUMBER);
139  if (is_null($data)) {
140  return null;
141  }
142  $this->orderNumber = (string) $data;
143  }
144 
145  return $this->orderNumber;
146  }
147 
154  public function getCustomerNumber()
155  {
156  if (is_null($this->customerNumber)) {
158  $data = $this->raw(self::FIELD_CUSTOMER_NUMBER);
159  if (is_null($data)) {
160  return null;
161  }
162  $this->customerNumber = (string) $data;
163  }
164 
165  return $this->customerNumber;
166  }
167 
174  public function getSku()
175  {
176  if (is_null($this->sku)) {
178  $data = $this->raw(self::FIELD_SKU);
179  if (is_null($data)) {
180  return null;
181  }
182  $this->sku = (string) $data;
183  }
184 
185  return $this->sku;
186  }
187 
194  public function getSlug()
195  {
196  if (is_null($this->slug)) {
198  $data = $this->raw(self::FIELD_SLUG);
199  if (is_null($data)) {
200  return null;
201  }
202 
203  $this->slug = LocalizedStringModel::of($data);
204  }
205 
206  return $this->slug;
207  }
208 
215  public function getContainerAndKey()
216  {
217  if (is_null($this->containerAndKey)) {
219  $data = $this->raw(self::FIELD_CONTAINER_AND_KEY);
220  if (is_null($data)) {
221  return null;
222  }
223 
224  $this->containerAndKey = ContainerAndKeyModel::of($data);
225  }
226 
227  return $this->containerAndKey;
228  }
229 
230 
234  public function setKey(?string $key): void
235  {
236  $this->key = $key;
237  }
238 
242  public function setExternalId(?string $externalId): void
243  {
244  $this->externalId = $externalId;
245  }
246 
250  public function setOrderNumber(?string $orderNumber): void
251  {
252  $this->orderNumber = $orderNumber;
253  }
254 
258  public function setCustomerNumber(?string $customerNumber): void
259  {
260  $this->customerNumber = $customerNumber;
261  }
262 
266  public function setSku(?string $sku): void
267  {
268  $this->sku = $sku;
269  }
270 
274  public function setSlug(?LocalizedString $slug): void
275  {
276  $this->slug = $slug;
277  }
278 
283  {
284  $this->containerAndKey = $containerAndKey;
285  }
286 }
__construct(?string $key=null, ?string $externalId=null, ?string $orderNumber=null, ?string $customerNumber=null, ?string $sku=null, ?LocalizedString $slug=null, ?ContainerAndKey $containerAndKey=null)
static of($data=null)
Definition: MapperMap.php:45