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
Me
MyBusinessUnitDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Me
;
10
11
use
Commercetools\Api\Models\Common\BaseAddressCollection
;
12
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
13
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
14
use
Commercetools\Base\Builder
;
15
use
Commercetools\Base\DateTimeImmutableCollection
;
16
use
Commercetools\Base\JsonObject
;
17
use
Commercetools\Base\JsonObjectModel
;
18
use
Commercetools\Base\MapperFactory
;
19
use stdClass;
20
24
final
class
MyBusinessUnitDraftBuilder
implements
Builder
25
{
30
private
$key;
31
36
private
$name;
37
42
private
$contactEmail;
43
48
private
$custom;
49
54
private
$addresses;
55
60
private
$shippingAddresses;
61
66
private
$defaultShippingAddress;
67
72
private
$billingAddresses;
73
78
private
$defaultBillingAddress;
79
86
public
function
getKey
()
87
{
88
return
$this->key;
89
}
90
97
public
function
getName
()
98
{
99
return
$this->name;
100
}
101
108
public
function
getContactEmail
()
109
{
110
return
$this->contactEmail;
111
}
112
119
public
function
getCustom
()
120
{
121
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
122
}
123
130
public
function
getAddresses
()
131
{
132
return
$this->addresses;
133
}
134
142
public
function
getShippingAddresses
()
143
{
144
return
$this->shippingAddresses;
145
}
146
153
public
function
getDefaultShippingAddress
()
154
{
155
return
$this->defaultShippingAddress;
156
}
157
165
public
function
getBillingAddresses
()
166
{
167
return
$this->billingAddresses;
168
}
169
176
public
function
getDefaultBillingAddress
()
177
{
178
return
$this->defaultBillingAddress;
179
}
180
185
public
function
withKey
(?
string
$key)
186
{
187
$this->key = $key;
188
189
return
$this;
190
}
191
196
public
function
withName
(?
string
$name)
197
{
198
$this->name = $name;
199
200
return
$this;
201
}
202
207
public
function
withContactEmail
(?
string
$contactEmail)
208
{
209
$this->contactEmail = $contactEmail;
210
211
return
$this;
212
}
213
218
public
function
withCustom
(?
CustomFieldsDraft
$custom)
219
{
220
$this->custom = $custom;
221
222
return
$this;
223
}
224
229
public
function
withAddresses
(?
BaseAddressCollection
$addresses)
230
{
231
$this->addresses = $addresses;
232
233
return
$this;
234
}
235
240
public
function
withShippingAddresses
(?array $shippingAddresses)
241
{
242
$this->shippingAddresses = $shippingAddresses;
243
244
return
$this;
245
}
246
251
public
function
withDefaultShippingAddress
(?
int
$defaultShippingAddress)
252
{
253
$this->defaultShippingAddress = $defaultShippingAddress;
254
255
return
$this;
256
}
257
262
public
function
withBillingAddresses
(?array $billingAddresses)
263
{
264
$this->billingAddresses = $billingAddresses;
265
266
return
$this;
267
}
268
273
public
function
withDefaultBillingAddress
(?
int
$defaultBillingAddress)
274
{
275
$this->defaultBillingAddress = $defaultBillingAddress;
276
277
return
$this;
278
}
279
284
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
285
{
286
$this->custom = $custom;
287
288
return
$this;
289
}
290
291
public
function
build
():
MyBusinessUnitDraft
292
{
293
return
new
MyBusinessUnitDraftModel
(
294
$this->key,
295
$this->name,
296
$this->contactEmail,
297
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom,
298
$this->addresses,
299
$this->shippingAddresses,
300
$this->defaultShippingAddress,
301
$this->billingAddresses,
302
$this->defaultBillingAddress
303
);
304
}
305
306
public
static
function
of
():
MyBusinessUnitDraftBuilder
307
{
308
return
new
self
();
309
}
310
}
Commercetools\Api\Models\Common\BaseAddressCollection
Definition
BaseAddressCollection.php:26
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder
Definition
MyBusinessUnitDraftBuilder.php:25
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getAddresses
getAddresses()
Definition
MyBusinessUnitDraftBuilder.php:130
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withBillingAddresses
withBillingAddresses(?array $billingAddresses)
Definition
MyBusinessUnitDraftBuilder.php:262
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withAddresses
withAddresses(?BaseAddressCollection $addresses)
Definition
MyBusinessUnitDraftBuilder.php:229
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
MyBusinessUnitDraftBuilder.php:284
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withShippingAddresses
withShippingAddresses(?array $shippingAddresses)
Definition
MyBusinessUnitDraftBuilder.php:240
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withDefaultShippingAddress
withDefaultShippingAddress(?int $defaultShippingAddress)
Definition
MyBusinessUnitDraftBuilder.php:251
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withName
withName(?string $name)
Definition
MyBusinessUnitDraftBuilder.php:196
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getShippingAddresses
getShippingAddresses()
Definition
MyBusinessUnitDraftBuilder.php:142
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getCustom
getCustom()
Definition
MyBusinessUnitDraftBuilder.php:119
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getDefaultBillingAddress
getDefaultBillingAddress()
Definition
MyBusinessUnitDraftBuilder.php:176
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getName
getName()
Definition
MyBusinessUnitDraftBuilder.php:97
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\of
static of()
Definition
MyBusinessUnitDraftBuilder.php:306
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getDefaultShippingAddress
getDefaultShippingAddress()
Definition
MyBusinessUnitDraftBuilder.php:153
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withDefaultBillingAddress
withDefaultBillingAddress(?int $defaultBillingAddress)
Definition
MyBusinessUnitDraftBuilder.php:273
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withKey
withKey(?string $key)
Definition
MyBusinessUnitDraftBuilder.php:185
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getContactEmail
getContactEmail()
Definition
MyBusinessUnitDraftBuilder.php:108
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getKey
getKey()
Definition
MyBusinessUnitDraftBuilder.php:86
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withContactEmail
withContactEmail(?string $contactEmail)
Definition
MyBusinessUnitDraftBuilder.php:207
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\build
build()
Definition
MyBusinessUnitDraftBuilder.php:291
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
MyBusinessUnitDraftBuilder.php:218
Commercetools\Api\Models\Me\MyBusinessUnitDraftBuilder\getBillingAddresses
getBillingAddresses()
Definition
MyBusinessUnitDraftBuilder.php:165
Commercetools\Api\Models\Me\MyBusinessUnitDraftModel
Definition
MyBusinessUnitDraftModel.php:24
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition
CustomFieldsDraftBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Me\MyBusinessUnitDraft
Definition
MyBusinessUnitDraft.php:17
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition
CustomFieldsDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Me
Definition
MyBusinessUnitAddAddressAction.php:9
Generated by
1.9.8