commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
SetSupplyChannelChangeModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
18
23{
24
25 public const DISCRIMINATOR_VALUE = 'SetSupplyChannelChange';
30 protected $type;
31
36 protected $change;
37
42 protected $previousValue;
43
48 protected $nextValue;
49
50
54 public function __construct(
55 ?string $change = null,
57 ?Reference $nextValue = null,
58 ?string $type = null
59 ) {
60 $this->change = $change;
61 $this->previousValue = $previousValue;
62 $this->nextValue = $nextValue;
63 $this->type = $type ?? self::DISCRIMINATOR_VALUE;
64 }
65
70 public function getType()
71 {
72 if (is_null($this->type)) {
74 $data = $this->raw(self::FIELD_TYPE);
75 if (is_null($data)) {
76 return null;
77 }
78 $this->type = (string) $data;
79 }
80
81 return $this->type;
82 }
83
88 public function getChange()
89 {
90 if (is_null($this->change)) {
92 $data = $this->raw(self::FIELD_CHANGE);
93 if (is_null($data)) {
94 return null;
95 }
96 $this->change = (string) $data;
97 }
98
99 return $this->change;
100 }
101
108 public function getPreviousValue()
109 {
110 if (is_null($this->previousValue)) {
112 $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
113 if (is_null($data)) {
114 return null;
115 }
116
117 $this->previousValue = ReferenceModel::of($data);
118 }
119
121 }
122
129 public function getNextValue()
130 {
131 if (is_null($this->nextValue)) {
133 $data = $this->raw(self::FIELD_NEXT_VALUE);
134 if (is_null($data)) {
135 return null;
136 }
137
138 $this->nextValue = ReferenceModel::of($data);
139 }
140
141 return $this->nextValue;
142 }
143
144
148 public function setChange(?string $change): void
149 {
150 $this->change = $change;
151 }
152
157 {
158 $this->previousValue = $previousValue;
159 }
160
164 public function setNextValue(?Reference $nextValue): void
165 {
166 $this->nextValue = $nextValue;
167 }
168
169
170
171}
__construct(?string $change=null, ?Reference $previousValue=null, ?Reference $nextValue=null, ?string $type=null)