commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ParcelMeasurementDraftModel.php
1<?php
2
3declare(strict_types=1);
10
17use stdClass;
18
23{
28 protected $parcelId;
29
34 protected $measurements;
35
36
40 public function __construct(
41 ?string $parcelId = null,
43 ) {
44 $this->parcelId = $parcelId;
45 $this->measurements = $measurements;
46 }
47
54 public function getParcelId()
55 {
56 if (is_null($this->parcelId)) {
58 $data = $this->raw(self::FIELD_PARCEL_ID);
59 if (is_null($data)) {
60 return null;
61 }
62 $this->parcelId = (string) $data;
63 }
64
65 return $this->parcelId;
66 }
67
74 public function getMeasurements()
75 {
76 if (is_null($this->measurements)) {
78 $data = $this->raw(self::FIELD_MEASUREMENTS);
79 if (is_null($data)) {
80 return null;
81 }
82
83 $this->measurements = ParcelMeasurementsModel::of($data);
84 }
85
87 }
88
89
93 public function setParcelId(?string $parcelId): void
94 {
95 $this->parcelId = $parcelId;
96 }
97
102 {
103 $this->measurements = $measurements;
104 }
105}
__construct(?string $parcelId=null, ?ParcelMeasurements $measurements=null)