3declare(strict_types=1);
119 if (is_null($this->key)) {
121 $data = $this->
raw(self::FIELD_KEY);
122 if (is_null($data)) {
125 $this->key = (string) $data;
139 if (is_null($this->shippingMethodName)) {
141 $data = $this->
raw(self::FIELD_SHIPPING_METHOD_NAME);
142 if (is_null($data)) {
145 $this->shippingMethodName = (string) $data;
159 if (is_null($this->shippingAddress)) {
161 $data = $this->
raw(self::FIELD_SHIPPING_ADDRESS);
162 if (is_null($data)) {
166 $this->shippingAddress = BaseAddressModel::of($data);
180 if (is_null($this->shippingRate)) {
182 $data = $this->
raw(self::FIELD_SHIPPING_RATE);
183 if (is_null($data)) {
187 $this->shippingRate = ShippingRateDraftModel::of($data);
207 if (is_null($this->shippingRateInput)) {
209 $data = $this->
raw(self::FIELD_SHIPPING_RATE_INPUT);
210 if (is_null($data)) {
214 $this->shippingRateInput = $className::of($data);
228 if (is_null($this->taxCategory)) {
230 $data = $this->
raw(self::FIELD_TAX_CATEGORY);
231 if (is_null($data)) {
235 $this->taxCategory = TaxCategoryResourceIdentifierModel::of($data);
249 if (is_null($this->externalTaxRate)) {
251 $data = $this->
raw(self::FIELD_EXTERNAL_TAX_RATE);
252 if (is_null($data)) {
270 if (is_null($this->deliveries)) {
272 $data = $this->
raw(self::FIELD_DELIVERIES);
273 if (is_null($data)) {
276 $this->deliveries = DeliveryDraftCollection::fromArray($data);
290 if (is_null($this->custom)) {
292 $data = $this->
raw(self::FIELD_CUSTOM);
293 if (is_null($data)) {
297 $this->custom = CustomFieldsDraftModel::of($data);