commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
ReviewRatingSetMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Common\Reference
;
12
use
Commercetools\Api\Models\Common\ReferenceBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
ReviewRatingSetMessagePayloadBuilder
implements
Builder
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
148
public
function
build
():
ReviewRatingSetMessagePayload
149
{
150
return
new
ReviewRatingSetMessagePayloadModel
(
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
}
Commercetools\Api\Models\Common\ReferenceBuilder
Definition:
ReferenceBuilder.php:92
Commercetools\Api\Models\Common\ReferenceBuilder\build
build()
Definition:
ReferenceBuilder.php:122
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder
Definition:
ReviewRatingSetMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\of
static of()
Definition:
ReviewRatingSetMessagePayloadBuilder.php:158
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\withTargetBuilder
withTargetBuilder(?ReferenceBuilder $target)
Definition:
ReviewRatingSetMessagePayloadBuilder.php:141
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\build
build()
Definition:
ReviewRatingSetMessagePayloadBuilder.php:148
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\getOldRating
getOldRating()
Definition:
ReviewRatingSetMessagePayloadBuilder.php:55
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\getIncludedInStatistics
getIncludedInStatistics()
Definition:
ReviewRatingSetMessagePayloadBuilder.php:77
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\withOldRating
withOldRating(?float $oldRating)
Definition:
ReviewRatingSetMessagePayloadBuilder.php:97
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\getTarget
getTarget()
Definition:
ReviewRatingSetMessagePayloadBuilder.php:88
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\getNewRating
getNewRating()
Definition:
ReviewRatingSetMessagePayloadBuilder.php:66
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\withTarget
withTarget(?Reference $target)
Definition:
ReviewRatingSetMessagePayloadBuilder.php:130
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\withNewRating
withNewRating(?float $newRating)
Definition:
ReviewRatingSetMessagePayloadBuilder.php:108
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadBuilder\withIncludedInStatistics
withIncludedInStatistics(?bool $includedInStatistics)
Definition:
ReviewRatingSetMessagePayloadBuilder.php:119
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayloadModel
Definition:
ReviewRatingSetMessagePayloadModel.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Common\Reference
Definition:
Reference.php:50
Commercetools\Api\Models\Message\ReviewRatingSetMessagePayload
Definition:
ReviewRatingSetMessagePayload.php:16
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Message
Definition:
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.1