commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
RecurrencePolicyDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $key;
29
34 protected $name;
35
40 protected $description;
41
46 protected $schedule;
47
48
52 public function __construct(
53 ?string $key = null,
54 ?LocalizedString $name = null,
57 ) {
58 $this->key = $key;
59 $this->name = $name;
60 $this->description = $description;
61 $this->schedule = $schedule;
62 }
63
70 public function getKey()
71 {
72 if (is_null($this->key)) {
74 $data = $this->raw(self::FIELD_KEY);
75 if (is_null($data)) {
76 return null;
77 }
78 $this->key = (string) $data;
79 }
80
81 return $this->key;
82 }
83
90 public function getName()
91 {
92 if (is_null($this->name)) {
94 $data = $this->raw(self::FIELD_NAME);
95 if (is_null($data)) {
96 return null;
97 }
98
99 $this->name = LocalizedStringModel::of($data);
100 }
101
102 return $this->name;
103 }
104
111 public function getDescription()
112 {
113 if (is_null($this->description)) {
115 $data = $this->raw(self::FIELD_DESCRIPTION);
116 if (is_null($data)) {
117 return null;
118 }
119
120 $this->description = LocalizedStringModel::of($data);
121 }
122
123 return $this->description;
124 }
125
132 public function getSchedule()
133 {
134 if (is_null($this->schedule)) {
136 $data = $this->raw(self::FIELD_SCHEDULE);
137 if (is_null($data)) {
138 return null;
139 }
141 $this->schedule = $className::of($data);
142 }
143
144 return $this->schedule;
145 }
146
147
151 public function setKey(?string $key): void
152 {
153 $this->key = $key;
154 }
155
159 public function setName(?LocalizedString $name): void
160 {
161 $this->name = $name;
162 }
163
168 {
169 $this->description = $description;
170 }
171
176 {
177 $this->schedule = $schedule;
178 }
179}
__construct(?string $key=null, ?LocalizedString $name=null, ?LocalizedString $description=null, ?RecurrencePolicyScheduleDraft $schedule=null)