commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
All Classes Namespaces Functions Variables Pages
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
69 public function getTargetPattern()
70 {
71 return $this->targetPattern;
72 }
73
81 public function getMaxOccurrence()
82 {
83 return $this->maxOccurrence;
84 }
85
92 public function getSelectionMode()
93 {
94 return $this->selectionMode;
95 }
96
101 public function withTriggerPattern(?PatternComponentCollection $triggerPattern)
102 {
103 $this->triggerPattern = $triggerPattern;
104
105 return $this;
106 }
107
112 public function withTargetPattern(?PatternComponentCollection $targetPattern)
113 {
114 $this->targetPattern = $targetPattern;
115
116 return $this;
117 }
118
123 public function withMaxOccurrence(?int $maxOccurrence)
124 {
125 $this->maxOccurrence = $maxOccurrence;
126
127 return $this;
128 }
129
134 public function withSelectionMode(?string $selectionMode)
135 {
136 $this->selectionMode = $selectionMode;
137
138 return $this;
139 }
140
141
143 {
145 $this->triggerPattern,
146 $this->targetPattern,
147 $this->maxOccurrence,
148 $this->selectionMode
149 );
150 }
151
152 public static function of(): CartDiscountPatternTargetBuilder
153 {
154 return new self();
155 }
156}