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
Subscription
ResourceCreatedDeliveryPayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Subscription
;
10
11
use
Commercetools\Api\Models\Common\Reference
;
12
use
Commercetools\Api\Models\Common\ReferenceBuilder
;
13
use
Commercetools\Api\Models\Message\UserProvidedIdentifiers
;
14
use
Commercetools\Api\Models\Message\UserProvidedIdentifiersBuilder
;
15
use
Commercetools\Base\Builder
;
16
use
Commercetools\Base\DateTimeImmutableCollection
;
17
use
Commercetools\Base\JsonObject
;
18
use
Commercetools\Base\JsonObjectModel
;
19
use
Commercetools\Base\MapperFactory
;
20
use DateTimeImmutable;
21
use stdClass;
22
26
final
class
ResourceCreatedDeliveryPayloadBuilder
implements
Builder
27
{
32
private
$projectKey;
33
38
private
$resource;
39
44
private
$resourceUserProvidedIdentifiers;
45
50
private
$version;
51
56
private
$modifiedAt;
57
65
public
function
getProjectKey
()
66
{
67
return
$this->projectKey;
68
}
69
76
public
function
getResource
()
77
{
78
return
$this->resource instanceof
ReferenceBuilder
? $this->resource->
build
() : $this->resource;
79
}
80
87
public
function
getResourceUserProvidedIdentifiers
()
88
{
89
return
$this->resourceUserProvidedIdentifiers instanceof
UserProvidedIdentifiersBuilder
? $this->resourceUserProvidedIdentifiers->
build
() : $this->resourceUserProvidedIdentifiers;
90
}
91
98
public
function
getVersion
()
99
{
100
return
$this->version;
101
}
102
109
public
function
getModifiedAt
()
110
{
111
return
$this->modifiedAt;
112
}
113
118
public
function
withProjectKey
(?
string
$projectKey)
119
{
120
$this->projectKey = $projectKey;
121
122
return
$this;
123
}
124
129
public
function
withResource
(?
Reference
$resource)
130
{
131
$this->resource = $resource;
132
133
return
$this;
134
}
135
140
public
function
withResourceUserProvidedIdentifiers
(?
UserProvidedIdentifiers
$resourceUserProvidedIdentifiers)
141
{
142
$this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
143
144
return
$this;
145
}
146
151
public
function
withVersion
(?
int
$version)
152
{
153
$this->version = $version;
154
155
return
$this;
156
}
157
162
public
function
withModifiedAt
(?DateTimeImmutable $modifiedAt)
163
{
164
$this->modifiedAt = $modifiedAt;
165
166
return
$this;
167
}
168
173
public
function
withResourceBuilder
(?
ReferenceBuilder
$resource)
174
{
175
$this->resource = $resource;
176
177
return
$this;
178
}
179
184
public
function
withResourceUserProvidedIdentifiersBuilder
(?
UserProvidedIdentifiersBuilder
$resourceUserProvidedIdentifiers)
185
{
186
$this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
187
188
return
$this;
189
}
190
191
public
function
build
():
ResourceCreatedDeliveryPayload
192
{
193
return
new
ResourceCreatedDeliveryPayloadModel
(
194
$this->projectKey,
195
$this->resource instanceof
ReferenceBuilder
? $this->resource->
build
() : $this->resource,
196
$this->resourceUserProvidedIdentifiers instanceof
UserProvidedIdentifiersBuilder
? $this->resourceUserProvidedIdentifiers->
build
() : $this->resourceUserProvidedIdentifiers,
197
$this->version,
198
$this->modifiedAt
199
);
200
}
201
202
public
static
function
of
():
ResourceCreatedDeliveryPayloadBuilder
203
{
204
return
new
self
();
205
}
206
}
Commercetools\Api\Models\Common\ReferenceBuilder
Definition
ReferenceBuilder.php:92
Commercetools\Api\Models\Common\ReferenceBuilder\build
build()
Definition
ReferenceBuilder.php:122
Commercetools\Api\Models\Message\UserProvidedIdentifiersBuilder
Definition
UserProvidedIdentifiersBuilder.php:24
Commercetools\Api\Models\Message\UserProvidedIdentifiersBuilder\build
build()
Definition
UserProvidedIdentifiersBuilder.php:243
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder
Definition
ResourceCreatedDeliveryPayloadBuilder.php:27
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\of
static of()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:202
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withResourceBuilder
withResourceBuilder(?ReferenceBuilder $resource)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:173
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\getResource
getResource()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:76
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\getProjectKey
getProjectKey()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:65
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\getResourceUserProvidedIdentifiers
getResourceUserProvidedIdentifiers()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:87
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withResource
withResource(?Reference $resource)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:129
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withProjectKey
withProjectKey(?string $projectKey)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:118
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\getModifiedAt
getModifiedAt()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:109
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withResourceUserProvidedIdentifiers
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:140
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\build
build()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:191
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withModifiedAt
withModifiedAt(?DateTimeImmutable $modifiedAt)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:162
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\getVersion
getVersion()
Definition
ResourceCreatedDeliveryPayloadBuilder.php:98
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withResourceUserProvidedIdentifiersBuilder
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:184
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadBuilder\withVersion
withVersion(?int $version)
Definition
ResourceCreatedDeliveryPayloadBuilder.php:151
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayloadModel
Definition
ResourceCreatedDeliveryPayloadModel.php:26
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\UserProvidedIdentifiers
Definition
UserProvidedIdentifiers.php:16
Commercetools\Api\Models\Subscription\ResourceCreatedDeliveryPayload
Definition
ResourceCreatedDeliveryPayload.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Subscription
Definition
AzureEventGridDestination.php:9
Generated by
1.9.8