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
Event
BaseEventBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Event
;
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 DateTimeImmutable;
17
use stdClass;
18
22
final
class
BaseEventBuilder
implements
Builder
23
{
28
private
$id;
29
34
private
$notificationType;
35
40
private
$resourceType;
41
46
private
$type;
47
52
private
$data;
53
58
private
$createdAt;
59
66
public
function
getId
()
67
{
68
return
$this->id;
69
}
70
75
public
function
getNotificationType
()
76
{
77
return
$this->notificationType;
78
}
79
86
public
function
getResourceType
()
87
{
88
return
$this->resourceType;
89
}
90
97
public
function
getType
()
98
{
99
return
$this->type;
100
}
101
108
public
function
getData
()
109
{
110
return
$this->data;
111
}
112
119
public
function
getCreatedAt
()
120
{
121
return
$this->createdAt;
122
}
123
128
public
function
withId
(?
string
$id)
129
{
130
$this->
id
= $id;
131
132
return
$this;
133
}
134
139
public
function
withNotificationType
(?
string
$notificationType)
140
{
141
$this->notificationType = $notificationType;
142
143
return
$this;
144
}
145
150
public
function
withResourceType
(?
string
$resourceType)
151
{
152
$this->resourceType = $resourceType;
153
154
return
$this;
155
}
156
161
public
function
withType
(?
string
$type)
162
{
163
$this->type = $type;
164
165
return
$this;
166
}
167
172
public
function
withData
(?
JsonObject
$data)
173
{
174
$this->data = $data;
175
176
return
$this;
177
}
178
183
public
function
withCreatedAt
(?DateTimeImmutable $createdAt)
184
{
185
$this->createdAt = $createdAt;
186
187
return
$this;
188
}
189
190
191
public
function
build
():
BaseEvent
192
{
193
return
new
BaseEventModel
(
194
$this->
id
,
195
$this->notificationType,
196
$this->resourceType,
197
$this->type,
198
$this->data,
199
$this->createdAt
200
);
201
}
202
203
public
static
function
of
():
BaseEventBuilder
204
{
205
return
new
self
();
206
}
207
}
Commercetools\Api\Models\Event\BaseEventBuilder
Definition
BaseEventBuilder.php:23
Commercetools\Api\Models\Event\BaseEventBuilder\getId
getId()
Definition
BaseEventBuilder.php:66
Commercetools\Api\Models\Event\BaseEventBuilder\getData
getData()
Definition
BaseEventBuilder.php:108
Commercetools\Api\Models\Event\BaseEventBuilder\withNotificationType
withNotificationType(?string $notificationType)
Definition
BaseEventBuilder.php:139
Commercetools\Api\Models\Event\BaseEventBuilder\build
build()
Definition
BaseEventBuilder.php:191
Commercetools\Api\Models\Event\BaseEventBuilder\getResourceType
getResourceType()
Definition
BaseEventBuilder.php:86
Commercetools\Api\Models\Event\BaseEventBuilder\withData
withData(?JsonObject $data)
Definition
BaseEventBuilder.php:172
Commercetools\Api\Models\Event\BaseEventBuilder\getNotificationType
getNotificationType()
Definition
BaseEventBuilder.php:75
Commercetools\Api\Models\Event\BaseEventBuilder\withId
withId(?string $id)
Definition
BaseEventBuilder.php:128
Commercetools\Api\Models\Event\BaseEventBuilder\getCreatedAt
getCreatedAt()
Definition
BaseEventBuilder.php:119
Commercetools\Api\Models\Event\BaseEventBuilder\withResourceType
withResourceType(?string $resourceType)
Definition
BaseEventBuilder.php:150
Commercetools\Api\Models\Event\BaseEventBuilder\of
static of()
Definition
BaseEventBuilder.php:203
Commercetools\Api\Models\Event\BaseEventBuilder\getType
getType()
Definition
BaseEventBuilder.php:97
Commercetools\Api\Models\Event\BaseEventBuilder\withCreatedAt
withCreatedAt(?DateTimeImmutable $createdAt)
Definition
BaseEventBuilder.php:183
Commercetools\Api\Models\Event\BaseEventBuilder\withType
withType(?string $type)
Definition
BaseEventBuilder.php:161
Commercetools\Api\Models\Event\BaseEventModel
Definition
BaseEventModel.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\Event\BaseEvent
Definition
BaseEvent.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Event
Definition
BaseEvent.php:9
Generated by
1.9.8