commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
OrderEditUpdateModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $version;
27 
32  protected $actions;
33 
38  protected $dryRun;
39 
40 
44  public function __construct(
45  ?int $version = null,
47  ?bool $dryRun = null
48  ) {
49  $this->version = $version;
50  $this->actions = $actions;
51  $this->dryRun = $dryRun;
52  }
53 
61  public function getVersion()
62  {
63  if (is_null($this->version)) {
65  $data = $this->raw(self::FIELD_VERSION);
66  if (is_null($data)) {
67  return null;
68  }
69  $this->version = (int) $data;
70  }
71 
72  return $this->version;
73  }
74 
81  public function getActions()
82  {
83  if (is_null($this->actions)) {
85  $data = $this->raw(self::FIELD_ACTIONS);
86  if (is_null($data)) {
87  return null;
88  }
89  $this->actions = OrderEditUpdateActionCollection::fromArray($data);
90  }
91 
92  return $this->actions;
93  }
94 
101  public function getDryRun()
102  {
103  if (is_null($this->dryRun)) {
105  $data = $this->raw(self::FIELD_DRY_RUN);
106  if (is_null($data)) {
107  return null;
108  }
109  $this->dryRun = (bool) $data;
110  }
111 
112  return $this->dryRun;
113  }
114 
115 
119  public function setVersion(?int $version): void
120  {
121  $this->version = $version;
122  }
123 
128  {
129  $this->actions = $actions;
130  }
131 
135  public function setDryRun(?bool $dryRun): void
136  {
137  $this->dryRun = $dryRun;
138  }
139 }
setActions(?OrderEditUpdateActionCollection $actions)
__construct(?int $version=null, ?OrderEditUpdateActionCollection $actions=null, ?bool $dryRun=null)