commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CustomerUpdateModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
20 final class CustomerUpdateModel extends JsonObjectModel implements CustomerUpdate
21 {
26  protected $version;
27 
32  protected $actions;
33 
34 
38  public function __construct(
39  ?int $version = null,
41  ) {
42  $this->version = $version;
43  $this->actions = $actions;
44  }
45 
53  public function getVersion()
54  {
55  if (is_null($this->version)) {
57  $data = $this->raw(self::FIELD_VERSION);
58  if (is_null($data)) {
59  return null;
60  }
61  $this->version = (int) $data;
62  }
63 
64  return $this->version;
65  }
66 
73  public function getActions()
74  {
75  if (is_null($this->actions)) {
77  $data = $this->raw(self::FIELD_ACTIONS);
78  if (is_null($data)) {
79  return null;
80  }
81  $this->actions = CustomerUpdateActionCollection::fromArray($data);
82  }
83 
84  return $this->actions;
85  }
86 
87 
91  public function setVersion(?int $version): void
92  {
93  $this->version = $version;
94  }
95 
100  {
101  $this->actions = $actions;
102  }
103 }
__construct(?int $version=null, ?CustomerUpdateActionCollection $actions=null)
setActions(?CustomerUpdateActionCollection $actions)