commercetools-sdk-php-v2
The commercetools platform, import-api and PHP sdks generated from our api reference.
MessageSubscriptionBuilder.php
1 <?php
2 
3 declare(strict_types=1);
10 
16 use stdClass;
17 
21 final class MessageSubscriptionBuilder implements Builder
22 {
27  private $resourceTypeId;
28 
33  private $types;
34 
41  public function getResourceTypeId()
42  {
43  return $this->resourceTypeId;
44  }
45 
53  public function getTypes()
54  {
55  return $this->types;
56  }
57 
62  public function withResourceTypeId(?string $resourceTypeId)
63  {
64  $this->resourceTypeId = $resourceTypeId;
65 
66  return $this;
67  }
68 
73  public function withTypes(?array $types)
74  {
75  $this->types = $types;
76 
77  return $this;
78  }
79 
80 
81  public function build(): MessageSubscription
82  {
83  return new MessageSubscriptionModel(
84  $this->resourceTypeId,
85  $this->types
86  );
87  }
88 
89  public static function of(): MessageSubscriptionBuilder
90  {
91  return new self();
92  }
93 }