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
59 {
60 return $this->deleteDaysAfterLastModification;
61 }
62
70 {
71 return $this->countryTaxRateFallbackEnabled;
72 }
73
81 public function getPriceRoundingMode()
82 {
83 return $this->priceRoundingMode;
84 }
85
93 public function getTaxRoundingMode()
94 {
95 return $this->taxRoundingMode;
96 }
97
102 public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)
103 {
104 $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification;
105
106 return $this;
107 }
108
113 public function withCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
114 {
115 $this->countryTaxRateFallbackEnabled = $countryTaxRateFallbackEnabled;
116
117 return $this;
118 }
119
124 public function withPriceRoundingMode(?string $priceRoundingMode)
125 {
126 $this->priceRoundingMode = $priceRoundingMode;
127
128 return $this;
129 }
130
135 public function withTaxRoundingMode(?string $taxRoundingMode)
136 {
137 $this->taxRoundingMode = $taxRoundingMode;
138
139 return $this;
140 }
141
142
143 public function build(): CartsConfiguration
144 {
145 return new CartsConfigurationModel(
146 $this->deleteDaysAfterLastModification,
147 $this->countryTaxRateFallbackEnabled,
148 $this->priceRoundingMode,
149 $this->taxRoundingMode
150 );
151 }
152
153 public static function of(): CartsConfigurationBuilder
154 {
155 return new self();
156 }
157}
withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)