commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
CartFreezeCartActionModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
22  public const DISCRIMINATOR_VALUE = 'freezeCart';
27  protected $action;
28 
29 
33  public function __construct(
34  ?string $action = null
35  ) {
36  $this->action = $action ?? self::DISCRIMINATOR_VALUE;
37  }
38 
43  public function getAction()
44  {
45  if (is_null($this->action)) {
47  $data = $this->raw(self::FIELD_ACTION);
48  if (is_null($data)) {
49  return null;
50  }
51  $this->action = (string) $data;
52  }
53 
54  return $this->action;
55  }
56 }