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

Commit 58ad977

Browse files
author
Jens Schulze
committed
feat(Subscription): support azure service bus destination
Closes #331
1 parent 57e803c commit 58ad977

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
/**
3+
* @author @jayS-de <jens.schulze@commercetools.de>
4+
*/
5+
6+
namespace Commercetools\Core\Model\Subscription;
7+
8+
use Commercetools\Core\Model\Common\Context;
9+
10+
/**
11+
* @package Commercetools\Core\Model\Subscription
12+
*
13+
* @method string getType()
14+
* @method AzureServiceBusDestination setType(string $type = null)
15+
* @method string getConnectionString()
16+
* @method AzureServiceBusDestination setConnectionString(string $connectionString = null)
17+
*/
18+
class AzureServiceBusDestination extends Destination
19+
{
20+
public function fieldDefinitions()
21+
{
22+
return [
23+
'type' => [static::TYPE => 'string'],
24+
'connectionString' => [static::TYPE => 'string'],
25+
];
26+
}
27+
28+
/**
29+
* @param $connectionString
30+
* @param $accessKey
31+
* @param $accessSecret
32+
* @param Context|null $context
33+
* @return AzureServiceBusDestination
34+
*/
35+
public static function ofQueueURLAccessKeyAndSecret($connectionString, Context $context = null)
36+
{
37+
return static::of($context)
38+
->setType('AzureServiceBus')
39+
->setConnectionString($connectionString);
40+
}
41+
}

0 commit comments

Comments
 (0)