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
SubscriptionDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Subscription
;
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
SubscriptionDraftBuilder
implements
Builder
22
{
27
private
$changes;
28
33
private
$destination;
34
39
private
$key;
40
45
private
$messages;
46
51
private
$format;
52
59
public
function
getChanges
()
60
{
61
return
$this->changes;
62
}
63
70
public
function
getDestination
()
71
{
72
return
$this->destination instanceof
DestinationBuilder
? $this->destination->
build
() : $this->destination;
73
}
74
81
public
function
getKey
()
82
{
83
return
$this->key;
84
}
85
92
public
function
getMessages
()
93
{
94
return
$this->messages;
95
}
96
103
public
function
getFormat
()
104
{
105
return
$this->format instanceof
DeliveryFormatBuilder
? $this->format->
build
() : $this->format;
106
}
107
112
public
function
withChanges
(?
ChangeSubscriptionCollection
$changes)
113
{
114
$this->changes = $changes;
115
116
return
$this;
117
}
118
123
public
function
withDestination
(?
Destination
$destination)
124
{
125
$this->destination = $destination;
126
127
return
$this;
128
}
129
134
public
function
withKey
(?
string
$key)
135
{
136
$this->key = $key;
137
138
return
$this;
139
}
140
145
public
function
withMessages
(?
MessageSubscriptionCollection
$messages)
146
{
147
$this->messages = $messages;
148
149
return
$this;
150
}
151
156
public
function
withFormat
(?
DeliveryFormat
$format)
157
{
158
$this->format = $format;
159
160
return
$this;
161
}
162
167
public
function
withDestinationBuilder
(?
DestinationBuilder
$destination)
168
{
169
$this->destination = $destination;
170
171
return
$this;
172
}
173
178
public
function
withFormatBuilder
(?
DeliveryFormatBuilder
$format)
179
{
180
$this->format = $format;
181
182
return
$this;
183
}
184
185
public
function
build
():
SubscriptionDraft
186
{
187
return
new
SubscriptionDraftModel
(
188
$this->changes,
189
$this->destination instanceof
DestinationBuilder
? $this->destination->
build
() : $this->destination,
190
$this->key,
191
$this->messages,
192
$this->format instanceof
DeliveryFormatBuilder
? $this->format->
build
() : $this->format
193
);
194
}
195
196
public
static
function
of
():
SubscriptionDraftBuilder
197
{
198
return
new
self
();
199
}
200
}
Commercetools\Api\Models\Subscription\ChangeSubscriptionCollection
Definition
ChangeSubscriptionCollection.php:22
Commercetools\Api\Models\Subscription\DeliveryFormatBuilder
Definition
DeliveryFormatBuilder.php:22
Commercetools\Api\Models\Subscription\DeliveryFormatBuilder\build
build()
Definition
DeliveryFormatBuilder.php:23
Commercetools\Api\Models\Subscription\DestinationBuilder
Definition
DestinationBuilder.php:22
Commercetools\Api\Models\Subscription\DestinationBuilder\build
build()
Definition
DestinationBuilder.php:23
Commercetools\Api\Models\Subscription\MessageSubscriptionCollection
Definition
MessageSubscriptionCollection.php:22
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder
Definition
SubscriptionDraftBuilder.php:22
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withMessages
withMessages(?MessageSubscriptionCollection $messages)
Definition
SubscriptionDraftBuilder.php:145
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\getDestination
getDestination()
Definition
SubscriptionDraftBuilder.php:70
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\getMessages
getMessages()
Definition
SubscriptionDraftBuilder.php:92
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withFormatBuilder
withFormatBuilder(?DeliveryFormatBuilder $format)
Definition
SubscriptionDraftBuilder.php:178
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withKey
withKey(?string $key)
Definition
SubscriptionDraftBuilder.php:134
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withFormat
withFormat(?DeliveryFormat $format)
Definition
SubscriptionDraftBuilder.php:156
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\getChanges
getChanges()
Definition
SubscriptionDraftBuilder.php:59
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withDestinationBuilder
withDestinationBuilder(?DestinationBuilder $destination)
Definition
SubscriptionDraftBuilder.php:167
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\build
build()
Definition
SubscriptionDraftBuilder.php:185
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withChanges
withChanges(?ChangeSubscriptionCollection $changes)
Definition
SubscriptionDraftBuilder.php:112
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\getKey
getKey()
Definition
SubscriptionDraftBuilder.php:81
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\getFormat
getFormat()
Definition
SubscriptionDraftBuilder.php:103
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\withDestination
withDestination(?Destination $destination)
Definition
SubscriptionDraftBuilder.php:123
Commercetools\Api\Models\Subscription\SubscriptionDraftBuilder\of
static of()
Definition
SubscriptionDraftBuilder.php:196
Commercetools\Api\Models\Subscription\SubscriptionDraftModel
Definition
SubscriptionDraftModel.php:21
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Subscription\DeliveryFormat
Definition
DeliveryFormat.php:15
Commercetools\Api\Models\Subscription\Destination
Definition
Destination.php:15
Commercetools\Api\Models\Subscription\SubscriptionDraft
Definition
SubscriptionDraft.php:15
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