commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
CartSetDirectDiscountsActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Cart
;
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
CartSetDirectDiscountsActionBuilder
implements
Builder
22
{
27
private
$discounts;
28
39
public
function
getDiscounts
()
40
{
41
return
$this->discounts;
42
}
43
48
public
function
withDiscounts
(?
DirectDiscountDraftCollection
$discounts)
49
{
50
$this->discounts = $discounts;
51
52
return
$this;
53
}
54
55
56
public
function
build
():
CartSetDirectDiscountsAction
57
{
58
return
new
CartSetDirectDiscountsActionModel
(
59
$this->discounts
60
);
61
}
62
63
public
static
function
of
():
CartSetDirectDiscountsActionBuilder
64
{
65
return
new
self
();
66
}
67
}
Commercetools\Api\Models\Cart\CartSetDirectDiscountsActionBuilder
Definition:
CartSetDirectDiscountsActionBuilder.php:22
Commercetools\Api\Models\Cart\CartSetDirectDiscountsActionBuilder\of
static of()
Definition:
CartSetDirectDiscountsActionBuilder.php:63
Commercetools\Api\Models\Cart\CartSetDirectDiscountsActionBuilder\build
build()
Definition:
CartSetDirectDiscountsActionBuilder.php:56
Commercetools\Api\Models\Cart\CartSetDirectDiscountsActionBuilder\getDiscounts
getDiscounts()
Definition:
CartSetDirectDiscountsActionBuilder.php:39
Commercetools\Api\Models\Cart\CartSetDirectDiscountsActionBuilder\withDiscounts
withDiscounts(?DirectDiscountDraftCollection $discounts)
Definition:
CartSetDirectDiscountsActionBuilder.php:48
Commercetools\Api\Models\Cart\CartSetDirectDiscountsActionModel
Definition:
CartSetDirectDiscountsActionModel.php:21
Commercetools\Api\Models\Cart\DirectDiscountDraftCollection
Definition:
DirectDiscountDraftCollection.php:22
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\CartSetDirectDiscountsAction
Definition:
CartSetDirectDiscountsAction.php:15
Commercetools\Base\Builder
Definition:
Builder.php:16
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Cart
Definition:
Cart.php:9
Generated by
1.9.1