commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
CartSetKeyActionBuilder.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
CartSetKeyActionBuilder
implements
Builder
22
{
27
private
$key;
28
36
public
function
getKey
()
37
{
38
return
$this->key;
39
}
40
45
public
function
withKey
(?
string
$key)
46
{
47
$this->key = $key;
48
49
return
$this;
50
}
51
52
53
public
function
build
():
CartSetKeyAction
54
{
55
return
new
CartSetKeyActionModel
(
56
$this->key
57
);
58
}
59
60
public
static
function
of
():
CartSetKeyActionBuilder
61
{
62
return
new
self
();
63
}
64
}
Commercetools\Api\Models\Cart\CartSetKeyActionBuilder
Definition:
CartSetKeyActionBuilder.php:22
Commercetools\Api\Models\Cart\CartSetKeyActionBuilder\withKey
withKey(?string $key)
Definition:
CartSetKeyActionBuilder.php:45
Commercetools\Api\Models\Cart\CartSetKeyActionBuilder\of
static of()
Definition:
CartSetKeyActionBuilder.php:60
Commercetools\Api\Models\Cart\CartSetKeyActionBuilder\build
build()
Definition:
CartSetKeyActionBuilder.php:53
Commercetools\Api\Models\Cart\CartSetKeyActionBuilder\getKey
getKey()
Definition:
CartSetKeyActionBuilder.php:36
Commercetools\Api\Models\Cart\CartSetKeyActionModel
Definition:
CartSetKeyActionModel.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\CartSetKeyAction
Definition:
CartSetKeyAction.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