commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
RequestQuoteRenegotiationChangeModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
22 
23  public const DISCRIMINATOR_VALUE = 'RequestQuoteRenegotiationChange';
28  protected $type;
29 
34  protected $change;
35 
40  protected $previousValue;
41 
46  protected $nextValue;
47 
52  protected $buyerComment;
53 
54 
58  public function __construct(
59  ?string $change = null,
60  ?string $previousValue = null,
61  ?string $nextValue = null,
62  ?string $buyerComment = null,
63  ?string $type = null
64  ) {
65  $this->change = $change;
66  $this->previousValue = $previousValue;
67  $this->nextValue = $nextValue;
68  $this->buyerComment = $buyerComment;
69  $this->type = $type ?? self::DISCRIMINATOR_VALUE;
70  }
71 
76  public function getType()
77  {
78  if (is_null($this->type)) {
80  $data = $this->raw(self::FIELD_TYPE);
81  if (is_null($data)) {
82  return null;
83  }
84  $this->type = (string) $data;
85  }
86 
87  return $this->type;
88  }
89 
94  public function getChange()
95  {
96  if (is_null($this->change)) {
98  $data = $this->raw(self::FIELD_CHANGE);
99  if (is_null($data)) {
100  return null;
101  }
102  $this->change = (string) $data;
103  }
104 
105  return $this->change;
106  }
107 
114  public function getPreviousValue()
115  {
116  if (is_null($this->previousValue)) {
118  $data = $this->raw(self::FIELD_PREVIOUS_VALUE);
119  if (is_null($data)) {
120  return null;
121  }
122  $this->previousValue = (string) $data;
123  }
124 
125  return $this->previousValue;
126  }
127 
134  public function getNextValue()
135  {
136  if (is_null($this->nextValue)) {
138  $data = $this->raw(self::FIELD_NEXT_VALUE);
139  if (is_null($data)) {
140  return null;
141  }
142  $this->nextValue = (string) $data;
143  }
144 
145  return $this->nextValue;
146  }
147 
154  public function getBuyerComment()
155  {
156  if (is_null($this->buyerComment)) {
158  $data = $this->raw(self::FIELD_BUYER_COMMENT);
159  if (is_null($data)) {
160  return null;
161  }
162  $this->buyerComment = (string) $data;
163  }
164 
165  return $this->buyerComment;
166  }
167 
168 
172  public function setChange(?string $change): void
173  {
174  $this->change = $change;
175  }
176 
180  public function setPreviousValue(?string $previousValue): void
181  {
182  $this->previousValue = $previousValue;
183  }
184 
188  public function setNextValue(?string $nextValue): void
189  {
190  $this->nextValue = $nextValue;
191  }
192 
196  public function setBuyerComment(?string $buyerComment): void
197  {
198  $this->buyerComment = $buyerComment;
199  }
200 
201 
202 
203 }
__construct(?string $change=null, ?string $previousValue=null, ?string $nextValue=null, ?string $buyerComment=null, ?string $type=null)