commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
CartUpdateBuilder.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
CartUpdateBuilder
implements
Builder
22
{
27
private
$version;
28
33
private
$actions;
34
42
public
function
getVersion
()
43
{
44
return
$this->version;
45
}
46
53
public
function
getActions
()
54
{
55
return
$this->actions;
56
}
57
62
public
function
withVersion
(?
int
$version)
63
{
64
$this->version = $version;
65
66
return
$this;
67
}
68
73
public
function
withActions
(?
CartUpdateActionCollection
$actions)
74
{
75
$this->actions = $actions;
76
77
return
$this;
78
}
79
80
81
public
function
build
():
CartUpdate
82
{
83
return
new
CartUpdateModel
(
84
$this->version,
85
$this->actions
86
);
87
}
88
89
public
static
function
of
():
CartUpdateBuilder
90
{
91
return
new
self
();
92
}
93
}
Commercetools\Api\Models\Cart\CartUpdateActionCollection
Definition:
CartUpdateActionCollection.php:26
Commercetools\Api\Models\Cart\CartUpdateBuilder
Definition:
CartUpdateBuilder.php:22
Commercetools\Api\Models\Cart\CartUpdateBuilder\getActions
getActions()
Definition:
CartUpdateBuilder.php:53
Commercetools\Api\Models\Cart\CartUpdateBuilder\withVersion
withVersion(?int $version)
Definition:
CartUpdateBuilder.php:62
Commercetools\Api\Models\Cart\CartUpdateBuilder\getVersion
getVersion()
Definition:
CartUpdateBuilder.php:42
Commercetools\Api\Models\Cart\CartUpdateBuilder\withActions
withActions(?CartUpdateActionCollection $actions)
Definition:
CartUpdateBuilder.php:73
Commercetools\Api\Models\Cart\CartUpdateBuilder\build
build()
Definition:
CartUpdateBuilder.php:81
Commercetools\Api\Models\Cart\CartUpdateBuilder\of
static of()
Definition:
CartUpdateBuilder.php:89
Commercetools\Api\Models\Cart\CartUpdateModel
Definition:
CartUpdateModel.php:21
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\CartUpdate
Definition:
CartUpdate.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