commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CartsConfigurationBuilder.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
21final class CartsConfigurationBuilder implements Builder
22{
27 private $deleteDaysAfterLastModification;
28
33 private $countryTaxRateFallbackEnabled;
34
39 private $priceRoundingMode;
40
45 private $taxRoundingMode;
46
60 {
61 return $this->deleteDaysAfterLastModification;
62 }
63
71 {
72 return $this->countryTaxRateFallbackEnabled;
73 }
74
82 public function getPriceRoundingMode()
83 {
84 return $this->priceRoundingMode;
85 }
86
94 public function getTaxRoundingMode()
95 {
96 return $this->taxRoundingMode;
97 }
98
103 public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)
104 {
105 $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification;
106
107 return $this;
108 }
109
114 public function withCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
115 {
116 $this->countryTaxRateFallbackEnabled = $countryTaxRateFallbackEnabled;
117
118 return $this;
119 }
120
125 public function withPriceRoundingMode(?string $priceRoundingMode)
126 {
127 $this->priceRoundingMode = $priceRoundingMode;
128
129 return $this;
130 }
131
136 public function withTaxRoundingMode(?string $taxRoundingMode)
137 {
138 $this->taxRoundingMode = $taxRoundingMode;
139
140 return $this;
141 }
142
143
144 public function build(): CartsConfiguration
145 {
146 return new CartsConfigurationModel(
147 $this->deleteDaysAfterLastModification,
148 $this->countryTaxRateFallbackEnabled,
149 $this->priceRoundingMode,
150 $this->taxRoundingMode
151 );
152 }
153
154 public static function of(): CartsConfigurationBuilder
155 {
156 return new self();
157 }
158}
withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)