commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CartsConfigurationBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class CartsConfigurationBuilder implements Builder
22 {
27  private $deleteDaysAfterLastModification;
28 
33  private $countryTaxRateFallbackEnabled;
34 
44  {
45  return $this->deleteDaysAfterLastModification;
46  }
47 
55  {
56  return $this->countryTaxRateFallbackEnabled;
57  }
58 
63  public function withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)
64  {
65  $this->deleteDaysAfterLastModification = $deleteDaysAfterLastModification;
66 
67  return $this;
68  }
69 
74  public function withCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
75  {
76  $this->countryTaxRateFallbackEnabled = $countryTaxRateFallbackEnabled;
77 
78  return $this;
79  }
80 
81 
82  public function build(): CartsConfiguration
83  {
84  return new CartsConfigurationModel(
85  $this->deleteDaysAfterLastModification,
86  $this->countryTaxRateFallbackEnabled
87  );
88  }
89 
90  public static function of(): CartsConfigurationBuilder
91  {
92  return new self();
93  }
94 }
withCountryTaxRateFallbackEnabled(?bool $countryTaxRateFallbackEnabled)
withDeleteDaysAfterLastModification(?int $deleteDaysAfterLastModification)