commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Channel
ChannelReferenceBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Channel
;
10
11
use
Commercetools\Api\Models\Common\Reference
;
12
use
Commercetools\Api\Models\Common\ReferenceBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
ChannelReferenceBuilder
implements
Builder
24
{
29
private
$id;
30
35
private
$obj;
36
43
public
function
getId
()
44
{
45
return
$this->id;
46
}
47
55
public
function
getObj
()
56
{
57
return
$this->obj instanceof
ChannelBuilder
? $this->obj->
build
() : $this->obj;
58
}
59
64
public
function
withId
(?
string
$id)
65
{
66
$this->
id
= $id;
67
68
return
$this;
69
}
70
75
public
function
withObj
(?
Channel
$obj)
76
{
77
$this->obj = $obj;
78
79
return
$this;
80
}
81
86
public
function
withObjBuilder
(?
ChannelBuilder
$obj)
87
{
88
$this->obj = $obj;
89
90
return
$this;
91
}
92
93
public
function
build
():
ChannelReference
94
{
95
return
new
ChannelReferenceModel
(
96
$this->
id
,
97
$this->obj instanceof
ChannelBuilder
? $this->obj->
build
() : $this->obj
98
);
99
}
100
101
public
static
function
of
():
ChannelReferenceBuilder
102
{
103
return
new
self
();
104
}
105
}
Commercetools\Api\Models\Channel\ChannelBuilder
Definition:
ChannelBuilder.php:39
Commercetools\Api\Models\Channel\ChannelBuilder\build
build()
Definition:
ChannelBuilder.php:520
Commercetools\Api\Models\Channel\ChannelReferenceBuilder
Definition:
ChannelReferenceBuilder.php:24
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\getId
getId()
Definition:
ChannelReferenceBuilder.php:43
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\build
build()
Definition:
ChannelReferenceBuilder.php:93
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\withId
withId(?string $id)
Definition:
ChannelReferenceBuilder.php:64
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\of
static of()
Definition:
ChannelReferenceBuilder.php:101
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\withObj
withObj(?Channel $obj)
Definition:
ChannelReferenceBuilder.php:75
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\withObjBuilder
withObjBuilder(?ChannelBuilder $obj)
Definition:
ChannelReferenceBuilder.php:86
Commercetools\Api\Models\Channel\ChannelReferenceBuilder\getObj
getObj()
Definition:
ChannelReferenceBuilder.php:55
Commercetools\Api\Models\Channel\ChannelReferenceModel
Definition:
ChannelReferenceModel.php:23
Commercetools\Api\Models\Common\ReferenceBuilder
Definition:
ReferenceBuilder.php:92
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Channel\Channel
Definition:
Channel.php:24
Commercetools\Api\Models\Channel\ChannelReference
Definition:
ChannelReference.php:16
Commercetools\Api\Models\Common\Reference
Definition:
Reference.php:50
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Channel
Definition:
Channel.php:9
Generated by
1.9.1