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
QuoteLabelBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\History\Models\Label
;
10
11
use
Commercetools\Base\Builder
;
12
use
Commercetools\Base\DateTimeImmutableCollection
;
13
use
Commercetools\Base\JsonObject
;
14
use
Commercetools\Base\JsonObjectModel
;
15
use
Commercetools\Base\MapperFactory
;
16
use stdClass;
17
use
Commercetools\History\Models\Common\Reference
;
18
use
Commercetools\History\Models\Common\ReferenceBuilder
;
19
23
final
class
QuoteLabelBuilder
implements
Builder
24
{
29
private
$key;
30
35
private
$customer;
36
41
private
$stagedQuote;
42
47
private
$quoteRequest;
48
55
public
function
getKey
()
56
{
57
return
$this->key;
58
}
59
66
public
function
getCustomer
()
67
{
68
return
$this->customer instanceof
ReferenceBuilder
? $this->customer->
build
() : $this->customer;
69
}
70
77
public
function
getStagedQuote
()
78
{
79
return
$this->stagedQuote instanceof
ReferenceBuilder
? $this->stagedQuote->
build
() : $this->stagedQuote;
80
}
81
88
public
function
getQuoteRequest
()
89
{
90
return
$this->quoteRequest instanceof
ReferenceBuilder
? $this->quoteRequest->
build
() : $this->quoteRequest;
91
}
92
97
public
function
withKey
(?
string
$key)
98
{
99
$this->key = $key;
100
101
return
$this;
102
}
103
108
public
function
withCustomer
(?
Reference
$customer)
109
{
110
$this->customer = $customer;
111
112
return
$this;
113
}
114
119
public
function
withStagedQuote
(?
Reference
$stagedQuote)
120
{
121
$this->stagedQuote = $stagedQuote;
122
123
return
$this;
124
}
125
130
public
function
withQuoteRequest
(?
Reference
$quoteRequest)
131
{
132
$this->quoteRequest = $quoteRequest;
133
134
return
$this;
135
}
136
141
public
function
withCustomerBuilder
(?
ReferenceBuilder
$customer)
142
{
143
$this->customer = $customer;
144
145
return
$this;
146
}
147
152
public
function
withStagedQuoteBuilder
(?
ReferenceBuilder
$stagedQuote)
153
{
154
$this->stagedQuote = $stagedQuote;
155
156
return
$this;
157
}
158
163
public
function
withQuoteRequestBuilder
(?
ReferenceBuilder
$quoteRequest)
164
{
165
$this->quoteRequest = $quoteRequest;
166
167
return
$this;
168
}
169
170
public
function
build
():
QuoteLabel
171
{
172
return
new
QuoteLabelModel
(
173
$this->key,
174
$this->customer instanceof
ReferenceBuilder
? $this->customer->
build
() : $this->customer,
175
$this->stagedQuote instanceof
ReferenceBuilder
? $this->stagedQuote->
build
() : $this->stagedQuote,
176
$this->quoteRequest instanceof
ReferenceBuilder
? $this->quoteRequest->
build
() : $this->quoteRequest
177
);
178
}
179
180
public
static
function
of
():
QuoteLabelBuilder
181
{
182
return
new
self
();
183
}
184
}
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\ReferenceBuilder
Definition
ReferenceBuilder.php:22
Commercetools\History\Models\Common\ReferenceBuilder\build
build()
Definition
ReferenceBuilder.php:76
Commercetools\History\Models\Label\QuoteLabelBuilder
Definition
QuoteLabelBuilder.php:24
Commercetools\History\Models\Label\QuoteLabelBuilder\getKey
getKey()
Definition
QuoteLabelBuilder.php:55
Commercetools\History\Models\Label\QuoteLabelBuilder\withKey
withKey(?string $key)
Definition
QuoteLabelBuilder.php:97
Commercetools\History\Models\Label\QuoteLabelBuilder\withStagedQuoteBuilder
withStagedQuoteBuilder(?ReferenceBuilder $stagedQuote)
Definition
QuoteLabelBuilder.php:152
Commercetools\History\Models\Label\QuoteLabelBuilder\withStagedQuote
withStagedQuote(?Reference $stagedQuote)
Definition
QuoteLabelBuilder.php:119
Commercetools\History\Models\Label\QuoteLabelBuilder\getQuoteRequest
getQuoteRequest()
Definition
QuoteLabelBuilder.php:88
Commercetools\History\Models\Label\QuoteLabelBuilder\getStagedQuote
getStagedQuote()
Definition
QuoteLabelBuilder.php:77
Commercetools\History\Models\Label\QuoteLabelBuilder\withQuoteRequest
withQuoteRequest(?Reference $quoteRequest)
Definition
QuoteLabelBuilder.php:130
Commercetools\History\Models\Label\QuoteLabelBuilder\withCustomerBuilder
withCustomerBuilder(?ReferenceBuilder $customer)
Definition
QuoteLabelBuilder.php:141
Commercetools\History\Models\Label\QuoteLabelBuilder\withQuoteRequestBuilder
withQuoteRequestBuilder(?ReferenceBuilder $quoteRequest)
Definition
QuoteLabelBuilder.php:163
Commercetools\History\Models\Label\QuoteLabelBuilder\of
static of()
Definition
QuoteLabelBuilder.php:180
Commercetools\History\Models\Label\QuoteLabelBuilder\getCustomer
getCustomer()
Definition
QuoteLabelBuilder.php:66
Commercetools\History\Models\Label\QuoteLabelBuilder\build
build()
Definition
QuoteLabelBuilder.php:170
Commercetools\History\Models\Label\QuoteLabelBuilder\withCustomer
withCustomer(?Reference $customer)
Definition
QuoteLabelBuilder.php:108
Commercetools\History\Models\Label\QuoteLabelModel
Definition
QuoteLabelModel.php:23
Commercetools\Base\Builder
Definition
Builder.php:16
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