commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
ChangeValue
DeliveryChangeValueBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\ChangeValue
;
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
use
Commercetools\History\Models\Common\Address
;
18
use
Commercetools\History\Models\Common\AddressBuilder
;
19
use
Commercetools\History\Models\Common\DeliveryItemCollection
;
20
use
Commercetools\History\Models\Common\ParcelCollection
;
21
25
final
class
DeliveryChangeValueBuilder
implements
Builder
26
{
31
private
$items;
32
37
private
$address;
38
43
private
$parcels;
44
51
public
function
getItems
()
52
{
53
return
$this->items;
54
}
55
62
public
function
getAddress
()
63
{
64
return
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address;
65
}
66
73
public
function
getParcels
()
74
{
75
return
$this->parcels;
76
}
77
82
public
function
withItems
(?
DeliveryItemCollection
$items)
83
{
84
$this->items = $items;
85
86
return
$this;
87
}
88
93
public
function
withAddress
(?
Address
$address)
94
{
95
$this->address = $address;
96
97
return
$this;
98
}
99
104
public
function
withParcels
(?
ParcelCollection
$parcels)
105
{
106
$this->parcels = $parcels;
107
108
return
$this;
109
}
110
115
public
function
withAddressBuilder
(?
AddressBuilder
$address)
116
{
117
$this->address = $address;
118
119
return
$this;
120
}
121
122
public
function
build
():
DeliveryChangeValue
123
{
124
return
new
DeliveryChangeValueModel
(
125
$this->items,
126
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address,
127
$this->parcels
128
);
129
}
130
131
public
static
function
of
():
DeliveryChangeValueBuilder
132
{
133
return
new
self
();
134
}
135
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder
Definition:
DeliveryChangeValueBuilder.php:26
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\getAddress
getAddress()
Definition:
DeliveryChangeValueBuilder.php:62
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\of
static of()
Definition:
DeliveryChangeValueBuilder.php:131
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\withAddressBuilder
withAddressBuilder(?AddressBuilder $address)
Definition:
DeliveryChangeValueBuilder.php:115
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\withParcels
withParcels(?ParcelCollection $parcels)
Definition:
DeliveryChangeValueBuilder.php:104
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\withItems
withItems(?DeliveryItemCollection $items)
Definition:
DeliveryChangeValueBuilder.php:82
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\getParcels
getParcels()
Definition:
DeliveryChangeValueBuilder.php:73
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\build
build()
Definition:
DeliveryChangeValueBuilder.php:122
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\getItems
getItems()
Definition:
DeliveryChangeValueBuilder.php:51
Commercetools\History\Models\ChangeValue\DeliveryChangeValueBuilder\withAddress
withAddress(?Address $address)
Definition:
DeliveryChangeValueBuilder.php:93
Commercetools\History\Models\ChangeValue\DeliveryChangeValueModel
Definition:
DeliveryChangeValueModel.php:25
Commercetools\History\Models\Common\AddressBuilder
Definition:
AddressBuilder.php:22
Commercetools\History\Models\Common\AddressBuilder\build
build()
Definition:
AddressBuilder.php:678
Commercetools\History\Models\Common\DeliveryItemCollection
Definition:
DeliveryItemCollection.php:22
Commercetools\History\Models\Common\ParcelCollection
Definition:
ParcelCollection.php:22
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\ChangeValue\DeliveryChangeValue
Definition:
DeliveryChangeValue.php:18
Commercetools\History\Models\Common\Address
Definition:
Address.php:15
Commercetools\History\Models\ChangeValue
Definition:
AssetChangeValue.php:9
Generated by
1.9.1