commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
OrderPatchImportModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $orderNumber;
27 
32  protected $fields;
33 
34 
38  public function __construct(
39  ?string $orderNumber = null,
40  ?OrderField $fields = null
41  ) {
42  $this->orderNumber = $orderNumber;
43  $this->fields = $fields;
44  }
45 
52  public function getOrderNumber()
53  {
54  if (is_null($this->orderNumber)) {
56  $data = $this->raw(self::FIELD_ORDER_NUMBER);
57  if (is_null($data)) {
58  return null;
59  }
60  $this->orderNumber = (string) $data;
61  }
62 
63  return $this->orderNumber;
64  }
65 
72  public function getFields()
73  {
74  if (is_null($this->fields)) {
76  $data = $this->raw(self::FIELD_FIELDS);
77  if (is_null($data)) {
78  return null;
79  }
80 
81  $this->fields = OrderFieldModel::of($data);
82  }
83 
84  return $this->fields;
85  }
86 
87 
91  public function setOrderNumber(?string $orderNumber): void
92  {
93  $this->orderNumber = $orderNumber;
94  }
95 
99  public function setFields(?OrderField $fields): void
100  {
101  $this->fields = $fields;
102  }
103 }
__construct(?string $orderNumber=null, ?OrderField $fields=null)