commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
PaymentStatusStateTransitionMessageBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
24 use DateTimeImmutable;
25 use stdClass;
26 
31 {
36  private $id;
37 
42  private $version;
43 
48  private $createdAt;
49 
54  private $lastModifiedAt;
55 
60  private $lastModifiedBy;
61 
66  private $createdBy;
67 
72  private $sequenceNumber;
73 
78  private $resource;
79 
84  private $resourceVersion;
85 
90  private $resourceUserProvidedIdentifiers;
91 
96  private $state;
97 
102  private $force;
103 
110  public function getId()
111  {
112  return $this->id;
113  }
114 
121  public function getVersion()
122  {
123  return $this->version;
124  }
125 
132  public function getCreatedAt()
133  {
134  return $this->createdAt;
135  }
136 
143  public function getLastModifiedAt()
144  {
145  return $this->lastModifiedAt;
146  }
147 
154  public function getLastModifiedBy()
155  {
156  return $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy;
157  }
158 
165  public function getCreatedBy()
166  {
167  return $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy;
168  }
169 
177  public function getSequenceNumber()
178  {
179  return $this->sequenceNumber;
180  }
181 
188  public function getResource()
189  {
190  return $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource;
191  }
192 
199  public function getResourceVersion()
200  {
201  return $this->resourceVersion;
202  }
203 
211  {
212  return $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers;
213  }
214 
221  public function getState()
222  {
223  return $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state;
224  }
225 
232  public function getForce()
233  {
234  return $this->force;
235  }
236 
241  public function withId(?string $id)
242  {
243  $this->id = $id;
244 
245  return $this;
246  }
247 
252  public function withVersion(?int $version)
253  {
254  $this->version = $version;
255 
256  return $this;
257  }
258 
263  public function withCreatedAt(?DateTimeImmutable $createdAt)
264  {
265  $this->createdAt = $createdAt;
266 
267  return $this;
268  }
269 
274  public function withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
275  {
276  $this->lastModifiedAt = $lastModifiedAt;
277 
278  return $this;
279  }
280 
285  public function withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
286  {
287  $this->lastModifiedBy = $lastModifiedBy;
288 
289  return $this;
290  }
291 
296  public function withCreatedBy(?CreatedBy $createdBy)
297  {
298  $this->createdBy = $createdBy;
299 
300  return $this;
301  }
302 
307  public function withSequenceNumber(?int $sequenceNumber)
308  {
309  $this->sequenceNumber = $sequenceNumber;
310 
311  return $this;
312  }
313 
318  public function withResource(?Reference $resource)
319  {
320  $this->resource = $resource;
321 
322  return $this;
323  }
324 
329  public function withResourceVersion(?int $resourceVersion)
330  {
331  $this->resourceVersion = $resourceVersion;
332 
333  return $this;
334  }
335 
340  public function withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
341  {
342  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
343 
344  return $this;
345  }
346 
351  public function withState(?StateReference $state)
352  {
353  $this->state = $state;
354 
355  return $this;
356  }
357 
362  public function withForce(?bool $force)
363  {
364  $this->force = $force;
365 
366  return $this;
367  }
368 
373  public function withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
374  {
375  $this->lastModifiedBy = $lastModifiedBy;
376 
377  return $this;
378  }
379 
384  public function withCreatedByBuilder(?CreatedByBuilder $createdBy)
385  {
386  $this->createdBy = $createdBy;
387 
388  return $this;
389  }
390 
395  public function withResourceBuilder(?ReferenceBuilder $resource)
396  {
397  $this->resource = $resource;
398 
399  return $this;
400  }
401 
406  public function withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
407  {
408  $this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
409 
410  return $this;
411  }
412 
417  public function withStateBuilder(?StateReferenceBuilder $state)
418  {
419  $this->state = $state;
420 
421  return $this;
422  }
423 
425  {
427  $this->id,
428  $this->version,
429  $this->createdAt,
430  $this->lastModifiedAt,
431  $this->lastModifiedBy instanceof LastModifiedByBuilder ? $this->lastModifiedBy->build() : $this->lastModifiedBy,
432  $this->createdBy instanceof CreatedByBuilder ? $this->createdBy->build() : $this->createdBy,
433  $this->sequenceNumber,
434  $this->resource instanceof ReferenceBuilder ? $this->resource->build() : $this->resource,
435  $this->resourceVersion,
436  $this->resourceUserProvidedIdentifiers instanceof UserProvidedIdentifiersBuilder ? $this->resourceUserProvidedIdentifiers->build() : $this->resourceUserProvidedIdentifiers,
437  $this->state instanceof StateReferenceBuilder ? $this->state->build() : $this->state,
438  $this->force
439  );
440  }
441 
443  {
444  return new self();
445  }
446 }
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)