commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
MessageSubscriptionModel.php
1 <?php
2 
3 declare(strict_types=1);
10 
15 use stdClass;
16 
21 {
26  protected $resourceTypeId;
27 
32  protected $types;
33 
34 
38  public function __construct(
39  ?string $resourceTypeId = null,
40  ?array $types = null
41  ) {
42  $this->resourceTypeId = $resourceTypeId;
43  $this->types = $types;
44  }
45 
52  public function getResourceTypeId()
53  {
54  if (is_null($this->resourceTypeId)) {
56  $data = $this->raw(self::FIELD_RESOURCE_TYPE_ID);
57  if (is_null($data)) {
58  return null;
59  }
60  $this->resourceTypeId = (string) $data;
61  }
62 
63  return $this->resourceTypeId;
64  }
65 
73  public function getTypes()
74  {
75  if (is_null($this->types)) {
77  $data = $this->raw(self::FIELD_TYPES);
78  if (is_null($data)) {
79  return null;
80  }
81  $this->types = $data;
82  }
83 
84  return $this->types;
85  }
86 
87 
91  public function setResourceTypeId(?string $resourceTypeId): void
92  {
93  $this->resourceTypeId = $resourceTypeId;
94  }
95 
99  public function setTypes(?array $types): void
100  {
101  $this->types = $types;
102  }
103 }
__construct(?string $resourceTypeId=null, ?array $types=null)