commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
MessagesConfigurationModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $enabled;
27
33
34
38 public function __construct(
39 ?bool $enabled = null,
40 ?int $deleteDaysAfterCreation = null
41 ) {
42 $this->enabled = $enabled;
43 $this->deleteDaysAfterCreation = $deleteDaysAfterCreation;
44 }
45
52 public function getEnabled()
53 {
54 if (is_null($this->enabled)) {
56 $data = $this->raw(self::FIELD_ENABLED);
57 if (is_null($data)) {
58 return null;
59 }
60 $this->enabled = (bool) $data;
61 }
62
63 return $this->enabled;
64 }
65
75 {
76 if (is_null($this->deleteDaysAfterCreation)) {
78 $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_CREATION);
79 if (is_null($data)) {
80 return null;
81 }
82 $this->deleteDaysAfterCreation = (int) $data;
83 }
84
86 }
87
88
92 public function setEnabled(?bool $enabled): void
93 {
94 $this->enabled = $enabled;
95 }
96
101 {
102 $this->deleteDaysAfterCreation = $deleteDaysAfterCreation;
103 }
104}
__construct(?bool $enabled=null, ?int $deleteDaysAfterCreation=null)