commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Message
ApprovalFlowCompletedMessagePayloadModel.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\OrderReferenceModel
;
13
use
Commercetools\Base\DateTimeImmutableCollection
;
14
use
Commercetools\Base\JsonObject
;
15
use
Commercetools\Base\JsonObjectModel
;
16
use
Commercetools\Base\MapperFactory
;
17
use stdClass;
18
22
final
class
ApprovalFlowCompletedMessagePayloadModel
extends
JsonObjectModel
implements
ApprovalFlowCompletedMessagePayload
23
{
24
public
const
DISCRIMINATOR_VALUE
=
'ApprovalFlowCompleted'
;
29
protected
$type
;
30
35
protected
$status
;
36
41
protected
$order
;
42
43
47
public
function
__construct
(
48
?
string
$status
=
null
,
49
?
OrderReference
$order
=
null
,
50
?
string
$type
=
null
51
) {
52
$this->status =
$status
;
53
$this->order =
$order
;
54
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
55
}
56
61
public
function
getType
()
62
{
63
if
(is_null($this->type)) {
65
$data = $this->
raw
(self::FIELD_TYPE);
66
if
(is_null($data)) {
67
return
null
;
68
}
69
$this->type = (string) $data;
70
}
71
72
return
$this->type
;
73
}
74
81
public
function
getStatus
()
82
{
83
if
(is_null($this->status)) {
85
$data = $this->
raw
(self::FIELD_STATUS);
86
if
(is_null($data)) {
87
return
null
;
88
}
89
$this->status = (string) $data;
90
}
91
92
return
$this->status
;
93
}
94
101
public
function
getOrder
()
102
{
103
if
(is_null($this->order)) {
105
$data = $this->
raw
(self::FIELD_ORDER);
106
if
(is_null($data)) {
107
return
null
;
108
}
109
110
$this->order =
OrderReferenceModel::of
($data);
111
}
112
113
return
$this->order
;
114
}
115
116
120
public
function
setStatus
(?
string
$status
): void
121
{
122
$this->status =
$status
;
123
}
124
128
public
function
setOrder
(?
OrderReference
$order
): void
129
{
130
$this->order =
$order
;
131
}
132
}
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:23
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\$status
$status
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:35
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\__construct
__construct(?string $status=null, ?OrderReference $order=null, ?string $type=null)
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:47
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:24
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\getStatus
getStatus()
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:81
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\setOrder
setOrder(?OrderReference $order)
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:128
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\$type
$type
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:29
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\getType
getType()
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:61
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\$order
$order
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:41
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\getOrder
getOrder()
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:101
Commercetools\Api\Models\Message\ApprovalFlowCompletedMessagePayloadModel\setStatus
setStatus(?string $status)
Definition:
ApprovalFlowCompletedMessagePayloadModel.php:120
Commercetools\Api\Models\Order\OrderReferenceModel
Definition:
OrderReferenceModel.php:23
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition:
BaseJsonObject.php:26
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\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Message
Definition:
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.1