commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
ApprovalFlowApprovedMessagePayloadBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Api\Models\Customer\CustomerReference
;
12
use
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
;
13
use
Commercetools\Api\Models\Order\OrderReference
;
14
use
Commercetools\Api\Models\Order\OrderReferenceBuilder
;
15
use
Commercetools\Base\Builder
;
16
use
Commercetools\Base\DateTimeImmutableCollection
;
17
use
Commercetools\Base\JsonObject
;
18
use
Commercetools\Base\JsonObjectModel
;
19
use
Commercetools\Base\MapperFactory
;
20
use stdClass;
21
25
final
class
ApprovalFlowApprovedMessagePayloadBuilder
implements
Builder
26
{
31
private
$associate;
32
37
private
$order;
38
45
public
function
getAssociate
()
46
{
47
return
$this->associate instanceof
CustomerReferenceBuilder
? $this->associate->
build
() : $this->associate;
48
}
49
56
public
function
getOrder
()
57
{
58
return
$this->order instanceof
OrderReferenceBuilder
? $this->order->
build
() : $this->order;
59
}
60
65
public
function
withAssociate
(?
CustomerReference
$associate)
66
{
67
$this->associate = $associate;
68
69
return
$this;
70
}
71
76
public
function
withOrder
(?
OrderReference
$order)
77
{
78
$this->order = $order;
79
80
return
$this;
81
}
82
87
public
function
withAssociateBuilder
(?
CustomerReferenceBuilder
$associate)
88
{
89
$this->associate = $associate;
90
91
return
$this;
92
}
93
98
public
function
withOrderBuilder
(?
OrderReferenceBuilder
$order)
99
{
100
$this->order = $order;
101
102
return
$this;
103
}
104
105
public
function
build
():
ApprovalFlowApprovedMessagePayload
106
{
107
return
new
ApprovalFlowApprovedMessagePayloadModel
(
108
$this->associate instanceof
CustomerReferenceBuilder
? $this->associate->
build
() : $this->associate,
109
$this->order instanceof
OrderReferenceBuilder
? $this->order->
build
() : $this->order
110
);
111
}
112
113
public
static
function
of
():
ApprovalFlowApprovedMessagePayloadBuilder
114
{
115
return
new
self
();
116
}
117
}
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
Definition:
CustomerReferenceBuilder.php:24
Commercetools\Api\Models\Customer\CustomerReferenceBuilder\build
build()
Definition:
CustomerReferenceBuilder.php:92
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:26
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\withAssociate
withAssociate(?CustomerReference $associate)
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:65
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\of
static of()
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:113
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\withOrder
withOrder(?OrderReference $order)
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:76
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\build
build()
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:105
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\getAssociate
getAssociate()
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:45
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\withOrderBuilder
withOrderBuilder(?OrderReferenceBuilder $order)
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:98
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\withAssociateBuilder
withAssociateBuilder(?CustomerReferenceBuilder $associate)
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:87
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadBuilder\getOrder
getOrder()
Definition:
ApprovalFlowApprovedMessagePayloadBuilder.php:56
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayloadModel
Definition:
ApprovalFlowApprovedMessagePayloadModel.php:25
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\Customer\CustomerReference
Definition:
CustomerReference.php:16
Commercetools\Api\Models\Message\ApprovalFlowApprovedMessagePayload
Definition:
ApprovalFlowApprovedMessagePayload.php:17
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