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
OrderEdit
OrderEditDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\OrderEdit
;
10
11
use
Commercetools\Api\Models\Order\OrderReference
;
12
use
Commercetools\Api\Models\Order\OrderReferenceBuilder
;
13
use
Commercetools\Api\Models\Order\StagedOrderUpdateActionCollection
;
14
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
15
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
16
use
Commercetools\Base\Builder
;
17
use
Commercetools\Base\DateTimeImmutableCollection
;
18
use
Commercetools\Base\JsonObject
;
19
use
Commercetools\Base\JsonObjectModel
;
20
use
Commercetools\Base\MapperFactory
;
21
use stdClass;
22
26
final
class
OrderEditDraftBuilder
implements
Builder
27
{
32
private
$key;
33
38
private
$resource;
39
44
private
$stagedActions;
45
50
private
$custom;
51
56
private
$comment;
57
62
private
$dryRun;
63
70
public
function
getKey
()
71
{
72
return
$this->key;
73
}
74
81
public
function
getResource
()
82
{
83
return
$this->resource instanceof
OrderReferenceBuilder
? $this->resource->
build
() : $this->resource;
84
}
85
93
public
function
getStagedActions
()
94
{
95
return
$this->stagedActions;
96
}
97
104
public
function
getCustom
()
105
{
106
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
107
}
108
115
public
function
getComment
()
116
{
117
return
$this->comment;
118
}
119
128
public
function
getDryRun
()
129
{
130
return
$this->dryRun;
131
}
132
137
public
function
withKey
(?
string
$key)
138
{
139
$this->key = $key;
140
141
return
$this;
142
}
143
148
public
function
withResource
(?
OrderReference
$resource)
149
{
150
$this->resource = $resource;
151
152
return
$this;
153
}
154
159
public
function
withStagedActions
(?
StagedOrderUpdateActionCollection
$stagedActions)
160
{
161
$this->stagedActions = $stagedActions;
162
163
return
$this;
164
}
165
170
public
function
withCustom
(?
CustomFieldsDraft
$custom)
171
{
172
$this->custom = $custom;
173
174
return
$this;
175
}
176
181
public
function
withComment
(?
string
$comment)
182
{
183
$this->comment = $comment;
184
185
return
$this;
186
}
187
192
public
function
withDryRun
(?
bool
$dryRun)
193
{
194
$this->dryRun = $dryRun;
195
196
return
$this;
197
}
198
203
public
function
withResourceBuilder
(?
OrderReferenceBuilder
$resource)
204
{
205
$this->resource = $resource;
206
207
return
$this;
208
}
209
214
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
215
{
216
$this->custom = $custom;
217
218
return
$this;
219
}
220
221
public
function
build
():
OrderEditDraft
222
{
223
return
new
OrderEditDraftModel
(
224
$this->key,
225
$this->resource instanceof
OrderReferenceBuilder
? $this->resource->
build
() : $this->resource,
226
$this->stagedActions,
227
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom,
228
$this->comment,
229
$this->dryRun
230
);
231
}
232
233
public
static
function
of
():
OrderEditDraftBuilder
234
{
235
return
new
self
();
236
}
237
}
Commercetools\Api\Models\Order\OrderReferenceBuilder
Definition
OrderReferenceBuilder.php:24
Commercetools\Api\Models\Order\OrderReferenceBuilder\build
build()
Definition
OrderReferenceBuilder.php:92
Commercetools\Api\Models\Order\StagedOrderUpdateActionCollection
Definition
StagedOrderUpdateActionCollection.php:26
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder
Definition
OrderEditDraftBuilder.php:27
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\getResource
getResource()
Definition
OrderEditDraftBuilder.php:81
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withResource
withResource(?OrderReference $resource)
Definition
OrderEditDraftBuilder.php:148
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\of
static of()
Definition
OrderEditDraftBuilder.php:233
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\getCustom
getCustom()
Definition
OrderEditDraftBuilder.php:104
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withKey
withKey(?string $key)
Definition
OrderEditDraftBuilder.php:137
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withDryRun
withDryRun(?bool $dryRun)
Definition
OrderEditDraftBuilder.php:192
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\getKey
getKey()
Definition
OrderEditDraftBuilder.php:70
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\getStagedActions
getStagedActions()
Definition
OrderEditDraftBuilder.php:93
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withResourceBuilder
withResourceBuilder(?OrderReferenceBuilder $resource)
Definition
OrderEditDraftBuilder.php:203
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\getDryRun
getDryRun()
Definition
OrderEditDraftBuilder.php:128
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
OrderEditDraftBuilder.php:170
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\getComment
getComment()
Definition
OrderEditDraftBuilder.php:115
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withStagedActions
withStagedActions(?StagedOrderUpdateActionCollection $stagedActions)
Definition
OrderEditDraftBuilder.php:159
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
OrderEditDraftBuilder.php:214
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\build
build()
Definition
OrderEditDraftBuilder.php:221
Commercetools\Api\Models\OrderEdit\OrderEditDraftBuilder\withComment
withComment(?string $comment)
Definition
OrderEditDraftBuilder.php:181
Commercetools\Api\Models\OrderEdit\OrderEditDraftModel
Definition
OrderEditDraftModel.php:26
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition
CustomFieldsDraftBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Order\OrderReference
Definition
OrderReference.php:16
Commercetools\Api\Models\OrderEdit\OrderEditDraft
Definition
OrderEditDraft.php:18
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition
CustomFieldsDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\OrderEdit
Definition
OrderEdit.php:9
Generated by
1.9.8