commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-history
src
Models
Label
QuoteRequestLabelModel.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
use
Commercetools\History\Models\Common\Reference
;
17
use
Commercetools\History\Models\Common\ReferenceModel
;
18
22
final
class
QuoteRequestLabelModel
extends
JsonObjectModel
implements
QuoteRequestLabel
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'QuoteRequestLabel'
;
30
protected
$type
;
31
36
protected
$key
;
37
42
protected
$customer
;
43
44
48
public
function
__construct
(
49
?
string
$key
=
null
,
50
?
Reference
$customer
=
null
,
51
?
string
$type
=
null
52
) {
53
$this->key =
$key
;
54
$this->customer =
$customer
;
55
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
56
}
57
62
public
function
getType
()
63
{
64
if
(is_null($this->type)) {
66
$data = $this->
raw
(self::FIELD_TYPE);
67
if
(is_null($data)) {
68
return
null
;
69
}
70
$this->type = (string) $data;
71
}
72
73
return
$this->type
;
74
}
75
82
public
function
getKey
()
83
{
84
if
(is_null($this->key)) {
86
$data = $this->
raw
(self::FIELD_KEY);
87
if
(is_null($data)) {
88
return
null
;
89
}
90
$this->key = (string) $data;
91
}
92
93
return
$this->key
;
94
}
95
102
public
function
getCustomer
()
103
{
104
if
(is_null($this->customer)) {
106
$data = $this->
raw
(self::FIELD_CUSTOMER);
107
if
(is_null($data)) {
108
return
null
;
109
}
110
111
$this->customer =
ReferenceModel::of
($data);
112
}
113
114
return
$this->customer
;
115
}
116
117
121
public
function
setKey
(?
string
$key
): void
122
{
123
$this->key =
$key
;
124
}
125
129
public
function
setCustomer
(?
Reference
$customer
): void
130
{
131
$this->customer =
$customer
;
132
}
133
134
135
136
}
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\History\Models\Common\ReferenceModel
Definition:
ReferenceModel.php:21
Commercetools\History\Models\Label\QuoteRequestLabelModel
Definition:
QuoteRequestLabelModel.php:23
Commercetools\History\Models\Label\QuoteRequestLabelModel\setCustomer
setCustomer(?Reference $customer)
Definition:
QuoteRequestLabelModel.php:129
Commercetools\History\Models\Label\QuoteRequestLabelModel\getCustomer
getCustomer()
Definition:
QuoteRequestLabelModel.php:102
Commercetools\History\Models\Label\QuoteRequestLabelModel\__construct
__construct(?string $key=null, ?Reference $customer=null, ?string $type=null)
Definition:
QuoteRequestLabelModel.php:48
Commercetools\History\Models\Label\QuoteRequestLabelModel\setKey
setKey(?string $key)
Definition:
QuoteRequestLabelModel.php:121
Commercetools\History\Models\Label\QuoteRequestLabelModel\getType
getType()
Definition:
QuoteRequestLabelModel.php:62
Commercetools\History\Models\Label\QuoteRequestLabelModel\$type
$type
Definition:
QuoteRequestLabelModel.php:30
Commercetools\History\Models\Label\QuoteRequestLabelModel\getKey
getKey()
Definition:
QuoteRequestLabelModel.php:82
Commercetools\History\Models\Label\QuoteRequestLabelModel\$key
$key
Definition:
QuoteRequestLabelModel.php:36
Commercetools\History\Models\Label\QuoteRequestLabelModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition:
QuoteRequestLabelModel.php:25
Commercetools\History\Models\Label\QuoteRequestLabelModel\$customer
$customer
Definition:
QuoteRequestLabelModel.php:42
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\History\Models\Common\Reference
Definition:
Reference.php:15
Commercetools\History\Models\Label\QuoteRequestLabel
Definition:
QuoteRequestLabel.php:16
Commercetools\History\Models\Label
Definition:
AssociateRoleLabel.php:9
Generated by
1.9.1