commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
ApprovalFlowCompletedMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Order\OrderReference
;
12
use
Commercetools\Api\Models\Order\OrderReferenceBuilder
;
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
ApprovalFlowCompletedMessagePayloadBuilder
implements
Builder
24
{
29
private
$status;
30
35
private
$order;
36
43
public
function
getStatus
()
44
{
45
return
$this->status;
46
}
47
54
public
function
getOrder
()
55
{
56
return
$this->order instanceof
OrderReferenceBuilder
? $this->order->
build
() : $this->order;
57
}
58
63
public
function
withStatus
(?
string
$status)
64
{
65
$this->status = $status;
66
67
return
$this;
68
}
69
74
public
function
withOrder
(?
OrderReference
$order)
75
{
76
$this->order = $order;
77
78
return
$this;
79
}
80
85
public
function
withOrderBuilder
(?
OrderReferenceBuilder
$order)
86
{
87
$this->order = $order;
88
89
return
$this;
90
}
91
92
public
function
build
():
ApprovalFlowCompletedMessagePayload
93
{
94
return
new
ApprovalFlowCompletedMessagePayloadModel
(
95
$this->status,
96
$this->order instanceof
OrderReferenceBuilder
? $this->order->
build
() : $this->order
97
);
98
}
99
100
public
static
function
of
():
ApprovalFlowCompletedMessagePayloadBuilder
101
{
102
return
new
self
();
103
}
104
}
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:24
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\of
static of()
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:100
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\build
build()
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:92
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\getOrder
getOrder()
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:54
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\getStatus
getStatus()
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:43
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\withOrderBuilder
withOrderBuilder(?OrderReferenceBuilder $order)
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:85
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\withOrder
withOrder(?OrderReference $order)
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:74
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadBuilder\withStatus
withStatus(?string $status)
Definition:
ApprovalFlowCompletedMessagePayloadBuilder.php:63
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:23
Commercetools\Api\Models\Order\OrderReferenceBuilder
Definition:
OrderReferenceBuilder.php:24
Commercetools\Api\Models\Order\OrderReferenceBuilder\build
build()
Definition:
OrderReferenceBuilder.php:92
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\ApprovalFlowCompletedMessagePayload
Definition:
ApprovalFlowCompletedMessagePayload.php:16
Commercetools\Api\Models\Order\OrderReference
Definition:
OrderReference.php:16
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