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