commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
CannotChangeReservationExpiryWarningModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
22 public const DISCRIMINATOR_VALUE = 'CannotChangeReservationExpiry';
27 protected $code;
28
33 protected $message;
34
39 protected $lineItemId;
40
41
45 public function __construct(
46 ?string $message = null,
47 ?string $lineItemId = null,
48 ?string $code = null
49 ) {
50 $this->message = $message;
51 $this->lineItemId = $lineItemId;
52 $this->code = $code ?? self::DISCRIMINATOR_VALUE;
53 }
54
59 public function getCode()
60 {
61 if (is_null($this->code)) {
63 $data = $this->raw(self::FIELD_CODE);
64 if (is_null($data)) {
65 return null;
66 }
67 $this->code = (string) $data;
68 }
69
70 return $this->code;
71 }
72
79 public function getMessage()
80 {
81 if (is_null($this->message)) {
83 $data = $this->raw(self::FIELD_MESSAGE);
84 if (is_null($data)) {
85 return null;
86 }
87 $this->message = (string) $data;
88 }
89
90 return $this->message;
91 }
92
99 public function getLineItemId()
100 {
101 if (is_null($this->lineItemId)) {
103 $data = $this->raw(self::FIELD_LINE_ITEM_ID);
104 if (is_null($data)) {
105 return null;
106 }
107 $this->lineItemId = (string) $data;
108 }
109
110 return $this->lineItemId;
111 }
112
113
117 public function setMessage(?string $message): void
118 {
119 $this->message = $message;
120 }
121
125 public function setLineItemId(?string $lineItemId): void
126 {
127 $this->lineItemId = $lineItemId;
128 }
129}
__construct(?string $message=null, ?string $lineItemId=null, ?string $code=null)