commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
lib
commercetools-api
src
Models
Message
MessagesConfigurationDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Message
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
MessagesConfigurationDraftModel
extends
JsonObjectModel
implements
MessagesConfigurationDraft
21
{
26
protected
$enabled
;
27
32
protected
$deleteDaysAfterCreation
;
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
72
public
function
getDeleteDaysAfterCreation
()
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
83
return
$this->deleteDaysAfterCreation
;
84
}
85
86
90
public
function
setEnabled
(?
bool
$enabled
): void
91
{
92
$this->enabled =
$enabled
;
93
}
94
98
public
function
setDeleteDaysAfterCreation
(?
int
$deleteDaysAfterCreation
): void
99
{
100
$this->deleteDaysAfterCreation =
$deleteDaysAfterCreation
;
101
}
102
}
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel
Definition
MessagesConfigurationDraftModel.php:21
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\setDeleteDaysAfterCreation
setDeleteDaysAfterCreation(?int $deleteDaysAfterCreation)
Definition
MessagesConfigurationDraftModel.php:98
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\getEnabled
getEnabled()
Definition
MessagesConfigurationDraftModel.php:52
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\$deleteDaysAfterCreation
$deleteDaysAfterCreation
Definition
MessagesConfigurationDraftModel.php:32
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\$enabled
$enabled
Definition
MessagesConfigurationDraftModel.php:26
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\setEnabled
setEnabled(?bool $enabled)
Definition
MessagesConfigurationDraftModel.php:90
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\getDeleteDaysAfterCreation
getDeleteDaysAfterCreation()
Definition
MessagesConfigurationDraftModel.php:72
Commercetools\Api\Models\Message\MessagesConfigurationDraftModel\__construct
__construct(?bool $enabled=null, ?int $deleteDaysAfterCreation=null)
Definition
MessagesConfigurationDraftModel.php:38
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition
MapperFactory.php:16
Commercetools\Api\Models\Message\MessagesConfigurationDraft
Definition
MessagesConfigurationDraft.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8