commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Zone
ZoneDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Zone
;
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
ZoneDraftBuilder
implements
Builder
22
{
27
private
$key;
28
33
private
$name;
34
39
private
$description;
40
45
private
$locations;
46
53
public
function
getKey
()
54
{
55
return
$this->key;
56
}
57
64
public
function
getName
()
65
{
66
return
$this->name;
67
}
68
75
public
function
getDescription
()
76
{
77
return
$this->description;
78
}
79
86
public
function
getLocations
()
87
{
88
return
$this->locations;
89
}
90
95
public
function
withKey
(?
string
$key)
96
{
97
$this->key = $key;
98
99
return
$this;
100
}
101
106
public
function
withName
(?
string
$name)
107
{
108
$this->name = $name;
109
110
return
$this;
111
}
112
117
public
function
withDescription
(?
string
$description)
118
{
119
$this->description = $description;
120
121
return
$this;
122
}
123
128
public
function
withLocations
(?
LocationCollection
$locations)
129
{
130
$this->locations = $locations;
131
132
return
$this;
133
}
134
135
136
public
function
build
():
ZoneDraft
137
{
138
return
new
ZoneDraftModel
(
139
$this->key,
140
$this->name,
141
$this->description,
142
$this->locations
143
);
144
}
145
146
public
static
function
of
():
ZoneDraftBuilder
147
{
148
return
new
self
();
149
}
150
}
Commercetools\Api\Models\Zone\LocationCollection
Definition:
LocationCollection.php:22
Commercetools\Api\Models\Zone\ZoneDraftBuilder
Definition:
ZoneDraftBuilder.php:22
Commercetools\Api\Models\Zone\ZoneDraftBuilder\withDescription
withDescription(?string $description)
Definition:
ZoneDraftBuilder.php:117
Commercetools\Api\Models\Zone\ZoneDraftBuilder\build
build()
Definition:
ZoneDraftBuilder.php:136
Commercetools\Api\Models\Zone\ZoneDraftBuilder\getLocations
getLocations()
Definition:
ZoneDraftBuilder.php:86
Commercetools\Api\Models\Zone\ZoneDraftBuilder\withLocations
withLocations(?LocationCollection $locations)
Definition:
ZoneDraftBuilder.php:128
Commercetools\Api\Models\Zone\ZoneDraftBuilder\withName
withName(?string $name)
Definition:
ZoneDraftBuilder.php:106
Commercetools\Api\Models\Zone\ZoneDraftBuilder\getDescription
getDescription()
Definition:
ZoneDraftBuilder.php:75
Commercetools\Api\Models\Zone\ZoneDraftBuilder\of
static of()
Definition:
ZoneDraftBuilder.php:146
Commercetools\Api\Models\Zone\ZoneDraftBuilder\getKey
getKey()
Definition:
ZoneDraftBuilder.php:53
Commercetools\Api\Models\Zone\ZoneDraftBuilder\getName
getName()
Definition:
ZoneDraftBuilder.php:64
Commercetools\Api\Models\Zone\ZoneDraftBuilder\withKey
withKey(?string $key)
Definition:
ZoneDraftBuilder.php:95
Commercetools\Api\Models\Zone\ZoneDraftModel
Definition:
ZoneDraftModel.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\Zone\ZoneDraft
Definition:
ZoneDraft.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Zone
Definition:
Location.php:9
Generated by
1.9.1