commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Order
OrderFromQuoteDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Order
;
10
11
use
Commercetools\Api\Models\Quote\QuoteResourceIdentifier
;
12
use
Commercetools\Api\Models\Quote\QuoteResourceIdentifierBuilder
;
13
use
Commercetools\Api\Models\State\StateResourceIdentifier
;
14
use
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
;
15
use
Commercetools\Base\Builder
;
16
use
Commercetools\Base\DateTimeImmutableCollection
;
17
use
Commercetools\Base\JsonObject
;
18
use
Commercetools\Base\JsonObjectModel
;
19
use
Commercetools\Base\MapperFactory
;
20
use stdClass;
21
25
final
class
OrderFromQuoteDraftBuilder
implements
Builder
26
{
31
private
$quote;
32
37
private
$version;
38
43
private
$quoteStateToAccepted;
44
49
private
$orderNumber;
50
55
private
$paymentState;
56
61
private
$shipmentState;
62
67
private
$orderState;
68
73
private
$state;
74
82
public
function
getQuote
()
83
{
84
return
$this->quote instanceof
QuoteResourceIdentifierBuilder
? $this->quote->
build
() : $this->quote;
85
}
86
93
public
function
getVersion
()
94
{
95
return
$this->version;
96
}
97
104
public
function
getQuoteStateToAccepted
()
105
{
106
return
$this->quoteStateToAccepted;
107
}
108
116
public
function
getOrderNumber
()
117
{
118
return
$this->orderNumber;
119
}
120
127
public
function
getPaymentState
()
128
{
129
return
$this->paymentState;
130
}
131
138
public
function
getShipmentState
()
139
{
140
return
$this->shipmentState;
141
}
142
149
public
function
getOrderState
()
150
{
151
return
$this->orderState;
152
}
153
160
public
function
getState
()
161
{
162
return
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state;
163
}
164
169
public
function
withQuote
(?
QuoteResourceIdentifier
$quote)
170
{
171
$this->quote = $quote;
172
173
return
$this;
174
}
175
180
public
function
withVersion
(?
int
$version)
181
{
182
$this->version = $version;
183
184
return
$this;
185
}
186
191
public
function
withQuoteStateToAccepted
(?
bool
$quoteStateToAccepted)
192
{
193
$this->quoteStateToAccepted = $quoteStateToAccepted;
194
195
return
$this;
196
}
197
202
public
function
withOrderNumber
(?
string
$orderNumber)
203
{
204
$this->orderNumber = $orderNumber;
205
206
return
$this;
207
}
208
213
public
function
withPaymentState
(?
string
$paymentState)
214
{
215
$this->paymentState = $paymentState;
216
217
return
$this;
218
}
219
224
public
function
withShipmentState
(?
string
$shipmentState)
225
{
226
$this->shipmentState = $shipmentState;
227
228
return
$this;
229
}
230
235
public
function
withOrderState
(?
string
$orderState)
236
{
237
$this->orderState = $orderState;
238
239
return
$this;
240
}
241
246
public
function
withState
(?
StateResourceIdentifier
$state)
247
{
248
$this->state = $state;
249
250
return
$this;
251
}
252
257
public
function
withQuoteBuilder
(?
QuoteResourceIdentifierBuilder
$quote)
258
{
259
$this->quote = $quote;
260
261
return
$this;
262
}
263
268
public
function
withStateBuilder
(?
StateResourceIdentifierBuilder
$state)
269
{
270
$this->state = $state;
271
272
return
$this;
273
}
274
275
public
function
build
():
OrderFromQuoteDraft
276
{
277
return
new
OrderFromQuoteDraftModel
(
278
$this->quote instanceof
QuoteResourceIdentifierBuilder
? $this->quote->
build
() : $this->quote,
279
$this->version,
280
$this->quoteStateToAccepted,
281
$this->orderNumber,
282
$this->paymentState,
283
$this->shipmentState,
284
$this->orderState,
285
$this->state instanceof
StateResourceIdentifierBuilder
? $this->state->
build
() : $this->state
286
);
287
}
288
289
public
static
function
of
():
OrderFromQuoteDraftBuilder
290
{
291
return
new
self
();
292
}
293
}
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder
Definition
OrderFromQuoteDraftBuilder.php:26
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withOrderNumber
withOrderNumber(?string $orderNumber)
Definition
OrderFromQuoteDraftBuilder.php:202
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getQuoteStateToAccepted
getQuoteStateToAccepted()
Definition
OrderFromQuoteDraftBuilder.php:104
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withOrderState
withOrderState(?string $orderState)
Definition
OrderFromQuoteDraftBuilder.php:235
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withPaymentState
withPaymentState(?string $paymentState)
Definition
OrderFromQuoteDraftBuilder.php:213
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withState
withState(?StateResourceIdentifier $state)
Definition
OrderFromQuoteDraftBuilder.php:246
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withQuote
withQuote(?QuoteResourceIdentifier $quote)
Definition
OrderFromQuoteDraftBuilder.php:169
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getPaymentState
getPaymentState()
Definition
OrderFromQuoteDraftBuilder.php:127
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withShipmentState
withShipmentState(?string $shipmentState)
Definition
OrderFromQuoteDraftBuilder.php:224
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\of
static of()
Definition
OrderFromQuoteDraftBuilder.php:289
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getQuote
getQuote()
Definition
OrderFromQuoteDraftBuilder.php:82
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getOrderNumber
getOrderNumber()
Definition
OrderFromQuoteDraftBuilder.php:116
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getOrderState
getOrderState()
Definition
OrderFromQuoteDraftBuilder.php:149
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\build
build()
Definition
OrderFromQuoteDraftBuilder.php:275
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getShipmentState
getShipmentState()
Definition
OrderFromQuoteDraftBuilder.php:138
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withStateBuilder
withStateBuilder(?StateResourceIdentifierBuilder $state)
Definition
OrderFromQuoteDraftBuilder.php:268
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withQuoteBuilder
withQuoteBuilder(?QuoteResourceIdentifierBuilder $quote)
Definition
OrderFromQuoteDraftBuilder.php:257
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getVersion
getVersion()
Definition
OrderFromQuoteDraftBuilder.php:93
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withVersion
withVersion(?int $version)
Definition
OrderFromQuoteDraftBuilder.php:180
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\withQuoteStateToAccepted
withQuoteStateToAccepted(?bool $quoteStateToAccepted)
Definition
OrderFromQuoteDraftBuilder.php:191
Commercetools\Api\Models\Order\OrderFromQuoteDraftBuilder\getState
getState()
Definition
OrderFromQuoteDraftBuilder.php:160
Commercetools\Api\Models\Order\OrderFromQuoteDraftModel
Definition
OrderFromQuoteDraftModel.php:25
Commercetools\Api\Models\Quote\QuoteResourceIdentifierBuilder
Definition
QuoteResourceIdentifierBuilder.php:24
Commercetools\Api\Models\Quote\QuoteResourceIdentifierBuilder\build
build()
Definition
QuoteResourceIdentifierBuilder.php:82
Commercetools\Api\Models\State\StateResourceIdentifierBuilder
Definition
StateResourceIdentifierBuilder.php:24
Commercetools\Api\Models\State\StateResourceIdentifierBuilder\build
build()
Definition
StateResourceIdentifierBuilder.php:82
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Order\OrderFromQuoteDraft
Definition
OrderFromQuoteDraft.php:17
Commercetools\Api\Models\Quote\QuoteResourceIdentifier
Definition
QuoteResourceIdentifier.php:16
Commercetools\Api\Models\State\StateResourceIdentifier
Definition
StateResourceIdentifier.php:16
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Order
Definition
CustomLineItemImportDraft.php:9
Generated by
1.9.8