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
DeliveryPayloadBuilder.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 stdClass;
21
25
final
class
DeliveryPayloadBuilder
implements
Builder
26
{
31
private
$projectKey;
32
37
private
$resource;
38
43
private
$resourceUserProvidedIdentifiers;
44
52
public
function
getProjectKey
()
53
{
54
return
$this->projectKey;
55
}
56
63
public
function
getResource
()
64
{
65
return
$this->resource instanceof
ReferenceBuilder
? $this->resource->
build
() : $this->resource;
66
}
67
74
public
function
getResourceUserProvidedIdentifiers
()
75
{
76
return
$this->resourceUserProvidedIdentifiers instanceof
UserProvidedIdentifiersBuilder
? $this->resourceUserProvidedIdentifiers->
build
() : $this->resourceUserProvidedIdentifiers;
77
}
78
83
public
function
withProjectKey
(?
string
$projectKey)
84
{
85
$this->projectKey = $projectKey;
86
87
return
$this;
88
}
89
94
public
function
withResource
(?
Reference
$resource)
95
{
96
$this->resource = $resource;
97
98
return
$this;
99
}
100
105
public
function
withResourceUserProvidedIdentifiers
(?
UserProvidedIdentifiers
$resourceUserProvidedIdentifiers)
106
{
107
$this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
108
109
return
$this;
110
}
111
116
public
function
withResourceBuilder
(?
ReferenceBuilder
$resource)
117
{
118
$this->resource = $resource;
119
120
return
$this;
121
}
122
127
public
function
withResourceUserProvidedIdentifiersBuilder
(?
UserProvidedIdentifiersBuilder
$resourceUserProvidedIdentifiers)
128
{
129
$this->resourceUserProvidedIdentifiers = $resourceUserProvidedIdentifiers;
130
131
return
$this;
132
}
133
134
public
function
build
():
DeliveryPayload
135
{
136
return
new
DeliveryPayloadModel
(
137
$this->projectKey,
138
$this->resource instanceof
ReferenceBuilder
? $this->resource->
build
() : $this->resource,
139
$this->resourceUserProvidedIdentifiers instanceof
UserProvidedIdentifiersBuilder
? $this->resourceUserProvidedIdentifiers->
build
() : $this->resourceUserProvidedIdentifiers
140
);
141
}
142
143
public
static
function
of
():
DeliveryPayloadBuilder
144
{
145
return
new
self
();
146
}
147
}
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\DeliveryPayloadBuilder
Definition
DeliveryPayloadBuilder.php:26
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\of
static of()
Definition
DeliveryPayloadBuilder.php:143
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\getProjectKey
getProjectKey()
Definition
DeliveryPayloadBuilder.php:52
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\build
build()
Definition
DeliveryPayloadBuilder.php:134
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\getResource
getResource()
Definition
DeliveryPayloadBuilder.php:63
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\withResourceUserProvidedIdentifiersBuilder
withResourceUserProvidedIdentifiersBuilder(?UserProvidedIdentifiersBuilder $resourceUserProvidedIdentifiers)
Definition
DeliveryPayloadBuilder.php:127
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\getResourceUserProvidedIdentifiers
getResourceUserProvidedIdentifiers()
Definition
DeliveryPayloadBuilder.php:74
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\withResourceUserProvidedIdentifiers
withResourceUserProvidedIdentifiers(?UserProvidedIdentifiers $resourceUserProvidedIdentifiers)
Definition
DeliveryPayloadBuilder.php:105
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\withResource
withResource(?Reference $resource)
Definition
DeliveryPayloadBuilder.php:94
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\withProjectKey
withProjectKey(?string $projectKey)
Definition
DeliveryPayloadBuilder.php:83
Commercetools\Api\Models\Subscription\DeliveryPayloadBuilder\withResourceBuilder
withResourceBuilder(?ReferenceBuilder $resource)
Definition
DeliveryPayloadBuilder.php:116
Commercetools\Api\Models\Subscription\DeliveryPayloadModel
Definition
DeliveryPayloadModel.php:25
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\DeliveryPayload
Definition
DeliveryPayload.php:17
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