commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
CartDiscount
CartDiscountChangeValueActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\CartDiscount
;
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
21
final
class
CartDiscountChangeValueActionBuilder
implements
Builder
22
{
27
private
$value;
28
36
public
function
getValue
()
37
{
38
return
$this->value instanceof
CartDiscountValueDraftBuilder
? $this->value->
build
() : $this->value;
39
}
40
45
public
function
withValue
(?
CartDiscountValueDraft
$value)
46
{
47
$this->value = $value;
48
49
return
$this;
50
}
51
56
public
function
withValueBuilder
(?
CartDiscountValueDraftBuilder
$value)
57
{
58
$this->value = $value;
59
60
return
$this;
61
}
62
63
public
function
build
():
CartDiscountChangeValueAction
64
{
65
return
new
CartDiscountChangeValueActionModel
(
66
$this->value instanceof
CartDiscountValueDraftBuilder
? $this->value->
build
() : $this->value
67
);
68
}
69
70
public
static
function
of
():
CartDiscountChangeValueActionBuilder
71
{
72
return
new
self
();
73
}
74
}
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionBuilder
Definition:
CartDiscountChangeValueActionBuilder.php:22
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionBuilder\of
static of()
Definition:
CartDiscountChangeValueActionBuilder.php:70
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionBuilder\withValueBuilder
withValueBuilder(?CartDiscountValueDraftBuilder $value)
Definition:
CartDiscountChangeValueActionBuilder.php:56
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionBuilder\withValue
withValue(?CartDiscountValueDraft $value)
Definition:
CartDiscountChangeValueActionBuilder.php:45
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionBuilder\getValue
getValue()
Definition:
CartDiscountChangeValueActionBuilder.php:36
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionBuilder\build
build()
Definition:
CartDiscountChangeValueActionBuilder.php:63
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueActionModel
Definition:
CartDiscountChangeValueActionModel.php:21
Commercetools\Api\Models\CartDiscount\CartDiscountValueDraftBuilder
Definition:
CartDiscountValueDraftBuilder.php:22
Commercetools\Api\Models\CartDiscount\CartDiscountValueDraftBuilder\build
build()
Definition:
CartDiscountValueDraftBuilder.php:23
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\CartDiscount\CartDiscountChangeValueAction
Definition:
CartDiscountChangeValueAction.php:15
Commercetools\Api\Models\CartDiscount\CartDiscountValueDraft
Definition:
CartDiscountValueDraft.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\CartDiscount
Definition:
CartDiscount.php:9
Generated by
1.9.1