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
ApprovalRule
ApprovalRuleDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\ApprovalRule
;
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
ApprovalRuleDraftBuilder
implements
Builder
22
{
27
private
$key;
28
33
private
$name;
34
39
private
$description;
40
45
private
$status;
46
51
private
$predicate;
52
57
private
$approvers;
58
63
private
$requesters;
64
71
public
function
getKey
()
72
{
73
return
$this->key;
74
}
75
82
public
function
getName
()
83
{
84
return
$this->name;
85
}
86
93
public
function
getDescription
()
94
{
95
return
$this->description;
96
}
97
104
public
function
getStatus
()
105
{
106
return
$this->status;
107
}
108
115
public
function
getPredicate
()
116
{
117
return
$this->predicate;
118
}
119
126
public
function
getApprovers
()
127
{
128
return
$this->approvers instanceof
ApproverHierarchyDraftBuilder
? $this->approvers->
build
() : $this->approvers;
129
}
130
137
public
function
getRequesters
()
138
{
139
return
$this->requesters;
140
}
141
146
public
function
withKey
(?
string
$key)
147
{
148
$this->key = $key;
149
150
return
$this;
151
}
152
157
public
function
withName
(?
string
$name)
158
{
159
$this->name = $name;
160
161
return
$this;
162
}
163
168
public
function
withDescription
(?
string
$description)
169
{
170
$this->description = $description;
171
172
return
$this;
173
}
174
179
public
function
withStatus
(?
string
$status)
180
{
181
$this->status = $status;
182
183
return
$this;
184
}
185
190
public
function
withPredicate
(?
string
$predicate)
191
{
192
$this->predicate = $predicate;
193
194
return
$this;
195
}
196
201
public
function
withApprovers
(?
ApproverHierarchyDraft
$approvers)
202
{
203
$this->approvers = $approvers;
204
205
return
$this;
206
}
207
212
public
function
withRequesters
(?
RuleRequesterDraftCollection
$requesters)
213
{
214
$this->requesters = $requesters;
215
216
return
$this;
217
}
218
223
public
function
withApproversBuilder
(?
ApproverHierarchyDraftBuilder
$approvers)
224
{
225
$this->approvers = $approvers;
226
227
return
$this;
228
}
229
230
public
function
build
():
ApprovalRuleDraft
231
{
232
return
new
ApprovalRuleDraftModel
(
233
$this->key,
234
$this->name,
235
$this->description,
236
$this->status,
237
$this->predicate,
238
$this->approvers instanceof
ApproverHierarchyDraftBuilder
? $this->approvers->
build
() : $this->approvers,
239
$this->requesters
240
);
241
}
242
243
public
static
function
of
():
ApprovalRuleDraftBuilder
244
{
245
return
new
self
();
246
}
247
}
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder
Definition
ApprovalRuleDraftBuilder.php:22
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\of
static of()
Definition
ApprovalRuleDraftBuilder.php:243
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getDescription
getDescription()
Definition
ApprovalRuleDraftBuilder.php:93
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getKey
getKey()
Definition
ApprovalRuleDraftBuilder.php:71
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withName
withName(?string $name)
Definition
ApprovalRuleDraftBuilder.php:157
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\build
build()
Definition
ApprovalRuleDraftBuilder.php:230
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withRequesters
withRequesters(?RuleRequesterDraftCollection $requesters)
Definition
ApprovalRuleDraftBuilder.php:212
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getApprovers
getApprovers()
Definition
ApprovalRuleDraftBuilder.php:126
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withApproversBuilder
withApproversBuilder(?ApproverHierarchyDraftBuilder $approvers)
Definition
ApprovalRuleDraftBuilder.php:223
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withDescription
withDescription(?string $description)
Definition
ApprovalRuleDraftBuilder.php:168
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getRequesters
getRequesters()
Definition
ApprovalRuleDraftBuilder.php:137
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withKey
withKey(?string $key)
Definition
ApprovalRuleDraftBuilder.php:146
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getName
getName()
Definition
ApprovalRuleDraftBuilder.php:82
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getStatus
getStatus()
Definition
ApprovalRuleDraftBuilder.php:104
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withPredicate
withPredicate(?string $predicate)
Definition
ApprovalRuleDraftBuilder.php:190
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withApprovers
withApprovers(?ApproverHierarchyDraft $approvers)
Definition
ApprovalRuleDraftBuilder.php:201
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\withStatus
withStatus(?string $status)
Definition
ApprovalRuleDraftBuilder.php:179
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftBuilder\getPredicate
getPredicate()
Definition
ApprovalRuleDraftBuilder.php:115
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraftModel
Definition
ApprovalRuleDraftModel.php:21
Commercetools\Api\Models\ApprovalRule\ApproverHierarchyDraftBuilder
Definition
ApproverHierarchyDraftBuilder.php:22
Commercetools\Api\Models\ApprovalRule\ApproverHierarchyDraftBuilder\build
build()
Definition
ApproverHierarchyDraftBuilder.php:52
Commercetools\Api\Models\ApprovalRule\RuleRequesterDraftCollection
Definition
RuleRequesterDraftCollection.php:22
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\ApprovalRule\ApprovalRuleDraft
Definition
ApprovalRuleDraft.php:15
Commercetools\Api\Models\ApprovalRule\ApproverHierarchyDraft
Definition
ApproverHierarchyDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\ApprovalRule
Definition
ApprovalRule.php:9
Generated by
1.9.8