commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
MethodTaxedPriceModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $shippingMethodKey;
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 
99  public function setTaxedPrice(?TaxedItemPrice $taxedPrice): void
100  {
101  $this->taxedPrice = $taxedPrice;
102  }
103 }
__construct(?string $shippingMethodKey=null, ?TaxedItemPrice $taxedPrice=null)