commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
All Classes Namespaces Functions Variables Pages
UpdateActionModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
20final class UpdateActionModel extends JsonObjectModel implements UpdateAction
21{
26 protected $action;
27
28
32 public function __construct(
33 ?string $action = null
34 ) {
35 $this->action = $action;
36 }
37
42 public function getAction()
43 {
44 if (is_null($this->action)) {
46 $data = $this->raw(self::FIELD_ACTION);
47 if (is_null($data)) {
48 return null;
49 }
50 $this->action = (string) $data;
51 }
52
53 return $this->action;
54 }
55
56
60 public function setAction(?string $action): void
61 {
62 $this->action = $action;
63 }
64}