commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
Loading...
Searching...
No Matches
ExtensionTriggerModel.php
1<?php
2
3declare(strict_types=1);
10
15use stdClass;
16
21{
26 protected $resourceTypeId;
27
32 protected $actions;
33
38 protected $condition;
39
40
44 public function __construct(
45 ?string $resourceTypeId = null,
46 ?array $actions = null,
47 ?string $condition = null
48 ) {
49 $this->resourceTypeId = $resourceTypeId;
50 $this->actions = $actions;
51 $this->condition = $condition;
52 }
53
60 public function getResourceTypeId()
61 {
62 if (is_null($this->resourceTypeId)) {
64 $data = $this->raw(self::FIELD_RESOURCE_TYPE_ID);
65 if (is_null($data)) {
66 return null;
67 }
68 $this->resourceTypeId = (string) $data;
69 }
70
72 }
73
80 public function getActions()
81 {
82 if (is_null($this->actions)) {
84 $data = $this->raw(self::FIELD_ACTIONS);
85 if (is_null($data)) {
86 return null;
87 }
88 $this->actions = $data;
89 }
90
91 return $this->actions;
92 }
93
100 public function getCondition()
101 {
102 if (is_null($this->condition)) {
104 $data = $this->raw(self::FIELD_CONDITION);
105 if (is_null($data)) {
106 return null;
107 }
108 $this->condition = (string) $data;
109 }
110
111 return $this->condition;
112 }
113
114
118 public function setResourceTypeId(?string $resourceTypeId): void
119 {
120 $this->resourceTypeId = $resourceTypeId;
121 }
122
126 public function setActions(?array $actions): void
127 {
128 $this->actions = $actions;
129 }
130
134 public function setCondition(?string $condition): void
135 {
136 $this->condition = $condition;
137 }
138}
__construct(?string $resourceTypeId=null, ?array $actions=null, ?string $condition=null)