commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
MessagesConfigurationDraftModel.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
73 {
74 if (is_null($this->deleteDaysAfterCreation)) {
76 $data = $this->raw(self::FIELD_DELETE_DAYS_AFTER_CREATION);
77 if (is_null($data)) {
78 return null;
79 }
80 $this->deleteDaysAfterCreation = (int) $data;
81 }
82
84 }
85
86
90 public function setEnabled(?bool $enabled): void
91 {
92 $this->enabled = $enabled;
93 }
94
99 {
100 $this->deleteDaysAfterCreation = $deleteDaysAfterCreation;
101 }
102}
__construct(?bool $enabled=null, ?int $deleteDaysAfterCreation=null)