commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CountOnLineItemUnitsBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
22{
27 private $predicate;
28
33 private $minCount;
34
39 private $maxCount;
40
45 private $excludeCount;
46
53 public function getPredicate()
54 {
55 return $this->predicate;
56 }
57
64 public function getMinCount()
65 {
66 return $this->minCount;
67 }
68
78 public function getMaxCount()
79 {
80 return $this->maxCount;
81 }
82
93 public function getExcludeCount()
94 {
95 return $this->excludeCount;
96 }
97
102 public function withPredicate(?string $predicate)
103 {
104 $this->predicate = $predicate;
105
106 return $this;
107 }
108
113 public function withMinCount(?int $minCount)
114 {
115 $this->minCount = $minCount;
116
117 return $this;
118 }
119
124 public function withMaxCount(?int $maxCount)
125 {
126 $this->maxCount = $maxCount;
127
128 return $this;
129 }
130
135 public function withExcludeCount(?int $excludeCount)
136 {
137 $this->excludeCount = $excludeCount;
138
139 return $this;
140 }
141
142
143 public function build(): CountOnLineItemUnits
144 {
145 return new CountOnLineItemUnitsModel(
146 $this->predicate,
147 $this->minCount,
148 $this->maxCount,
149 $this->excludeCount
150 );
151 }
152
153 public static function of(): CountOnLineItemUnitsBuilder
154 {
155 return new self();
156 }
157}