commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
lib
commercetools-api
src
Models
Subscription
MessageSubscriptionModel.php
1
<?php
2
3
declare(strict_types=1);
9
namespace
Commercetools\Api\Models\Subscription
;
10
11
use
Commercetools\Base\DateTimeImmutableCollection
;
12
use
Commercetools\Base\JsonObject
;
13
use
Commercetools\Base\JsonObjectModel
;
14
use
Commercetools\Base\MapperFactory
;
15
use stdClass;
16
20
final
class
MessageSubscriptionModel
extends
JsonObjectModel
implements
MessageSubscription
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
}
Commercetools\Api\Models\Subscription\MessageSubscriptionModel
Definition:
MessageSubscriptionModel.php:21
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\$types
$types
Definition:
MessageSubscriptionModel.php:32
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\setTypes
setTypes(?array $types)
Definition:
MessageSubscriptionModel.php:99
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\getTypes
getTypes()
Definition:
MessageSubscriptionModel.php:73
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\setResourceTypeId
setResourceTypeId(?string $resourceTypeId)
Definition:
MessageSubscriptionModel.php:91
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\getResourceTypeId
getResourceTypeId()
Definition:
MessageSubscriptionModel.php:52
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\__construct
__construct(?string $resourceTypeId=null, ?array $types=null)
Definition:
MessageSubscriptionModel.php:38
Commercetools\Api\Models\Subscription\MessageSubscriptionModel\$resourceTypeId
$resourceTypeId
Definition:
MessageSubscriptionModel.php:26
Commercetools\Base\BaseJsonObject\raw
raw(string $field)
Definition:
BaseJsonObject.php:57
Commercetools\Base\DateTimeImmutableCollection
Definition:
DateTimeImmutableCollection.php:21
Commercetools\Base\JsonObjectModel
Definition:
JsonObjectModel.php:15
Commercetools\Base\MapperFactory
Definition:
MapperFactory.php:16
Commercetools\Api\Models\Subscription\MessageSubscription
Definition:
MessageSubscription.php:15
Commercetools\Base\JsonObject
Definition:
JsonObject.php:15
Commercetools\Api\Models\Subscription
Definition:
AzureEventGridDestination.php:9
Generated by
1.9.1