commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
OrderPatches
ParcelItemsBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Import\Models\OrderPatches
;
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\Orders\DeliveryItemCollection
;
17
use stdClass;
18
22
final
class
ParcelItemsBuilder
implements
Builder
23
{
28
private
$parcelId;
29
34
private
$items;
35
40
public
function
getParcelId
()
41
{
42
return
$this->parcelId;
43
}
44
49
public
function
getItems
()
50
{
51
return
$this->items;
52
}
53
58
public
function
withParcelId
(?
string
$parcelId)
59
{
60
$this->parcelId = $parcelId;
61
62
return
$this;
63
}
64
69
public
function
withItems
(?
DeliveryItemCollection
$items)
70
{
71
$this->items = $items;
72
73
return
$this;
74
}
75
76
77
public
function
build
():
ParcelItems
78
{
79
return
new
ParcelItemsModel
(
80
$this->parcelId,
81
$this->items
82
);
83
}
84
85
public
static
function
of
():
ParcelItemsBuilder
86
{
87
return
new
self
();
88
}
89
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder
Definition:
ParcelItemsBuilder.php:23
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder\of
static of()
Definition:
ParcelItemsBuilder.php:85
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder\withParcelId
withParcelId(?string $parcelId)
Definition:
ParcelItemsBuilder.php:58
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder\build
build()
Definition:
ParcelItemsBuilder.php:77
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder\withItems
withItems(?DeliveryItemCollection $items)
Definition:
ParcelItemsBuilder.php:69
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder\getItems
getItems()
Definition:
ParcelItemsBuilder.php:49
Commercetools\Import\Models\OrderPatches\ParcelItemsBuilder\getParcelId
getParcelId()
Definition:
ParcelItemsBuilder.php:40
Commercetools\Import\Models\OrderPatches\ParcelItemsModel
Definition:
ParcelItemsModel.php:22
Commercetools\Import\Models\Orders\DeliveryItemCollection
Definition:
DeliveryItemCollection.php:22
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\OrderPatches\ParcelItems
Definition:
ParcelItems.php:16
Commercetools\Import\Models\OrderPatches
Definition:
DeliveryAddressDraft.php:9
Generated by
1.9.1