commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
CustomObject
CustomObjectDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\CustomObject
;
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
CustomObjectDraftBuilder
implements
Builder
22
{
27
private
$container;
28
33
private
$key;
34
39
private
$value;
40
45
private
$version;
46
53
public
function
getContainer
()
54
{
55
return
$this->container;
56
}
57
64
public
function
getKey
()
65
{
66
return
$this->key;
67
}
68
79
public
function
getValue
()
80
{
81
return
$this->value;
82
}
83
90
public
function
getVersion
()
91
{
92
return
$this->version;
93
}
94
99
public
function
withContainer
(?
string
$container)
100
{
101
$this->container = $container;
102
103
return
$this;
104
}
105
110
public
function
withKey
(?
string
$key)
111
{
112
$this->key = $key;
113
114
return
$this;
115
}
116
121
public
function
withValue
($value)
122
{
123
$this->value = $value;
124
125
return
$this;
126
}
127
132
public
function
withVersion
(?
int
$version)
133
{
134
$this->version = $version;
135
136
return
$this;
137
}
138
139
140
public
function
build
():
CustomObjectDraft
141
{
142
return
new
CustomObjectDraftModel
(
143
$this->container,
144
$this->key,
145
$this->value,
146
$this->version
147
);
148
}
149
150
public
static
function
of
():
CustomObjectDraftBuilder
151
{
152
return
new
self
();
153
}
154
}
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder
Definition:
CustomObjectDraftBuilder.php:22
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\getValue
getValue()
Definition:
CustomObjectDraftBuilder.php:79
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\withContainer
withContainer(?string $container)
Definition:
CustomObjectDraftBuilder.php:99
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\getVersion
getVersion()
Definition:
CustomObjectDraftBuilder.php:90
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\getContainer
getContainer()
Definition:
CustomObjectDraftBuilder.php:53
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\getKey
getKey()
Definition:
CustomObjectDraftBuilder.php:64
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\of
static of()
Definition:
CustomObjectDraftBuilder.php:150
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\build
build()
Definition:
CustomObjectDraftBuilder.php:140
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\withVersion
withVersion(?int $version)
Definition:
CustomObjectDraftBuilder.php:132
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\withValue
withValue($value)
Definition:
CustomObjectDraftBuilder.php:121
Commercetools\Api\Models\CustomObject\CustomObjectDraftBuilder\withKey
withKey(?string $key)
Definition:
CustomObjectDraftBuilder.php:110
Commercetools\Api\Models\CustomObject\CustomObjectDraftModel
Definition:
CustomObjectDraftModel.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\CustomObject\CustomObjectDraft
Definition:
CustomObjectDraft.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\CustomObject
Definition:
CustomObject.php:9
Generated by
1.9.1