commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
DeliveryAddedMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Order\Delivery
;
12
use
Commercetools\Api\Models\Order\DeliveryBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
DeliveryAddedMessagePayloadBuilder
implements
Builder
24
{
29
private
$delivery;
30
35
private
$shippingKey;
36
43
public
function
getDelivery
()
44
{
45
return
$this->delivery instanceof
DeliveryBuilder
? $this->delivery->
build
() : $this->delivery;
46
}
47
54
public
function
getShippingKey
()
55
{
56
return
$this->shippingKey;
57
}
58
63
public
function
withDelivery
(?
Delivery
$delivery)
64
{
65
$this->delivery = $delivery;
66
67
return
$this;
68
}
69
74
public
function
withShippingKey
(?
string
$shippingKey)
75
{
76
$this->shippingKey = $shippingKey;
77
78
return
$this;
79
}
80
85
public
function
withDeliveryBuilder
(?
DeliveryBuilder
$delivery)
86
{
87
$this->delivery = $delivery;
88
89
return
$this;
90
}
91
92
public
function
build
():
DeliveryAddedMessagePayload
93
{
94
return
new
DeliveryAddedMessagePayloadModel
(
95
$this->delivery instanceof
DeliveryBuilder
? $this->delivery->
build
() : $this->delivery,
96
$this->shippingKey
97
);
98
}
99
100
public
static
function
of
():
DeliveryAddedMessagePayloadBuilder
101
{
102
return
new
self
();
103
}
104
}
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder
Definition:
DeliveryAddedMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\getDelivery
getDelivery()
Definition:
DeliveryAddedMessagePayloadBuilder.php:43
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\getShippingKey
getShippingKey()
Definition:
DeliveryAddedMessagePayloadBuilder.php:54
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\withDelivery
withDelivery(?Delivery $delivery)
Definition:
DeliveryAddedMessagePayloadBuilder.php:63
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\build
build()
Definition:
DeliveryAddedMessagePayloadBuilder.php:92
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\withDeliveryBuilder
withDeliveryBuilder(?DeliveryBuilder $delivery)
Definition:
DeliveryAddedMessagePayloadBuilder.php:85
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\withShippingKey
withShippingKey(?string $shippingKey)
Definition:
DeliveryAddedMessagePayloadBuilder.php:74
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadBuilder\of
static of()
Definition:
DeliveryAddedMessagePayloadBuilder.php:100
Commercetools\Api\Models\Message\DeliveryAddedMessagePayloadModel
Definition:
DeliveryAddedMessagePayloadModel.php:23
Commercetools\Api\Models\Order\DeliveryBuilder
Definition:
DeliveryBuilder.php:27
Commercetools\Api\Models\Order\DeliveryBuilder\build
build()
Definition:
DeliveryBuilder.php:246
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Message\DeliveryAddedMessagePayload
Definition:
DeliveryAddedMessagePayload.php:16
Commercetools\Api\Models\Order\Delivery
Definition:
Delivery.php:18
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Message
Definition:
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.1