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
RecurrencePolicy
StandardScheduleDraftModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\RecurrencePolicy
;
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
StandardScheduleDraftModel
extends
JsonObjectModel
implements
StandardScheduleDraft
21
{
22
public
const
DISCRIMINATOR_VALUE
=
'standard'
;
27
protected
$type
;
28
33
protected
$value
;
34
39
protected
$intervalUnit
;
40
41
45
public
function
__construct
(
46
?
int
$value
=
null
,
47
?
string
$intervalUnit
=
null
,
48
?
string
$type
=
null
49
) {
50
$this->value =
$value
;
51
$this->intervalUnit =
$intervalUnit
;
52
$this->type =
$type
??
self::DISCRIMINATOR_VALUE
;
53
}
54
59
public
function
getType
()
60
{
61
if
(is_null($this->type)) {
63
$data = $this->
raw
(self::FIELD_TYPE);
64
if
(is_null($data)) {
65
return
null
;
66
}
67
$this->type = (string) $data;
68
}
69
70
return
$this->type
;
71
}
72
79
public
function
getValue
()
80
{
81
if
(is_null($this->value)) {
83
$data = $this->
raw
(self::FIELD_VALUE);
84
if
(is_null($data)) {
85
return
null
;
86
}
87
$this->value = (int) $data;
88
}
89
90
return
$this->value
;
91
}
92
99
public
function
getIntervalUnit
()
100
{
101
if
(is_null($this->intervalUnit)) {
103
$data = $this->
raw
(self::FIELD_INTERVAL_UNIT);
104
if
(is_null($data)) {
105
return
null
;
106
}
107
$this->intervalUnit = (string) $data;
108
}
109
110
return
$this->intervalUnit
;
111
}
112
113
117
public
function
setValue
(?
int
$value
): void
118
{
119
$this->value =
$value
;
120
}
121
125
public
function
setIntervalUnit
(?
string
$intervalUnit
): void
126
{
127
$this->intervalUnit =
$intervalUnit
;
128
}
129
}
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel
Definition
StandardScheduleDraftModel.php:21
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\$type
$type
Definition
StandardScheduleDraftModel.php:27
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\$intervalUnit
$intervalUnit
Definition
StandardScheduleDraftModel.php:39
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\getValue
getValue()
Definition
StandardScheduleDraftModel.php:79
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\getType
getType()
Definition
StandardScheduleDraftModel.php:59
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\$value
$value
Definition
StandardScheduleDraftModel.php:33
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\__construct
__construct(?int $value=null, ?string $intervalUnit=null, ?string $type=null)
Definition
StandardScheduleDraftModel.php:45
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\setIntervalUnit
setIntervalUnit(?string $intervalUnit)
Definition
StandardScheduleDraftModel.php:125
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\setValue
setValue(?int $value)
Definition
StandardScheduleDraftModel.php:117
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\getIntervalUnit
getIntervalUnit()
Definition
StandardScheduleDraftModel.php:99
Commercetools\Api\Models\RecurrencePolicy\StandardScheduleDraftModel\DISCRIMINATOR_VALUE
const DISCRIMINATOR_VALUE
Definition
StandardScheduleDraftModel.php:22
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\RecurrencePolicy\StandardScheduleDraft
Definition
StandardScheduleDraft.php:15
Commercetools\Base\JsonObject
Definition
JsonObject.php:15
Commercetools\Api\Models\RecurrencePolicy
Definition
DayOfMonthSchedule.php:9
Generated by
1.9.8