commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Extension
ExtensionDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Extension
;
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
ExtensionDraftBuilder
implements
Builder
22
{
27
private
$key;
28
33
private
$destination;
34
39
private
$triggers;
40
45
private
$timeoutInMs;
46
53
public
function
getKey
()
54
{
55
return
$this->key;
56
}
57
64
public
function
getDestination
()
65
{
66
return
$this->destination instanceof
ExtensionDestinationBuilder
? $this->destination->
build
() : $this->destination;
67
}
68
75
public
function
getTriggers
()
76
{
77
return
$this->triggers;
78
}
79
90
public
function
getTimeoutInMs
()
91
{
92
return
$this->timeoutInMs;
93
}
94
99
public
function
withKey
(?
string
$key)
100
{
101
$this->key = $key;
102
103
return
$this;
104
}
105
110
public
function
withDestination
(?
ExtensionDestination
$destination)
111
{
112
$this->destination = $destination;
113
114
return
$this;
115
}
116
121
public
function
withTriggers
(?
ExtensionTriggerCollection
$triggers)
122
{
123
$this->triggers = $triggers;
124
125
return
$this;
126
}
127
132
public
function
withTimeoutInMs
(?
int
$timeoutInMs)
133
{
134
$this->timeoutInMs = $timeoutInMs;
135
136
return
$this;
137
}
138
143
public
function
withDestinationBuilder
(?
ExtensionDestinationBuilder
$destination)
144
{
145
$this->destination = $destination;
146
147
return
$this;
148
}
149
150
public
function
build
():
ExtensionDraft
151
{
152
return
new
ExtensionDraftModel
(
153
$this->key,
154
$this->destination instanceof
ExtensionDestinationBuilder
? $this->destination->
build
() : $this->destination,
155
$this->triggers,
156
$this->timeoutInMs
157
);
158
}
159
160
public
static
function
of
():
ExtensionDraftBuilder
161
{
162
return
new
self
();
163
}
164
}
Commercetools\Api\Models\Extension\ExtensionDestinationBuilder
Definition:
ExtensionDestinationBuilder.php:22
Commercetools\Api\Models\Extension\ExtensionDestinationBuilder\build
build()
Definition:
ExtensionDestinationBuilder.php:23
Commercetools\Api\Models\Extension\ExtensionDraftBuilder
Definition:
ExtensionDraftBuilder.php:22
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\withTimeoutInMs
withTimeoutInMs(?int $timeoutInMs)
Definition:
ExtensionDraftBuilder.php:132
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\getTimeoutInMs
getTimeoutInMs()
Definition:
ExtensionDraftBuilder.php:90
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\withKey
withKey(?string $key)
Definition:
ExtensionDraftBuilder.php:99
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\getDestination
getDestination()
Definition:
ExtensionDraftBuilder.php:64
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\getTriggers
getTriggers()
Definition:
ExtensionDraftBuilder.php:75
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\withTriggers
withTriggers(?ExtensionTriggerCollection $triggers)
Definition:
ExtensionDraftBuilder.php:121
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\withDestination
withDestination(?ExtensionDestination $destination)
Definition:
ExtensionDraftBuilder.php:110
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\getKey
getKey()
Definition:
ExtensionDraftBuilder.php:53
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\withDestinationBuilder
withDestinationBuilder(?ExtensionDestinationBuilder $destination)
Definition:
ExtensionDraftBuilder.php:143
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\build
build()
Definition:
ExtensionDraftBuilder.php:150
Commercetools\Api\Models\Extension\ExtensionDraftBuilder\of
static of()
Definition:
ExtensionDraftBuilder.php:160
Commercetools\Api\Models\Extension\ExtensionDraftModel
Definition:
ExtensionDraftModel.php:21
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\Extension\ExtensionDestination
Definition:
ExtensionDestination.php:15
Commercetools\Api\Models\Extension\ExtensionDraft
Definition:
ExtensionDraft.php:15
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.1