3declare(strict_types=1);
107 if (is_null($this->code)) {
109 $data = $this->
raw(self::FIELD_CODE);
110 if (is_null($data)) {
113 $this->code = (string) $data;
127 if (is_null($this->message)) {
129 $data = $this->
raw(self::FIELD_MESSAGE);
130 if (is_null($data)) {
133 $this->message = (string) $data;
147 if (is_null($this->sku)) {
149 $data = $this->
raw(self::FIELD_SKU);
150 if (is_null($data)) {
153 $this->sku = (string) $data;
167 if (is_null($this->currency)) {
169 $data = $this->
raw(self::FIELD_CURRENCY);
170 if (is_null($data)) {
173 $this->currency = (string) $data;
187 if (is_null($this->country)) {
189 $data = $this->
raw(self::FIELD_COUNTRY);
190 if (is_null($data)) {
193 $this->country = (string) $data;
207 if (is_null($this->customerGroup)) {
209 $data = $this->
raw(self::FIELD_CUSTOMER_GROUP);
210 if (is_null($data)) {
214 $this->customerGroup = CustomerGroupResourceIdentifierModel::of($data);
228 if (is_null($this->channel)) {
230 $data = $this->
raw(self::FIELD_CHANNEL);
231 if (is_null($data)) {
235 $this->channel = ChannelResourceIdentifierModel::of($data);
249 if (is_null($this->recurrencePolicy)) {
251 $data = $this->
raw(self::FIELD_RECURRENCE_POLICY);
252 if (is_null($data)) {
256 $this->recurrencePolicy = RecurrencePolicyResourceIdentifierModel::of($data);
322 public function by(
string $key)
324 $data = $this->
raw($key);
325 if (is_null($data)) {