commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Cart
MethodTaxedPriceModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Cart
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
MethodTaxedPriceModel
extends
JsonObjectModel
implements
MethodTaxedPrice
21
{
26
protected
$shippingMethodKey
;
27
32
protected
$taxedPrice
;
33
34
38
public
function
__construct
(
39
?
string
$shippingMethodKey
=
null
,
40
?
TaxedItemPrice
$taxedPrice
=
null
41
) {
42
$this->shippingMethodKey =
$shippingMethodKey
;
43
$this->taxedPrice =
$taxedPrice
;
44
}
45
52
public
function
getShippingMethodKey
()
53
{
54
if
(is_null($this->shippingMethodKey)) {
56
$data = $this->
raw
(self::FIELD_SHIPPING_METHOD_KEY);
57
if
(is_null($data)) {
58
return
null
;
59
}
60
$this->shippingMethodKey = (string) $data;
61
}
62
63
return
$this->shippingMethodKey
;
64
}
65
72
public
function
getTaxedPrice
()
73
{
74
if
(is_null($this->taxedPrice)) {
76
$data = $this->
raw
(self::FIELD_TAXED_PRICE);
77
if
(is_null($data)) {
78
return
null
;
79
}
80
81
$this->taxedPrice =
TaxedItemPriceModel::of
($data);
82
}
83
84
return
$this->taxedPrice
;
85
}
86
87
91
public
function
setShippingMethodKey
(?
string
$shippingMethodKey
): void
92
{
93
$this->shippingMethodKey =
$shippingMethodKey
;
94
}
95
99
public
function
setTaxedPrice
(?
TaxedItemPrice
$taxedPrice
): void
100
{
101
$this->taxedPrice =
$taxedPrice
;
102
}
103
}
Commercetools\Api\Models\Cart\MethodTaxedPriceModel
Definition
MethodTaxedPriceModel.php:21
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\$shippingMethodKey
$shippingMethodKey
Definition
MethodTaxedPriceModel.php:26
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\setTaxedPrice
setTaxedPrice(?TaxedItemPrice $taxedPrice)
Definition
MethodTaxedPriceModel.php:99
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\setShippingMethodKey
setShippingMethodKey(?string $shippingMethodKey)
Definition
MethodTaxedPriceModel.php:91
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\__construct
__construct(?string $shippingMethodKey=null, ?TaxedItemPrice $taxedPrice=null)
Definition
MethodTaxedPriceModel.php:38
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\$taxedPrice
$taxedPrice
Definition
MethodTaxedPriceModel.php:32
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\getTaxedPrice
getTaxedPrice()
Definition
MethodTaxedPriceModel.php:72
Commercetools\Api\Models\Cart\MethodTaxedPriceModel\getShippingMethodKey
getShippingMethodKey()
Definition
MethodTaxedPriceModel.php:52
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\BaseJsonObject\of
static of($data=null)
Definition
BaseJsonObject.php:26
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\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Cart
Definition
Cart.php:9
Generated by
1.9.8