commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-import
src
Models
OrderPatches
DeliveryAddressDraftBuilder.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\Common\Address
;
17
use
Commercetools\Import\Models\Common\AddressBuilder
;
18
use stdClass;
19
23
final
class
DeliveryAddressDraftBuilder
implements
Builder
24
{
29
private
$deliveryId;
30
35
private
$address;
36
41
public
function
getDeliveryId
()
42
{
43
return
$this->deliveryId;
44
}
45
50
public
function
getAddress
()
51
{
52
return
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address;
53
}
54
59
public
function
withDeliveryId
(?
string
$deliveryId)
60
{
61
$this->deliveryId = $deliveryId;
62
63
return
$this;
64
}
65
70
public
function
withAddress
(?
Address
$address)
71
{
72
$this->address = $address;
73
74
return
$this;
75
}
76
81
public
function
withAddressBuilder
(?
AddressBuilder
$address)
82
{
83
$this->address = $address;
84
85
return
$this;
86
}
87
88
public
function
build
():
DeliveryAddressDraft
89
{
90
return
new
DeliveryAddressDraftModel
(
91
$this->deliveryId,
92
$this->address instanceof
AddressBuilder
? $this->address->
build
() : $this->address
93
);
94
}
95
96
public
static
function
of
():
DeliveryAddressDraftBuilder
97
{
98
return
new
self
();
99
}
100
}
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Import\Models\Common\AddressBuilder
Definition:
AddressBuilder.php:24
Commercetools\Import\Models\Common\AddressBuilder\build
build()
Definition:
AddressBuilder.php:716
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder
Definition:
DeliveryAddressDraftBuilder.php:24
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\of
static of()
Definition:
DeliveryAddressDraftBuilder.php:96
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\withAddressBuilder
withAddressBuilder(?AddressBuilder $address)
Definition:
DeliveryAddressDraftBuilder.php:81
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\build
build()
Definition:
DeliveryAddressDraftBuilder.php:88
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\getAddress
getAddress()
Definition:
DeliveryAddressDraftBuilder.php:50
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\withAddress
withAddress(?Address $address)
Definition:
DeliveryAddressDraftBuilder.php:70
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\getDeliveryId
getDeliveryId()
Definition:
DeliveryAddressDraftBuilder.php:41
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftBuilder\withDeliveryId
withDeliveryId(?string $deliveryId)
Definition:
DeliveryAddressDraftBuilder.php:59
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraftModel
Definition:
DeliveryAddressDraftModel.php:23
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Import\Models\Common\Address
Definition:
Address.php:16
Commercetools\Import\Models\OrderPatches\DeliveryAddressDraft
Definition:
DeliveryAddressDraft.php:16
Commercetools\Import\Models\OrderPatches
Definition:
DeliveryAddressDraft.php:9
Generated by
1.9.1