commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
CartSetCountryActionBuilder.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
CartSetCountryActionBuilder
implements
Builder
22
{
27
private
$country;
28
38
public
function
getCountry
()
39
{
40
return
$this->country;
41
}
42
47
public
function
withCountry
(?
string
$country)
48
{
49
$this->country = $country;
50
51
return
$this;
52
}
53
54
55
public
function
build
():
CartSetCountryAction
56
{
57
return
new
CartSetCountryActionModel
(
58
$this->country
59
);
60
}
61
62
public
static
function
of
():
CartSetCountryActionBuilder
63
{
64
return
new
self
();
65
}
66
}
Commercetools\Api\Models\Cart\CartSetCountryActionBuilder
Definition:
CartSetCountryActionBuilder.php:22
Commercetools\Api\Models\Cart\CartSetCountryActionBuilder\of
static of()
Definition:
CartSetCountryActionBuilder.php:62
Commercetools\Api\Models\Cart\CartSetCountryActionBuilder\build
build()
Definition:
CartSetCountryActionBuilder.php:55
Commercetools\Api\Models\Cart\CartSetCountryActionBuilder\getCountry
getCountry()
Definition:
CartSetCountryActionBuilder.php:38
Commercetools\Api\Models\Cart\CartSetCountryActionBuilder\withCountry
withCountry(?string $country)
Definition:
CartSetCountryActionBuilder.php:47
Commercetools\Api\Models\Cart\CartSetCountryActionModel
Definition:
CartSetCountryActionModel.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\CartSetCountryAction
Definition:
CartSetCountryAction.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