commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartsConfigurationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
27
33
39
45
46
50 public function __construct(
53 ?string $priceRoundingMode = null,
54 ?string $taxRoundingMode = null
55 ) {
56 $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification;
57 $this->countryTaxRateFallbackEnabled = $countryTaxRateFallbackEnabled;
58 $this->priceRoundingMode = $priceRoundingMode;
59 $this->taxRoundingMode = $taxRoundingMode;
60 }
61
74 {
75 if (is_null($this->deleteDaysAfterLastModification)) {
77 $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION);
78 if (is_null($data)) {
79 return null;
80 }
81 $this->deleteDaysAfterLastModification = (int) $data;
82 }
83
85 }
86
94 {
95 if (is_null($this->countryTaxRateFallbackEnabled)) {
97 $data = $this->raw(self::FIELD_COUNTRY_TAX_RATE_FALLBACK_ENABLED);
98 if (is_null($data)) {
99 return null;
100 }
101 $this->countryTaxRateFallbackEnabled = (bool) $data;
102 }
103
105 }
106
114 public function getPriceRoundingMode()
115 {
116 if (is_null($this->priceRoundingMode)) {
118 $data = $this->raw(self::FIELD_PRICE_ROUNDING_MODE);
119 if (is_null($data)) {
120 return null;
121 }
122 $this->priceRoundingMode = (string) $data;
123 }
124
126 }
127
135 public function getTaxRoundingMode()
136 {
137 if (is_null($this->taxRoundingMode)) {
139 $data = $this->raw(self::FIELD_TAX_ROUNDING_MODE);
140 if (is_null($data)) {
141 return null;
142 }
143 $this->taxRoundingMode = (string) $data;
144 }
145
147 }
148
149
154 {
155 $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification;
156 }
157
162 {
163 $this->countryTaxRateFallbackEnabled = $countryTaxRateFallbackEnabled;
164 }
165
169 public function setPriceRoundingMode(?string $priceRoundingMode): void
170 {
171 $this->priceRoundingMode = $priceRoundingMode;
172 }
173
177 public function setTaxRoundingMode(?string $taxRoundingMode): void
178 {
179 $this->taxRoundingMode = $taxRoundingMode;
180 }
181}
setCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
__construct(?int $deleteDaysAfterLastModification=null, ?bool $countryTaxRateFallbackEnabled=null, ?string $priceRoundingMode=null, ?string $taxRoundingMode=null)
setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)