Skip to content

Commit 8cbf16e

Browse files
author
Bas Schipper
committed
Added ContactGroup functionality
1 parent 03333dc commit 8cbf16e

File tree

3 files changed

+52
-0
lines changed

3 files changed

+52
-0
lines changed

src/Opifer/SmartEventManager/Client/description.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@
2626
"additionalParameters" : {
2727
"location": "json"
2828
}
29+
}, "getContactGroups": {
30+
"httpMethod": "POST",
31+
"uri": "/Api/Relations/GetContactGroups",
32+
"summary": "Responds to POST requests to get the contact groups.",
33+
"responseType": "class",
34+
"responseClass": "Opifer\\SmartEventManager\\Relations\\Model\\GetContactGroupsResponse",
35+
"additionalParameters" : {
36+
"location": "json"
37+
}
2938
}, "addRelation": {
3039
"httpMethod": "POST",
3140
"uri": "/Api/Relations/AddRelation",
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
namespace Opifer\SmartEventManager\Relations\Model;
3+
4+
use JMS\Serializer\Annotation as JMS;
5+
6+
class ContactGroup
7+
{
8+
9+
/**
10+
* The ContactGroupID of the contact group.
11+
*
12+
* @var int
13+
* @JMS\Type("integer")
14+
*/
15+
public $ContactGroupID;
16+
17+
/**
18+
* The name of the contact group.
19+
*
20+
* @var string
21+
* @JMS\Type("string")
22+
*/
23+
public $Name;
24+
25+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
namespace Opifer\SmartEventManager\Relations\Model;
3+
4+
use JMS\Serializer\Annotation as JMS;
5+
use Opifer\SmartEventManager\Response\Model\BaseResponse;
6+
7+
class GetContactGroupsResponse extends BaseResponse
8+
{
9+
10+
/**
11+
* The contact groups in the ContactGroupModel.
12+
*
13+
* * @var \Opifer\SmartEventManager\General\Model\Company[]
14+
* @JMS\Type("array<Opifer\SmartEventManager\Relations\Model\ContactGroup>")
15+
*/
16+
public $ContactGroups;
17+
18+
}

0 commit comments

Comments
 (0)