commercetools-sdk-php-v2
master
The platform, import-api and ml-api PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
Orders
SyncInfoBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\Orders
;
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
Commercetools\Import\Models\Common\ChannelKeyReference
;
17
use
Commercetools\Import\Models\Common\ChannelKeyReferenceBuilder
;
18
use DateTimeImmutable;
19
use stdClass;
20
24
final
class
SyncInfoBuilder
implements
Builder
25
{
30
private
$channel;
31
36
private
$externalId;
37
42
private
$syncedAt;
43
50
public
function
getChannel
()
51
{
52
return
$this->channel instanceof
ChannelKeyReferenceBuilder
? $this->channel->
build
() : $this->channel;
53
}
54
61
public
function
getExternalId
()
62
{
63
return
$this->externalId;
64
}
65
72
public
function
getSyncedAt
()
73
{
74
return
$this->syncedAt;
75
}
76
81
public
function
withChannel
(?
ChannelKeyReference
$channel)
82
{
83
$this->channel = $channel;
84
85
return
$this;
86
}
87
92
public
function
withExternalId
(?
string
$externalId)
93
{
94
$this->externalId = $externalId;
95
96
return
$this;
97
}
98
103
public
function
withSyncedAt
(?DateTimeImmutable $syncedAt)
104
{
105
$this->syncedAt = $syncedAt;
106
107
return
$this;
108
}
109
114
public
function
withChannelBuilder
(?
ChannelKeyReferenceBuilder
$channel)
115
{
116
$this->channel = $channel;
117
118
return
$this;
119
}
120
121
public
function
build
():
SyncInfo
122
{
123
return
new
SyncInfoModel
(
124
$this->channel instanceof
ChannelKeyReferenceBuilder
? $this->channel->
build
() : $this->channel,
125
$this->externalId,
126
$this->syncedAt
127
);
128
}
129
130
public
static
function
of
():
SyncInfoBuilder
131
{
132
return
new
self
();
133
}
134
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\Common\ChannelKeyReferenceBuilder
Definition:
ChannelKeyReferenceBuilder.php:22
Commercetools\Import\Models\Common\ChannelKeyReferenceBuilder\build
build()
Definition:
ChannelKeyReferenceBuilder.php:50
Commercetools\Import\Models\Orders\SyncInfoBuilder
Definition:
SyncInfoBuilder.php:25
Commercetools\Import\Models\Orders\SyncInfoBuilder\getSyncedAt
getSyncedAt()
Definition:
SyncInfoBuilder.php:72
Commercetools\Import\Models\Orders\SyncInfoBuilder\of
static of()
Definition:
SyncInfoBuilder.php:130
Commercetools\Import\Models\Orders\SyncInfoBuilder\build
build()
Definition:
SyncInfoBuilder.php:121
Commercetools\Import\Models\Orders\SyncInfoBuilder\withChannelBuilder
withChannelBuilder(?ChannelKeyReferenceBuilder $channel)
Definition:
SyncInfoBuilder.php:114
Commercetools\Import\Models\Orders\SyncInfoBuilder\withExternalId
withExternalId(?string $externalId)
Definition:
SyncInfoBuilder.php:92
Commercetools\Import\Models\Orders\SyncInfoBuilder\getChannel
getChannel()
Definition:
SyncInfoBuilder.php:50
Commercetools\Import\Models\Orders\SyncInfoBuilder\withSyncedAt
withSyncedAt(?DateTimeImmutable $syncedAt)
Definition:
SyncInfoBuilder.php:103
Commercetools\Import\Models\Orders\SyncInfoBuilder\getExternalId
getExternalId()
Definition:
SyncInfoBuilder.php:61
Commercetools\Import\Models\Orders\SyncInfoBuilder\withChannel
withChannel(?ChannelKeyReference $channel)
Definition:
SyncInfoBuilder.php:81
Commercetools\Import\Models\Orders\SyncInfoModel
Definition:
SyncInfoModel.php:24
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\ChannelKeyReference
Definition:
ChannelKeyReference.php:15
Commercetools\Import\Models\Orders\SyncInfo
Definition:
SyncInfo.php:17
Commercetools\Import\Models\Orders
Definition:
CartClassificationTier.php:9
Generated by
1.9.1