commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-history
src
Models
Label
OrderLabelModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
OrderLabelModel
extends
JsonObjectModel
implements
OrderLabel
21
{
22
23
public
const
DISCRIMINATOR_VALUE
=
'OrderLabel'
;
28
protected
$type
;
29
34
protected
$customerEmail
;
35
40
protected
$orderNumber
;
41
42
46
public
function
__construct
(
47
?
string
$customerEmail
=
null
,
48
?
string
$orderNumber
=
null
,
49
?
string
$type
=
null
50
) {
51
$this->customerEmail =
$customerEmail
;
52
$this->orderNumber =
$orderNumber
;
53
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
54
}
55
60
public
function
getType
()
61
{
62
if
(is_null($this->type)) {
64
$data = $this->
raw
(self::FIELD_TYPE);
65
if
(is_null($data)) {
66
return
null
;
67
}
68
$this->type = (string) $data;
69
}
70
71
return
$this->type
;
72
}
73
80
public
function
getCustomerEmail
()
81
{
82
if
(is_null($this->customerEmail)) {
84
$data = $this->
raw
(self::FIELD_CUSTOMER_EMAIL);
85
if
(is_null($data)) {
86
return
null
;
87
}
88
$this->customerEmail = (string) $data;
89
}
90
91
return
$this->customerEmail
;
92
}
93
100
public
function
getOrderNumber
()
101
{
102
if
(is_null($this->orderNumber)) {
104
$data = $this->
raw
(self::FIELD_ORDER_NUMBER);
105
if
(is_null($data)) {
106
return
null
;
107
}
108
$this->orderNumber = (string) $data;
109
}
110
111
return
$this->orderNumber
;
112
}
113
114
118
public
function
setCustomerEmail
(?
string
$customerEmail
): void
119
{
120
$this->customerEmail =
$customerEmail
;
121
}
122
126
public
function
setOrderNumber
(?
string
$orderNumber
): void
127
{
128
$this->orderNumber =
$orderNumber
;
129
}
130
131
132
133
}
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\History\Models\Label\OrderLabelModel
Definition
OrderLabelModel.php:21
Commercetools\History\Models\Label\OrderLabelModel\$customerEmail
$customerEmail
Definition
OrderLabelModel.php:34
Commercetools\History\Models\Label\OrderLabelModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
OrderLabelModel.php:23
Commercetools\History\Models\Label\OrderLabelModel\setCustomerEmail
setCustomerEmail(?string $customerEmail)
Definition
OrderLabelModel.php:118
Commercetools\History\Models\Label\OrderLabelModel\$orderNumber
$orderNumber
Definition
OrderLabelModel.php:40
Commercetools\History\Models\Label\OrderLabelModel\getType
getType()
Definition
OrderLabelModel.php:60
Commercetools\History\Models\Label\OrderLabelModel\getOrderNumber
getOrderNumber()
Definition
OrderLabelModel.php:100
Commercetools\History\Models\Label\OrderLabelModel\$type
$type
Definition
OrderLabelModel.php:28
Commercetools\History\Models\Label\OrderLabelModel\__construct
__construct(?string $customerEmail=null, ?string $orderNumber=null, ?string $type=null)
Definition
OrderLabelModel.php:46
Commercetools\History\Models\Label\OrderLabelModel\getCustomerEmail
getCustomerEmail()
Definition
OrderLabelModel.php:80
Commercetools\History\Models\Label\OrderLabelModel\setOrderNumber
setOrderNumber(?string $orderNumber)
Definition
OrderLabelModel.php:126
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Label\OrderLabel
Definition
OrderLabel.php:15
Commercetools\History\Models\Label
Definition
AssociateRoleLabel.php:9
Generated by
1.9.8