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
CartDiscountPatternTargetBuilder.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
CartDiscountPatternTargetBuilder
implements
Builder
22
{
27
private
$triggerPattern;
28
33
private
$targetPattern;
34
39
private
$maxOccurrence;
40
45
private
$selectionMode;
46
56
public
function
getTriggerPattern
()
57
{
58
return
$this->triggerPattern;
59
}
60
68
public
function
getTargetPattern
()
69
{
70
return
$this->targetPattern;
71
}
72
80
public
function
getMaxOccurrence
()
81
{
82
return
$this->maxOccurrence;
83
}
84
91
public
function
getSelectionMode
()
92
{
93
return
$this->selectionMode;
94
}
95
100
public
function
withTriggerPattern
(?
PatternComponentCollection
$triggerPattern)
101
{
102
$this->triggerPattern = $triggerPattern;
103
104
return
$this;
105
}
106
111
public
function
withTargetPattern
(?
PatternComponentCollection
$targetPattern)
112
{
113
$this->targetPattern = $targetPattern;
114
115
return
$this;
116
}
117
122
public
function
withMaxOccurrence
(?
int
$maxOccurrence)
123
{
124
$this->maxOccurrence = $maxOccurrence;
125
126
return
$this;
127
}
128
133
public
function
withSelectionMode
(?
string
$selectionMode)
134
{
135
$this->selectionMode = $selectionMode;
136
137
return
$this;
138
}
139
140
141
public
function
build
():
CartDiscountPatternTarget
142
{
143
return
new
CartDiscountPatternTargetModel
(
144
$this->triggerPattern,
145
$this->targetPattern,
146
$this->maxOccurrence,
147
$this->selectionMode
148
);
149
}
150
151
public
static
function
of
():
CartDiscountPatternTargetBuilder
152
{
153
return
new
self
();
154
}
155
}
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder
Definition
CartDiscountPatternTargetBuilder.php:22
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\withMaxOccurrence
withMaxOccurrence(?int $maxOccurrence)
Definition
CartDiscountPatternTargetBuilder.php:122
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\getTargetPattern
getTargetPattern()
Definition
CartDiscountPatternTargetBuilder.php:68
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\getTriggerPattern
getTriggerPattern()
Definition
CartDiscountPatternTargetBuilder.php:56
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\getMaxOccurrence
getMaxOccurrence()
Definition
CartDiscountPatternTargetBuilder.php:80
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\withSelectionMode
withSelectionMode(?string $selectionMode)
Definition
CartDiscountPatternTargetBuilder.php:133
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\of
static of()
Definition
CartDiscountPatternTargetBuilder.php:151
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\getSelectionMode
getSelectionMode()
Definition
CartDiscountPatternTargetBuilder.php:91
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\withTargetPattern
withTargetPattern(?PatternComponentCollection $targetPattern)
Definition
CartDiscountPatternTargetBuilder.php:111
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\withTriggerPattern
withTriggerPattern(?PatternComponentCollection $triggerPattern)
Definition
CartDiscountPatternTargetBuilder.php:100
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetBuilder\build
build()
Definition
CartDiscountPatternTargetBuilder.php:141
Commercetools\Api\Models\CartDiscount\CartDiscountPatternTargetModel
Definition
CartDiscountPatternTargetModel.php:21
Commercetools\Api\Models\CartDiscount\PatternComponentCollection
Definition
PatternComponentCollection.php:26
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\CartDiscountPatternTarget
Definition
CartDiscountPatternTarget.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