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
Extension
ExtensionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Extension
;
10
11
use
Commercetools\Api\Models\Common\BaseResource
;
12
use
Commercetools\Api\Models\Common\BaseResourceBuilder
;
13
use
Commercetools\Api\Models\Common\CreatedBy
;
14
use
Commercetools\Api\Models\Common\CreatedByBuilder
;
15
use
Commercetools\Api\Models\Common\LastModifiedBy
;
16
use
Commercetools\Api\Models\Common\LastModifiedByBuilder
;
17
use
Commercetools\Base\Builder
;
18
use
Commercetools\Base\DateTimeImmutableCollection
;
19
use
Commercetools\Base\JsonObject
;
20
use
Commercetools\Base\JsonObjectModel
;
21
use
Commercetools\Base\MapperFactory
;
22
use DateTimeImmutable;
23
use stdClass;
24
28
final
class
ExtensionBuilder
implements
Builder
29
{
34
private
$id;
35
40
private
$version;
41
46
private
$createdAt;
47
52
private
$lastModifiedAt;
53
58
private
$lastModifiedBy;
59
64
private
$createdBy;
65
70
private
$key;
71
76
private
$destination;
77
82
private
$triggers;
83
88
private
$timeoutInMs;
89
96
public
function
getId
()
97
{
98
return
$this->id;
99
}
100
107
public
function
getVersion
()
108
{
109
return
$this->version;
110
}
111
118
public
function
getCreatedAt
()
119
{
120
return
$this->createdAt;
121
}
122
129
public
function
getLastModifiedAt
()
130
{
131
return
$this->lastModifiedAt;
132
}
133
140
public
function
getLastModifiedBy
()
141
{
142
return
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy;
143
}
144
151
public
function
getCreatedBy
()
152
{
153
return
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy;
154
}
155
162
public
function
getKey
()
163
{
164
return
$this->key;
165
}
166
173
public
function
getDestination
()
174
{
175
return
$this->destination instanceof
ExtensionDestinationBuilder
? $this->destination->
build
() : $this->destination;
176
}
177
184
public
function
getTriggers
()
185
{
186
return
$this->triggers;
187
}
188
197
public
function
getTimeoutInMs
()
198
{
199
return
$this->timeoutInMs;
200
}
201
206
public
function
withId
(?
string
$id)
207
{
208
$this->
id
= $id;
209
210
return
$this;
211
}
212
217
public
function
withVersion
(?
int
$version)
218
{
219
$this->version = $version;
220
221
return
$this;
222
}
223
228
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
229
{
230
$this->createdAt = $createdAt;
231
232
return
$this;
233
}
234
239
public
function
withLastModifiedAt
(?DateTimeImmutable $lastModifiedAt)
240
{
241
$this->lastModifiedAt = $lastModifiedAt;
242
243
return
$this;
244
}
245
250
public
function
withLastModifiedBy
(?
LastModifiedBy
$lastModifiedBy)
251
{
252
$this->lastModifiedBy = $lastModifiedBy;
253
254
return
$this;
255
}
256
261
public
function
withCreatedBy
(?
CreatedBy
$createdBy)
262
{
263
$this->createdBy = $createdBy;
264
265
return
$this;
266
}
267
272
public
function
withKey
(?
string
$key)
273
{
274
$this->key = $key;
275
276
return
$this;
277
}
278
283
public
function
withDestination
(?
ExtensionDestination
$destination)
284
{
285
$this->destination = $destination;
286
287
return
$this;
288
}
289
294
public
function
withTriggers
(?
ExtensionTriggerCollection
$triggers)
295
{
296
$this->triggers = $triggers;
297
298
return
$this;
299
}
300
305
public
function
withTimeoutInMs
(?
int
$timeoutInMs)
306
{
307
$this->timeoutInMs = $timeoutInMs;
308
309
return
$this;
310
}
311
316
public
function
withLastModifiedByBuilder
(?
LastModifiedByBuilder
$lastModifiedBy)
317
{
318
$this->lastModifiedBy = $lastModifiedBy;
319
320
return
$this;
321
}
322
327
public
function
withCreatedByBuilder
(?
CreatedByBuilder
$createdBy)
328
{
329
$this->createdBy = $createdBy;
330
331
return
$this;
332
}
333
338
public
function
withDestinationBuilder
(?
ExtensionDestinationBuilder
$destination)
339
{
340
$this->destination = $destination;
341
342
return
$this;
343
}
344
345
public
function
build
():
Extension
346
{
347
return
new
ExtensionModel
(
348
$this->
id
,
349
$this->version,
350
$this->createdAt,
351
$this->lastModifiedAt,
352
$this->lastModifiedBy instanceof
LastModifiedByBuilder
? $this->lastModifiedBy->
build
() : $this->lastModifiedBy,
353
$this->createdBy instanceof
CreatedByBuilder
? $this->createdBy->
build
() : $this->createdBy,
354
$this->key,
355
$this->destination instanceof
ExtensionDestinationBuilder
? $this->destination->
build
() : $this->destination,
356
$this->triggers,
357
$this->timeoutInMs
358
);
359
}
360
361
public
static
function
of
():
ExtensionBuilder
362
{
363
return
new
self
();
364
}
365
}
Commercetools\Api\Models\Common\BaseResourceBuilder
Definition
BaseResourceBuilder.php:491
Commercetools\Api\Models\Common\CreatedByBuilder
Definition
CreatedByBuilder.php:24
Commercetools\Api\Models\Common\CreatedByBuilder\build
build()
Definition
CreatedByBuilder.php:226
Commercetools\Api\Models\Common\LastModifiedByBuilder
Definition
LastModifiedByBuilder.php:24
Commercetools\Api\Models\Common\LastModifiedByBuilder\build
build()
Definition
LastModifiedByBuilder.php:226
Commercetools\Api\Models\Extension\ExtensionBuilder
Definition
ExtensionBuilder.php:29
Commercetools\Api\Models\Extension\ExtensionBuilder\getVersion
getVersion()
Definition
ExtensionBuilder.php:107
Commercetools\Api\Models\Extension\ExtensionBuilder\withCreatedBy
withCreatedBy(?CreatedBy $createdBy)
Definition
ExtensionBuilder.php:261
Commercetools\Api\Models\Extension\ExtensionBuilder\withDestinationBuilder
withDestinationBuilder(?ExtensionDestinationBuilder $destination)
Definition
ExtensionBuilder.php:338
Commercetools\Api\Models\Extension\ExtensionBuilder\withLastModifiedByBuilder
withLastModifiedByBuilder(?LastModifiedByBuilder $lastModifiedBy)
Definition
ExtensionBuilder.php:316
Commercetools\Api\Models\Extension\ExtensionBuilder\getLastModifiedAt
getLastModifiedAt()
Definition
ExtensionBuilder.php:129
Commercetools\Api\Models\Extension\ExtensionBuilder\getCreatedBy
getCreatedBy()
Definition
ExtensionBuilder.php:151
Commercetools\Api\Models\Extension\ExtensionBuilder\getTimeoutInMs
getTimeoutInMs()
Definition
ExtensionBuilder.php:197
Commercetools\Api\Models\Extension\ExtensionBuilder\getTriggers
getTriggers()
Definition
ExtensionBuilder.php:184
Commercetools\Api\Models\Extension\ExtensionBuilder\getId
getId()
Definition
ExtensionBuilder.php:96
Commercetools\Api\Models\Extension\ExtensionBuilder\withKey
withKey(?string $key)
Definition
ExtensionBuilder.php:272
Commercetools\Api\Models\Extension\ExtensionBuilder\withLastModifiedAt
withLastModifiedAt(?DateTimeImmutable $lastModifiedAt)
Definition
ExtensionBuilder.php:239
Commercetools\Api\Models\Extension\ExtensionBuilder\getKey
getKey()
Definition
ExtensionBuilder.php:162
Commercetools\Api\Models\Extension\ExtensionBuilder\of
static of()
Definition
ExtensionBuilder.php:361
Commercetools\Api\Models\Extension\ExtensionBuilder\getLastModifiedBy
getLastModifiedBy()
Definition
ExtensionBuilder.php:140
Commercetools\Api\Models\Extension\ExtensionBuilder\getCreatedAt
getCreatedAt()
Definition
ExtensionBuilder.php:118
Commercetools\Api\Models\Extension\ExtensionBuilder\withLastModifiedBy
withLastModifiedBy(?LastModifiedBy $lastModifiedBy)
Definition
ExtensionBuilder.php:250
Commercetools\Api\Models\Extension\ExtensionBuilder\withVersion
withVersion(?int $version)
Definition
ExtensionBuilder.php:217
Commercetools\Api\Models\Extension\ExtensionBuilder\withCreatedByBuilder
withCreatedByBuilder(?CreatedByBuilder $createdBy)
Definition
ExtensionBuilder.php:327
Commercetools\Api\Models\Extension\ExtensionBuilder\withDestination
withDestination(?ExtensionDestination $destination)
Definition
ExtensionBuilder.php:283
Commercetools\Api\Models\Extension\ExtensionBuilder\getDestination
getDestination()
Definition
ExtensionBuilder.php:173
Commercetools\Api\Models\Extension\ExtensionBuilder\withTimeoutInMs
withTimeoutInMs(?int $timeoutInMs)
Definition
ExtensionBuilder.php:305
Commercetools\Api\Models\Extension\ExtensionBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
ExtensionBuilder.php:228
Commercetools\Api\Models\Extension\ExtensionBuilder\withTriggers
withTriggers(?ExtensionTriggerCollection $triggers)
Definition
ExtensionBuilder.php:294
Commercetools\Api\Models\Extension\ExtensionBuilder\withId
withId(?string $id)
Definition
ExtensionBuilder.php:206
Commercetools\Api\Models\Extension\ExtensionBuilder\build
build()
Definition
ExtensionBuilder.php:345
Commercetools\Api\Models\Extension\ExtensionDestinationBuilder
Definition
ExtensionDestinationBuilder.php:22
Commercetools\Api\Models\Extension\ExtensionDestinationBuilder\build
build()
Definition
ExtensionDestinationBuilder.php:23
Commercetools\Api\Models\Extension\ExtensionModel
Definition
ExtensionModel.php:28
Commercetools\Api\Models\Extension\ExtensionTriggerCollection
Definition
ExtensionTriggerCollection.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\Common\BaseResource
Definition
BaseResource.php:250
Commercetools\Api\Models\Common\CreatedBy
Definition
CreatedBy.php:16
Commercetools\Api\Models\Common\LastModifiedBy
Definition
LastModifiedBy.php:16
Commercetools\Api\Models\Extension\ExtensionDestination
Definition
ExtensionDestination.php:15
Commercetools\Api\Models\Extension\Extension
Definition
Extension.php:19
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Extension
Definition
AuthorizationHeaderAuthentication.php:9
Generated by
1.9.8