commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Cart
MethodTaxedPriceBuilder.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
MethodTaxedPriceBuilder
implements
Builder
22
{
27
private
$shippingMethodKey;
28
33
private
$taxedPrice;
34
41
public
function
getShippingMethodKey
()
42
{
43
return
$this->shippingMethodKey;
44
}
45
52
public
function
getTaxedPrice
()
53
{
54
return
$this->taxedPrice instanceof
TaxedItemPriceBuilder
? $this->taxedPrice->
build
() : $this->taxedPrice;
55
}
56
61
public
function
withShippingMethodKey
(?
string
$shippingMethodKey)
62
{
63
$this->shippingMethodKey = $shippingMethodKey;
64
65
return
$this;
66
}
67
72
public
function
withTaxedPrice
(?
TaxedItemPrice
$taxedPrice)
73
{
74
$this->taxedPrice = $taxedPrice;
75
76
return
$this;
77
}
78
83
public
function
withTaxedPriceBuilder
(?
TaxedItemPriceBuilder
$taxedPrice)
84
{
85
$this->taxedPrice = $taxedPrice;
86
87
return
$this;
88
}
89
90
public
function
build
():
MethodTaxedPrice
91
{
92
return
new
MethodTaxedPriceModel
(
93
$this->shippingMethodKey,
94
$this->taxedPrice instanceof
TaxedItemPriceBuilder
? $this->taxedPrice->
build
() : $this->taxedPrice
95
);
96
}
97
98
public
static
function
of
():
MethodTaxedPriceBuilder
99
{
100
return
new
self
();
101
}
102
}
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder
Definition:
MethodTaxedPriceBuilder.php:22
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\withShippingMethodKey
withShippingMethodKey(?string $shippingMethodKey)
Definition:
MethodTaxedPriceBuilder.php:61
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\withTaxedPrice
withTaxedPrice(?TaxedItemPrice $taxedPrice)
Definition:
MethodTaxedPriceBuilder.php:72
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\build
build()
Definition:
MethodTaxedPriceBuilder.php:90
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\getTaxedPrice
getTaxedPrice()
Definition:
MethodTaxedPriceBuilder.php:52
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\withTaxedPriceBuilder
withTaxedPriceBuilder(?TaxedItemPriceBuilder $taxedPrice)
Definition:
MethodTaxedPriceBuilder.php:83
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\of
static of()
Definition:
MethodTaxedPriceBuilder.php:98
Commercetools\Api\Models\Cart\MethodTaxedPriceBuilder\getShippingMethodKey
getShippingMethodKey()
Definition:
MethodTaxedPriceBuilder.php:41
Commercetools\Api\Models\Cart\MethodTaxedPriceModel
Definition:
MethodTaxedPriceModel.php:21
Commercetools\Api\Models\Cart\TaxedItemPriceBuilder
Definition:
TaxedItemPriceBuilder.php:24
Commercetools\Api\Models\Cart\TaxedItemPriceBuilder\build
build()
Definition:
TaxedItemPriceBuilder.php:172
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\MethodTaxedPrice
Definition:
MethodTaxedPrice.php:15
Commercetools\Api\Models\Cart\TaxedItemPrice
Definition:
TaxedItemPrice.php:16
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