commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
ApprovalFlowRejectedMessagePayloadBuilder.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
ApprovalFlowRejectedMessagePayloadBuilder
implements
Builder
26
{
31
private
$associate;
32
37
private
$rejectionReason;
38
43
private
$order;
44
51
public
function
getAssociate
()
52
{
53
return
$this->associate instanceof
CustomerReferenceBuilder
? $this->associate->
build
() : $this->associate;
54
}
55
62
public
function
getRejectionReason
()
63
{
64
return
$this->rejectionReason;
65
}
66
73
public
function
getOrder
()
74
{
75
return
$this->order instanceof
OrderReferenceBuilder
? $this->order->
build
() : $this->order;
76
}
77
82
public
function
withAssociate
(?
CustomerReference
$associate)
83
{
84
$this->associate = $associate;
85
86
return
$this;
87
}
88
93
public
function
withRejectionReason
(?
string
$rejectionReason)
94
{
95
$this->rejectionReason = $rejectionReason;
96
97
return
$this;
98
}
99
104
public
function
withOrder
(?
OrderReference
$order)
105
{
106
$this->order = $order;
107
108
return
$this;
109
}
110
115
public
function
withAssociateBuilder
(?
CustomerReferenceBuilder
$associate)
116
{
117
$this->associate = $associate;
118
119
return
$this;
120
}
121
126
public
function
withOrderBuilder
(?
OrderReferenceBuilder
$order)
127
{
128
$this->order = $order;
129
130
return
$this;
131
}
132
133
public
function
build
():
ApprovalFlowRejectedMessagePayload
134
{
135
return
new
ApprovalFlowRejectedMessagePayloadModel
(
136
$this->associate instanceof
CustomerReferenceBuilder
? $this->associate->
build
() : $this->associate,
137
$this->rejectionReason,
138
$this->order instanceof
OrderReferenceBuilder
? $this->order->
build
() : $this->order
139
);
140
}
141
142
public
static
function
of
():
ApprovalFlowRejectedMessagePayloadBuilder
143
{
144
return
new
self
();
145
}
146
}
Commercetools\Api\Models\Customer\CustomerReferenceBuilder
Definition:
CustomerReferenceBuilder.php:24
Commercetools\Api\Models\Customer\CustomerReferenceBuilder\build
build()
Definition:
CustomerReferenceBuilder.php:92
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:26
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\getOrder
getOrder()
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:73
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\withOrder
withOrder(?OrderReference $order)
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:104
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\build
build()
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:133
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\withRejectionReason
withRejectionReason(?string $rejectionReason)
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:93
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\withAssociateBuilder
withAssociateBuilder(?CustomerReferenceBuilder $associate)
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:115
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\getRejectionReason
getRejectionReason()
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:62
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\withOrderBuilder
withOrderBuilder(?OrderReferenceBuilder $order)
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:126
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\of
static of()
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:142
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\withAssociate
withAssociate(?CustomerReference $associate)
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:82
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadBuilder\getAssociate
getAssociate()
Definition:
ApprovalFlowRejectedMessagePayloadBuilder.php:51
Commercetools\Api\Models\Message\ApprovalFlowRejectedMessagePayloadModel
Definition:
ApprovalFlowRejectedMessagePayloadModel.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\ApprovalFlowRejectedMessagePayload
Definition:
ApprovalFlowRejectedMessagePayload.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