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
QuoteLabelModel.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
QuoteLabelModel
extends
JsonObjectModel
implements
QuoteLabel
23
{
24
25
public
const
DISCRIMINATOR_VALUE
=
'QuoteLabel'
;
30
protected
$type
;
31
36
protected
$key
;
37
42
protected
$customer
;
43
48
protected
$stagedQuote
;
49
54
protected
$quoteRequest
;
55
56
60
public
function
__construct
(
61
?
string
$key
=
null
,
62
?
Reference
$customer
=
null
,
63
?
Reference
$stagedQuote
=
null
,
64
?
Reference
$quoteRequest
=
null
,
65
?
string
$type
=
null
66
) {
67
$this->key =
$key
;
68
$this->customer =
$customer
;
69
$this->stagedQuote =
$stagedQuote
;
70
$this->quoteRequest =
$quoteRequest
;
71
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
72
}
73
78
public
function
getType
()
79
{
80
if
(is_null($this->type)) {
82
$data = $this->
raw
(self::FIELD_TYPE);
83
if
(is_null($data)) {
84
return
null
;
85
}
86
$this->type = (string) $data;
87
}
88
89
return
$this->type
;
90
}
91
98
public
function
getKey
()
99
{
100
if
(is_null($this->key)) {
102
$data = $this->
raw
(self::FIELD_KEY);
103
if
(is_null($data)) {
104
return
null
;
105
}
106
$this->key = (string) $data;
107
}
108
109
return
$this->key
;
110
}
111
118
public
function
getCustomer
()
119
{
120
if
(is_null($this->customer)) {
122
$data = $this->
raw
(self::FIELD_CUSTOMER);
123
if
(is_null($data)) {
124
return
null
;
125
}
126
127
$this->customer = ReferenceModel::of($data);
128
}
129
130
return
$this->customer
;
131
}
132
139
public
function
getStagedQuote
()
140
{
141
if
(is_null($this->stagedQuote)) {
143
$data = $this->
raw
(self::FIELD_STAGED_QUOTE);
144
if
(is_null($data)) {
145
return
null
;
146
}
147
148
$this->stagedQuote = ReferenceModel::of($data);
149
}
150
151
return
$this->stagedQuote
;
152
}
153
160
public
function
getQuoteRequest
()
161
{
162
if
(is_null($this->quoteRequest)) {
164
$data = $this->
raw
(self::FIELD_QUOTE_REQUEST);
165
if
(is_null($data)) {
166
return
null
;
167
}
168
169
$this->quoteRequest = ReferenceModel::of($data);
170
}
171
172
return
$this->quoteRequest
;
173
}
174
175
179
public
function
setKey
(?
string
$key
): void
180
{
181
$this->key =
$key
;
182
}
183
187
public
function
setCustomer
(?
Reference
$customer
): void
188
{
189
$this->customer =
$customer
;
190
}
191
195
public
function
setStagedQuote
(?
Reference
$stagedQuote
): void
196
{
197
$this->stagedQuote =
$stagedQuote
;
198
}
199
203
public
function
setQuoteRequest
(?
Reference
$quoteRequest
): void
204
{
205
$this->quoteRequest =
$quoteRequest
;
206
}
207
208
209
210
}
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\Common\ReferenceModel
Definition
ReferenceModel.php:21
Commercetools\History\Models\Label\QuoteLabelModel
Definition
QuoteLabelModel.php:23
Commercetools\History\Models\Label\QuoteLabelModel\getStagedQuote
getStagedQuote()
Definition
QuoteLabelModel.php:139
Commercetools\History\Models\Label\QuoteLabelModel\$key
$key
Definition
QuoteLabelModel.php:36
Commercetools\History\Models\Label\QuoteLabelModel\setStagedQuote
setStagedQuote(?Reference $stagedQuote)
Definition
QuoteLabelModel.php:195
Commercetools\History\Models\Label\QuoteLabelModel\setQuoteRequest
setQuoteRequest(?Reference $quoteRequest)
Definition
QuoteLabelModel.php:203
Commercetools\History\Models\Label\QuoteLabelModel\$quoteRequest
$quoteRequest
Definition
QuoteLabelModel.php:54
Commercetools\History\Models\Label\QuoteLabelModel\getType
getType()
Definition
QuoteLabelModel.php:78
Commercetools\History\Models\Label\QuoteLabelModel\$customer
$customer
Definition
QuoteLabelModel.php:42
Commercetools\History\Models\Label\QuoteLabelModel\__construct
__construct(?string $key=null, ?Reference $customer=null, ?Reference $stagedQuote=null, ?Reference $quoteRequest=null, ?string $type=null)
Definition
QuoteLabelModel.php:60
Commercetools\History\Models\Label\QuoteLabelModel\setKey
setKey(?string $key)
Definition
QuoteLabelModel.php:179
Commercetools\History\Models\Label\QuoteLabelModel\$stagedQuote
$stagedQuote
Definition
QuoteLabelModel.php:48
Commercetools\History\Models\Label\QuoteLabelModel\setCustomer
setCustomer(?Reference $customer)
Definition
QuoteLabelModel.php:187
Commercetools\History\Models\Label\QuoteLabelModel\getQuoteRequest
getQuoteRequest()
Definition
QuoteLabelModel.php:160
Commercetools\History\Models\Label\QuoteLabelModel\getKey
getKey()
Definition
QuoteLabelModel.php:98
Commercetools\History\Models\Label\QuoteLabelModel\$type
$type
Definition
QuoteLabelModel.php:30
Commercetools\History\Models\Label\QuoteLabelModel\getCustomer
getCustomer()
Definition
QuoteLabelModel.php:118
Commercetools\History\Models\Label\QuoteLabelModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
QuoteLabelModel.php:25
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\History\Models\Common\Reference
Definition
Reference.php:15
Commercetools\History\Models\Label\QuoteLabel
Definition
QuoteLabel.php:16
Commercetools\History\Models\Label
Definition
AssociateRoleLabel.php:9
Generated by
1.9.8