commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
QuoteStateChangedMessagePayloadModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
22  public const DISCRIMINATOR_VALUE = 'QuoteStateChanged';
27  protected $type;
28 
33  protected $quoteState;
34 
39  protected $oldQuoteState;
40 
41 
45  public function __construct(
46  ?string $quoteState = null,
47  ?string $oldQuoteState = null,
48  ?string $type = null
49  ) {
50  $this->quoteState = $quoteState;
51  $this->oldQuoteState = $oldQuoteState;
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 getQuoteState()
80  {
81  if (is_null($this->quoteState)) {
83  $data = $this->raw(self::FIELD_QUOTE_STATE);
84  if (is_null($data)) {
85  return null;
86  }
87  $this->quoteState = (string) $data;
88  }
89 
90  return $this->quoteState;
91  }
92 
99  public function getOldQuoteState()
100  {
101  if (is_null($this->oldQuoteState)) {
103  $data = $this->raw(self::FIELD_OLD_QUOTE_STATE);
104  if (is_null($data)) {
105  return null;
106  }
107  $this->oldQuoteState = (string) $data;
108  }
109 
110  return $this->oldQuoteState;
111  }
112 
113 
117  public function setQuoteState(?string $quoteState): void
118  {
119  $this->quoteState = $quoteState;
120  }
121 
125  public function setOldQuoteState(?string $oldQuoteState): void
126  {
127  $this->oldQuoteState = $oldQuoteState;
128  }
129 }
__construct(?string $quoteState=null, ?string $oldQuoteState=null, ?string $type=null)