Skip to content
This repository was archived by the owner on Feb 7, 2025. It is now read-only.

Commit 5225c39

Browse files
committed
Add Bitrix24 partner ID handling to contact persons
Introduced the ability to set and get the Bitrix24 partner ID for contact persons. Updated tests and documentation to support this new functionality, ensuring comprehensive test coverage and proper documentation. Signed-off-by: mesilov <mesilov.maxim@gmail.com>
1 parent e4ec9ba commit 5225c39

File tree

5 files changed

+214
-44
lines changed

5 files changed

+214
-44
lines changed

src/Application/Contracts/ContactPersons/Docs/ContactPersons.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Store information about person who installed application
2525
| `setExternalId()` | `void` | Sets external id for contact person from external system | - |
2626
| `getExternalId()` | `?string` | Returns external id for contact person (if any) | - |
2727
| `getBitrix24UserId()` | `?int` | Returns bitrix24 user id if contact person mapped on bitrix24 user (if any) | - |
28+
| `getBitrix24PartnerId()` | `?Uuid` | Returns bitrix24 partner id if contact person is bitrix24 partner employee | - |
29+
| `setBitrix24PartnerId()` | `void` | Change bitrix24 partner id if contact person is bitrix24 partner employee | - |
2830
| `getUserAgent()` | `?string` | Returns user agent for contact person | - |
2931
| `getUserAgentReferer()` | `?string` | Returns user agent referer for contact person | - |
3032
| `getUserAgentIp()` | `?IP` | Returns user agent IP for contact person | - |
@@ -54,6 +56,8 @@ stateDiagram-v2
5456
- use case VerifyMobilePhone
5557
- use case AddComment
5658
- use case LinkToExternalEntity
59+
- use case LinkToBitrix24Partner
60+
- use case UnlinkFromBitrix24Partner
5761
- `public function delete(Uuid $uuid): void;`
5862
- use case Delete
5963
- `public function getById(Uuid $uuid): ContactPersonInterface;`

src/Application/Contracts/ContactPersons/Entity/ContactPersonInterface.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ public function getExternalId(): ?string;
114114
*/
115115
public function getBitrix24UserId(): ?int;
116116

117+
/**
118+
* @return Uuid|null get bitrix24 partner uuid if contact person is partner employee
119+
*/
120+
public function getBitrix24PartnerId(): ?Uuid;
121+
122+
/**
123+
* @param Uuid|null $uuid set bitrix24 partner uuid if contact person is partner employee
124+
*/
125+
public function setBitrix24PartnerId(?Uuid $uuid): void;
126+
117127
/**
118128
* get user agent for contact person, use for store metadata in consent agreements facts
119129
*/
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Bitrix24\SDK\Application;
6+
7+
/**
8+
* Portal license family enum
9+
* @link https://training.bitrix24.com/rest_help/general/app_info.php
10+
*/
11+
enum PortalLicenseFamily: string
12+
{
13+
case free = 'free';
14+
case basic = 'basic';
15+
case std = 'std';
16+
case pro = 'pro';
17+
case en = 'en';
18+
case nfr = 'nfr';
19+
}

0 commit comments

Comments
 (0)