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

Commit

Permalink
feat(Subscription): support azure service bus destination
Browse files Browse the repository at this point in the history
Closes #331
  • Loading branch information
Jens Schulze committed Aug 29, 2017
1 parent 57e803c commit 58ad977
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions src/Core/Model/Subscription/AzureServiceBusDestination.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?php
/**
* @author @jayS-de <jens.schulze@commercetools.de>
*/

namespace Commercetools\Core\Model\Subscription;

use Commercetools\Core\Model\Common\Context;

/**
* @package Commercetools\Core\Model\Subscription
*
* @method string getType()
* @method AzureServiceBusDestination setType(string $type = null)
* @method string getConnectionString()
* @method AzureServiceBusDestination setConnectionString(string $connectionString = null)
*/
class AzureServiceBusDestination extends Destination
{
public function fieldDefinitions()
{
return [
'type' => [static::TYPE => 'string'],
'connectionString' => [static::TYPE => 'string'],
];
}

/**
* @param $connectionString
* @param $accessKey
* @param $accessSecret
* @param Context|null $context
* @return AzureServiceBusDestination
*/
public static function ofQueueURLAccessKeyAndSecret($connectionString, Context $context = null)
{
return static::of($context)
->setType('AzureServiceBus')
->setConnectionString($connectionString);
}
}

0 comments on commit 58ad977

Please # to comment.