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
75 {
76 if (is_null($this->deleteDaysAfterLastModification)) {
78 $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_LAST_MODIFICATION);
79 if (is_null($data)) {
80 return null;
81 }
82 $this->deleteDaysAfterLastModification = (int) $data;
83 }
84
86 }
87
95 {
96 if (is_null($this->countryTaxRateFallbackEnabled)) {
98 $data = $this->raw(self::FIELD_COUNTRY_TAX_RATE_FALLBACK_ENABLED);
99 if (is_null($data)) {
100 return null;
101 }
102 $this->countryTaxRateFallbackEnabled = (bool) $data;
103 }
104
106 }
107
115 public function getPriceRoundingMode()
116 {
117 if (is_null($this->priceRoundingMode)) {
119 $data = $this->raw(self::FIELD_PRICE_ROUNDING_MODE);
120 if (is_null($data)) {
121 return null;
122 }
123 $this->priceRoundingMode = (string) $data;
124 }
125
127 }
128
136 public function getTaxRoundingMode()
137 {
138 if (is_null($this->taxRoundingMode)) {
140 $data = $this->raw(self::FIELD_TAX_ROUNDING_MODE);
141 if (is_null($data)) {
142 return null;
143 }
144 $this->taxRoundingMode = (string) $data;
145 }
146
148 }
149
150
155 {
156 $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification;
157 }
158
163 {
164 $this->countryTaxRateFallbackEnabled = $countryTaxRateFallbackEnabled;
165 }
166
170 public function setPriceRoundingMode(?string $priceRoundingMode): void
171 {
172 $this->priceRoundingMode = $priceRoundingMode;
173 }
174
178 public function setTaxRoundingMode(?string $taxRoundingMode): void
179 {
180 $this->taxRoundingMode = $taxRoundingMode;
181 }
182}
setCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
__construct(?int $deleteDaysAfterLastModification=null, ?bool $countryTaxRateFallbackEnabled=null, ?string $priceRoundingMode=null, ?string $taxRoundingMode=null)
setDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)