commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
MethodTaxedPriceModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
27
32 protected $taxedPrice;
33
34
38 public function __construct(
39 ?string $shippingMethodKey = 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
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
100 {
101 $this->taxedPrice = $taxedPrice;
102 }
103}
__construct(?string $shippingMethodKey=null, ?TaxedItemPrice $taxedPrice=null)