Skip to content
This repository was archived by the owner on Oct 24, 2023. It is now read-only.

Commit a2ff2e1

Browse files
committed
feat(Subscription): add subscription status
Closes #436
1 parent 75f654d commit a2ff2e1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/Core/Model/Subscription/IronMQDestination.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/**
1111
* @package Commercetools\Core\Model\Subscription
1212
*
13+
* @deprecated
1314
* @method string getType()
1415
* @method IronMQDestination setType(string $type = null)
1516
* @method string getUri()

src/Core/Model/Subscription/Subscription.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,17 @@
3232
* @method Subscription setMessages(MessageSubscriptionCollection $messages = null)
3333
* @method ChangeSubscriptionCollection getChanges()
3434
* @method Subscription setChanges(ChangeSubscriptionCollection $changes = null)
35+
* @method string getStatus()
36+
* @method Subscription setStatus(string $status = null)
3537
* @method SubscriptionReference getReference()
3638
*/
3739
class Subscription extends Resource
3840
{
41+
const STATUS_HEALTHY = 'Healthy';
42+
const STATUS_CONFIGURATION_ERROR = 'ConfigurationError';
43+
const STATUS_CONFIGURATION_ERROR_DELIVERY_STOPPED = 'ConfigurationErrorDeliveryStopped';
44+
const STATUS_TEMPORARY_ERROR = 'TemporaryError';
45+
3946
public function fieldDefinitions()
4047
{
4148
return [
@@ -53,6 +60,7 @@ public function fieldDefinitions()
5360
'destination' => [static::TYPE => Destination::class],
5461
'messages' => [static::TYPE => MessageSubscriptionCollection::class],
5562
'changes' => [static::TYPE => ChangeSubscriptionCollection::class],
63+
'status' => [static::TYPE => 'string']
5664
];
5765
}
5866
}

0 commit comments

Comments
 (0)