commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
VariantBulkUpdateFailResultModel.php
1<?php
2
3declare(strict_types=1);
10
16use stdClass;
17
22{
23 public const DISCRIMINATOR_VALUE = 'Fail';
28 protected $id;
29
34 protected $key;
35
40 protected $status;
41
46 protected $errors;
47
48
52 public function __construct(
53 ?string $id = null,
54 ?string $key = null,
56 ?string $status = null
57 ) {
58 $this->id = $id;
59 $this->key = $key;
60 $this->errors = $errors;
61 $this->status = $status ?? self::DISCRIMINATOR_VALUE;
62 }
63
70 public function getId()
71 {
72 if (is_null($this->id)) {
74 $data = $this->raw(self::FIELD_ID);
75 if (is_null($data)) {
76 return null;
77 }
78 $this->id = (string) $data;
79 }
80
81 return $this->id;
82 }
83
90 public function getKey()
91 {
92 if (is_null($this->key)) {
94 $data = $this->raw(self::FIELD_KEY);
95 if (is_null($data)) {
96 return null;
97 }
98 $this->key = (string) $data;
99 }
100
101 return $this->key;
102 }
103
110 public function getStatus()
111 {
112 if (is_null($this->status)) {
114 $data = $this->raw(self::FIELD_STATUS);
115 if (is_null($data)) {
116 return null;
117 }
118 $this->status = (string) $data;
119 }
120
121 return $this->status;
122 }
123
130 public function getErrors()
131 {
132 if (is_null($this->errors)) {
134 $data = $this->raw(self::FIELD_ERRORS);
135 if (is_null($data)) {
136 return null;
137 }
138 $this->errors = ErrorObjectCollection::fromArray($data);
139 }
140
141 return $this->errors;
142 }
143
144
148 public function setId(?string $id): void
149 {
150 $this->id = $id;
151 }
152
156 public function setKey(?string $key): void
157 {
158 $this->key = $key;
159 }
160
165 {
166 $this->errors = $errors;
167 }
168}
__construct(?string $id=null, ?string $key=null, ?ErrorObjectCollection $errors=null, ?string $status=null)