commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartLockBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use DateTimeImmutable;
17use stdClass;
18
22final class CartLockBuilder implements Builder
23{
28 private $createdAt;
29
34 private $clientId;
35
42 public function getCreatedAt()
43 {
44 return $this->createdAt;
45 }
46
53 public function getClientId()
54 {
55 return $this->clientId;
56 }
57
62 public function withCreatedAt(?DateTimeImmutable $createdAt)
63 {
64 $this->createdAt = $createdAt;
65
66 return $this;
67 }
68
73 public function withClientId(?string $clientId)
74 {
75 $this->clientId = $clientId;
76
77 return $this;
78 }
79
80
81 public function build(): CartLock
82 {
83 return new CartLockModel(
84 $this->createdAt,
85 $this->clientId
86 );
87 }
88
89 public static function of(): CartLockBuilder
90 {
91 return new self();
92 }
93}
withCreatedAt(?DateTimeImmutable $createdAt)