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
QuoteRequest
QuoteRequestDraftBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\QuoteRequest
;
10
11
use
Commercetools\Api\Models\Cart\CartResourceIdentifier
;
12
use
Commercetools\Api\Models\Cart\CartResourceIdentifierBuilder
;
13
use
Commercetools\Api\Models\State\StateReference
;
14
use
Commercetools\Api\Models\State\StateReferenceBuilder
;
15
use
Commercetools\Api\Models\Type\CustomFieldsDraft
;
16
use
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
;
17
use
Commercetools\Base\Builder
;
18
use
Commercetools\Base\DateTimeImmutableCollection
;
19
use
Commercetools\Base\JsonObject
;
20
use
Commercetools\Base\JsonObjectModel
;
21
use
Commercetools\Base\MapperFactory
;
22
use stdClass;
23
27
final
class
QuoteRequestDraftBuilder
implements
Builder
28
{
33
private
$cart;
34
39
private
$cartVersion;
40
45
private
$key;
46
51
private
$comment;
52
57
private
$custom;
58
63
private
$state;
64
69
private
$purchaseOrderNumber;
70
79
public
function
getCart
()
80
{
81
return
$this->cart instanceof
CartResourceIdentifierBuilder
? $this->cart->
build
() : $this->cart;
82
}
83
90
public
function
getCartVersion
()
91
{
92
return
$this->cartVersion;
93
}
94
101
public
function
getKey
()
102
{
103
return
$this->key;
104
}
105
112
public
function
getComment
()
113
{
114
return
$this->comment;
115
}
116
123
public
function
getCustom
()
124
{
125
return
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom;
126
}
127
135
public
function
getState
()
136
{
137
return
$this->state instanceof
StateReferenceBuilder
? $this->state->
build
() : $this->state;
138
}
139
147
public
function
getPurchaseOrderNumber
()
148
{
149
return
$this->purchaseOrderNumber;
150
}
151
156
public
function
withCart
(?
CartResourceIdentifier
$cart)
157
{
158
$this->cart = $cart;
159
160
return
$this;
161
}
162
167
public
function
withCartVersion
(?
int
$cartVersion)
168
{
169
$this->cartVersion = $cartVersion;
170
171
return
$this;
172
}
173
178
public
function
withKey
(?
string
$key)
179
{
180
$this->key = $key;
181
182
return
$this;
183
}
184
189
public
function
withComment
(?
string
$comment)
190
{
191
$this->comment = $comment;
192
193
return
$this;
194
}
195
200
public
function
withCustom
(?
CustomFieldsDraft
$custom)
201
{
202
$this->custom = $custom;
203
204
return
$this;
205
}
206
211
public
function
withState
(?
StateReference
$state)
212
{
213
$this->state = $state;
214
215
return
$this;
216
}
217
222
public
function
withPurchaseOrderNumber
(?
string
$purchaseOrderNumber)
223
{
224
$this->purchaseOrderNumber = $purchaseOrderNumber;
225
226
return
$this;
227
}
228
233
public
function
withCartBuilder
(?
CartResourceIdentifierBuilder
$cart)
234
{
235
$this->cart = $cart;
236
237
return
$this;
238
}
239
244
public
function
withCustomBuilder
(?
CustomFieldsDraftBuilder
$custom)
245
{
246
$this->custom = $custom;
247
248
return
$this;
249
}
250
255
public
function
withStateBuilder
(?
StateReferenceBuilder
$state)
256
{
257
$this->state = $state;
258
259
return
$this;
260
}
261
262
public
function
build
():
QuoteRequestDraft
263
{
264
return
new
QuoteRequestDraftModel
(
265
$this->cart instanceof
CartResourceIdentifierBuilder
? $this->cart->
build
() : $this->cart,
266
$this->cartVersion,
267
$this->key,
268
$this->comment,
269
$this->custom instanceof
CustomFieldsDraftBuilder
? $this->custom->
build
() : $this->custom,
270
$this->state instanceof
StateReferenceBuilder
? $this->state->
build
() : $this->state,
271
$this->purchaseOrderNumber
272
);
273
}
274
275
public
static
function
of
():
QuoteRequestDraftBuilder
276
{
277
return
new
self
();
278
}
279
}
Commercetools\Api\Models\Cart\CartResourceIdentifierBuilder
Definition
CartResourceIdentifierBuilder.php:24
Commercetools\Api\Models\Cart\CartResourceIdentifierBuilder\build
build()
Definition
CartResourceIdentifierBuilder.php:82
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder
Definition
QuoteRequestDraftBuilder.php:28
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withStateBuilder
withStateBuilder(?StateReferenceBuilder $state)
Definition
QuoteRequestDraftBuilder.php:255
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withCustomBuilder
withCustomBuilder(?CustomFieldsDraftBuilder $custom)
Definition
QuoteRequestDraftBuilder.php:244
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getCartVersion
getCartVersion()
Definition
QuoteRequestDraftBuilder.php:90
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getCustom
getCustom()
Definition
QuoteRequestDraftBuilder.php:123
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getKey
getKey()
Definition
QuoteRequestDraftBuilder.php:101
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withState
withState(?StateReference $state)
Definition
QuoteRequestDraftBuilder.php:211
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\of
static of()
Definition
QuoteRequestDraftBuilder.php:275
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\build
build()
Definition
QuoteRequestDraftBuilder.php:262
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withCartBuilder
withCartBuilder(?CartResourceIdentifierBuilder $cart)
Definition
QuoteRequestDraftBuilder.php:233
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withComment
withComment(?string $comment)
Definition
QuoteRequestDraftBuilder.php:189
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withPurchaseOrderNumber
withPurchaseOrderNumber(?string $purchaseOrderNumber)
Definition
QuoteRequestDraftBuilder.php:222
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withCartVersion
withCartVersion(?int $cartVersion)
Definition
QuoteRequestDraftBuilder.php:167
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getState
getState()
Definition
QuoteRequestDraftBuilder.php:135
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withCustom
withCustom(?CustomFieldsDraft $custom)
Definition
QuoteRequestDraftBuilder.php:200
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getPurchaseOrderNumber
getPurchaseOrderNumber()
Definition
QuoteRequestDraftBuilder.php:147
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withKey
withKey(?string $key)
Definition
QuoteRequestDraftBuilder.php:178
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\withCart
withCart(?CartResourceIdentifier $cart)
Definition
QuoteRequestDraftBuilder.php:156
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getCart
getCart()
Definition
QuoteRequestDraftBuilder.php:79
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftBuilder\getComment
getComment()
Definition
QuoteRequestDraftBuilder.php:112
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraftModel
Definition
QuoteRequestDraftModel.php:27
Commercetools\Api\Models\State\StateReferenceBuilder
Definition
StateReferenceBuilder.php:24
Commercetools\Api\Models\State\StateReferenceBuilder\build
build()
Definition
StateReferenceBuilder.php:92
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder
Definition
CustomFieldsDraftBuilder.php:22
Commercetools\Api\Models\Type\CustomFieldsDraftBuilder\build
build()
Definition
CustomFieldsDraftBuilder.php:101
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Cart\CartResourceIdentifier
Definition
CartResourceIdentifier.php:16
Commercetools\Api\Models\QuoteRequest\QuoteRequestDraft
Definition
QuoteRequestDraft.php:18
Commercetools\Api\Models\State\StateReference
Definition
StateReference.php:16
Commercetools\Api\Models\Type\CustomFieldsDraft
Definition
CustomFieldsDraft.php:15
Commercetools\Base\Builder
Definition
Builder.php:16
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\QuoteRequest
Definition
QuoteRequest.php:9
Generated by
1.9.8