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
MessagesConfigurationModel.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
MessagesConfigurationModel
extends
JsonObjectModel
implements
MessagesConfiguration
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
74
public
function
getDeleteDaysAfterCreation
()
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
85
return
$this->deleteDaysAfterCreation
;
86
}
87
88
92
public
function
setEnabled
(?
bool
$enabled
): void
93
{
94
$this->enabled =
$enabled
;
95
}
96
100
public
function
setDeleteDaysAfterCreation
(?
int
$deleteDaysAfterCreation
): void
101
{
102
$this->deleteDaysAfterCreation =
$deleteDaysAfterCreation
;
103
}
104
}
Commercetools\Api\Models\Message\MessagesConfigurationModel
Definition
MessagesConfigurationModel.php:21
Commercetools\Api\Models\Message\MessagesConfigurationModel\$deleteDaysAfterCreation
$deleteDaysAfterCreation
Definition
MessagesConfigurationModel.php:32
Commercetools\Api\Models\Message\MessagesConfigurationModel\getDeleteDaysAfterCreation
getDeleteDaysAfterCreation()
Definition
MessagesConfigurationModel.php:74
Commercetools\Api\Models\Message\MessagesConfigurationModel\setDeleteDaysAfterCreation
setDeleteDaysAfterCreation(?int $deleteDaysAfterCreation)
Definition
MessagesConfigurationModel.php:100
Commercetools\Api\Models\Message\MessagesConfigurationModel\setEnabled
setEnabled(?bool $enabled)
Definition
MessagesConfigurationModel.php:92
Commercetools\Api\Models\Message\MessagesConfigurationModel\__construct
__construct(?bool $enabled=null, ?int $deleteDaysAfterCreation=null)
Definition
MessagesConfigurationModel.php:38
Commercetools\Api\Models\Message\MessagesConfigurationModel\getEnabled
getEnabled()
Definition
MessagesConfigurationModel.php:52
Commercetools\Api\Models\Message\MessagesConfigurationModel\$enabled
$enabled
Definition
MessagesConfigurationModel.php:26
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\MessagesConfiguration
Definition
MessagesConfiguration.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\Message
Definition
ApprovalFlowApprovedMessage.php:9
Generated by
1.9.8