commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ReviewRatingSetMessagePayloadBuilder.php
1<?php
2
3declare(strict_types=1);
10
18use stdClass;
19
24{
29 private $oldRating;
30
35 private $newRating;
36
41 private $includedInStatistics;
42
47 private $target;
48
55 public function getOldRating()
56 {
57 return $this->oldRating;
58 }
59
66 public function getNewRating()
67 {
68 return $this->newRating;
69 }
70
77 public function getIncludedInStatistics()
78 {
79 return $this->includedInStatistics;
80 }
81
88 public function getTarget()
89 {
90 return $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target;
91 }
92
97 public function withOldRating(?float $oldRating)
98 {
99 $this->oldRating = $oldRating;
100
101 return $this;
102 }
103
108 public function withNewRating(?float $newRating)
109 {
110 $this->newRating = $newRating;
111
112 return $this;
113 }
114
119 public function withIncludedInStatistics(?bool $includedInStatistics)
120 {
121 $this->includedInStatistics = $includedInStatistics;
122
123 return $this;
124 }
125
130 public function withTarget(?Reference $target)
131 {
132 $this->target = $target;
133
134 return $this;
135 }
136
141 public function withTargetBuilder(?ReferenceBuilder $target)
142 {
143 $this->target = $target;
144
145 return $this;
146 }
147
149 {
151 $this->oldRating,
152 $this->newRating,
153 $this->includedInStatistics,
154 $this->target instanceof ReferenceBuilder ? $this->target->build() : $this->target
155 );
156 }
157
158 public static function of(): ReviewRatingSetMessagePayloadBuilder
159 {
160 return new self();
161 }
162}