commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
CartDiscount
MultiBuyLineItemsTargetBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\CartDiscount
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
21
final
class
MultiBuyLineItemsTargetBuilder
implements
Builder
22
{
27
private
$predicate;
28
33
private
$triggerQuantity;
34
39
private
$discountedQuantity;
40
45
private
$maxOccurrence;
46
51
private
$selectionMode;
52
59
public
function
getPredicate
()
60
{
61
return
$this->predicate;
62
}
63
70
public
function
getTriggerQuantity
()
71
{
72
return
$this->triggerQuantity;
73
}
74
82
public
function
getDiscountedQuantity
()
83
{
84
return
$this->discountedQuantity;
85
}
86
94
public
function
getMaxOccurrence
()
95
{
96
return
$this->maxOccurrence;
97
}
98
105
public
function
getSelectionMode
()
106
{
107
return
$this->selectionMode;
108
}
109
114
public
function
withPredicate
(?
string
$predicate)
115
{
116
$this->predicate = $predicate;
117
118
return
$this;
119
}
120
125
public
function
withTriggerQuantity
(?
int
$triggerQuantity)
126
{
127
$this->triggerQuantity = $triggerQuantity;
128
129
return
$this;
130
}
131
136
public
function
withDiscountedQuantity
(?
int
$discountedQuantity)
137
{
138
$this->discountedQuantity = $discountedQuantity;
139
140
return
$this;
141
}
142
147
public
function
withMaxOccurrence
(?
int
$maxOccurrence)
148
{
149
$this->maxOccurrence = $maxOccurrence;
150
151
return
$this;
152
}
153
158
public
function
withSelectionMode
(?
string
$selectionMode)
159
{
160
$this->selectionMode = $selectionMode;
161
162
return
$this;
163
}
164
165
166
public
function
build
():
MultiBuyLineItemsTarget
167
{
168
return
new
MultiBuyLineItemsTargetModel
(
169
$this->predicate,
170
$this->triggerQuantity,
171
$this->discountedQuantity,
172
$this->maxOccurrence,
173
$this->selectionMode
174
);
175
}
176
177
public
static
function
of
():
MultiBuyLineItemsTargetBuilder
178
{
179
return
new
self
();
180
}
181
}
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder
Definition
MultiBuyLineItemsTargetBuilder.php:22
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\withMaxOccurrence
withMaxOccurrence(?int $maxOccurrence)
Definition
MultiBuyLineItemsTargetBuilder.php:147
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\of
static of()
Definition
MultiBuyLineItemsTargetBuilder.php:177
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\build
build()
Definition
MultiBuyLineItemsTargetBuilder.php:166
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\withPredicate
withPredicate(?string $predicate)
Definition
MultiBuyLineItemsTargetBuilder.php:114
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\withTriggerQuantity
withTriggerQuantity(?int $triggerQuantity)
Definition
MultiBuyLineItemsTargetBuilder.php:125
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\getPredicate
getPredicate()
Definition
MultiBuyLineItemsTargetBuilder.php:59
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\getDiscountedQuantity
getDiscountedQuantity()
Definition
MultiBuyLineItemsTargetBuilder.php:82
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\getTriggerQuantity
getTriggerQuantity()
Definition
MultiBuyLineItemsTargetBuilder.php:70
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\withSelectionMode
withSelectionMode(?string $selectionMode)
Definition
MultiBuyLineItemsTargetBuilder.php:158
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\getSelectionMode
getSelectionMode()
Definition
MultiBuyLineItemsTargetBuilder.php:105
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\withDiscountedQuantity
withDiscountedQuantity(?int $discountedQuantity)
Definition
MultiBuyLineItemsTargetBuilder.php:136
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetBuilder\getMaxOccurrence
getMaxOccurrence()
Definition
MultiBuyLineItemsTargetBuilder.php:94
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTargetModel
Definition
MultiBuyLineItemsTargetModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\CartDiscount\MultiBuyLineItemsTarget
Definition
MultiBuyLineItemsTarget.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\CartDiscount
Definition
CartDiscount.php:9
Generated by
1.9.8