commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartDiscountPatternTargetBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
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
142 {
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}