commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
CartSetShippingAddressActionBuilder.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Cart
;
10
11
use
Commercetools\Api\Models\Common\BaseAddress
;
12
use
Commercetools\Api\Models\Common\BaseAddressBuilder
;
13
use
Commercetools\Base\Builder
;
14
use
Commercetools\Base\DateTimeImmutableCollection
;
15
use
Commercetools\Base\JsonObject
;
16
use
Commercetools\Base\JsonObjectModel
;
17
use
Commercetools\Base\MapperFactory
;
18
use stdClass;
19
23
final
class
CartSetShippingAddressActionBuilder
implements
Builder
24
{
29
private
$address;
30
38
public
function
getAddress
()
39
{
40
return
$this->address instanceof
BaseAddressBuilder
? $this->address->
build
() : $this->address;
41
}
42
47
public
function
withAddress
(?
BaseAddress
$address)
48
{
49
$this->address = $address;
50
51
return
$this;
52
}
53
58
public
function
withAddressBuilder
(?
BaseAddressBuilder
$address)
59
{
60
$this->address = $address;
61
62
return
$this;
63
}
64
65
public
function
build
():
CartSetShippingAddressAction
66
{
67
return
new
CartSetShippingAddressActionModel
(
68
$this->address instanceof
BaseAddressBuilder
? $this->address->
build
() : $this->address
69
);
70
}
71
72
public
static
function
of
():
CartSetShippingAddressActionBuilder
73
{
74
return
new
self
();
75
}
76
}
Commercetools\Api\Models\Cart\CartSetShippingAddressActionBuilder
Definition:
CartSetShippingAddressActionBuilder.php:24
Commercetools\Api\Models\Cart\CartSetShippingAddressActionBuilder\withAddressBuilder
withAddressBuilder(?BaseAddressBuilder $address)
Definition:
CartSetShippingAddressActionBuilder.php:58
Commercetools\Api\Models\Cart\CartSetShippingAddressActionBuilder\withAddress
withAddress(?BaseAddress $address)
Definition:
CartSetShippingAddressActionBuilder.php:47
Commercetools\Api\Models\Cart\CartSetShippingAddressActionBuilder\build
build()
Definition:
CartSetShippingAddressActionBuilder.php:65
Commercetools\Api\Models\Cart\CartSetShippingAddressActionBuilder\of
static of()
Definition:
CartSetShippingAddressActionBuilder.php:72
Commercetools\Api\Models\Cart\CartSetShippingAddressActionBuilder\getAddress
getAddress()
Definition:
CartSetShippingAddressActionBuilder.php:38
Commercetools\Api\Models\Cart\CartSetShippingAddressActionModel
Definition:
CartSetShippingAddressActionModel.php:23
Commercetools\Api\Models\Common\BaseAddressBuilder
Definition:
BaseAddressBuilder.php:22
Commercetools\Api\Models\Common\BaseAddressBuilder\build
build()
Definition:
BaseAddressBuilder.php:726
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\CartSetShippingAddressAction
Definition:
CartSetShippingAddressAction.php:16
Commercetools\Api\Models\Common\BaseAddress
Definition:
BaseAddress.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