-
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: mesilov <mesilov.maxim@gmail.com>
- Loading branch information
Showing
8 changed files
with
372 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Item\Result; | ||
|
||
use Bitrix24\SDK\Services\CRM\Common\Result\AbstractCrmItem; | ||
use DateTimeImmutable; | ||
use Money\Currency; | ||
|
||
/** | ||
* @property-read int $id | ||
* @property-read string $xmlId | ||
* @property-read string $title | ||
* @property-read int $createdBy | ||
* @property-read int $updatedBy | ||
* @property-read int $movedBy | ||
* @property-read DateTimeImmutable $createdTime | ||
* @property-read DateTimeImmutable $updatedTime | ||
* @property-read DateTimeImmutable $movedTime | ||
* @property-read int $categoryId | ||
* @property-read bool $opened | ||
* @property-read string $previousStageId | ||
* @property-read DateTimeImmutable $begindate | ||
* @property-read DateTimeImmutable $closedate | ||
* @property-read int $companyId | ||
* @property-read int $contactId | ||
* @property-read int $opportunity | ||
* @property-read bool $isManualOpportunity | ||
* @property-read int $taxValue | ||
* @property-read Currency $currencyId | ||
* @property-read int $opportunityAccount | ||
* @property-read int $taxValueAccount | ||
* @property-read Currency $accountCurrencyId | ||
* @property-read int $mycompanyId | ||
* @property-read string $sourceId | ||
* @property-read string $sourceDescription | ||
* @property-read int $webformId | ||
* @property-read int $assignedById | ||
* @property-read int $lastActivityBy | ||
* @property-read DateTimeImmutable $lastActivityTime | ||
* @property-read string $utmSource | ||
* @property-read string $utmMedium | ||
* @property-read string $utmCampaign | ||
* @property-read string $utmContent | ||
* @property-read string $utmTerm | ||
* @property-read array $observers | ||
* @property-read array $contactIds | ||
* @property-read int $entityTypeId | ||
*/ | ||
class ItemItemResult extends AbstractCrmItem | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Item\Result; | ||
|
||
use Bitrix24\SDK\Core\Result\AbstractResult; | ||
|
||
class ItemResult extends AbstractResult | ||
{ | ||
public function item(): ItemItemResult | ||
{ | ||
return new ItemItemResult($this->getCoreResponse()->getResponseData()->getResult()['item']); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Bitrix24\SDK\Services\CRM\Item\Result; | ||
|
||
use Bitrix24\SDK\Core\Exceptions\BaseException; | ||
use Bitrix24\SDK\Core\Result\AbstractResult; | ||
|
||
class ItemsResult extends AbstractResult | ||
{ | ||
/** | ||
* @return ItemItemResult[] | ||
* @throws BaseException | ||
*/ | ||
public function getItems(): array | ||
{ | ||
$items = []; | ||
foreach ($this->getCoreResponse()->getResponseData()->getResult() as $item) { | ||
$items[] = new ItemItemResult($item); | ||
} | ||
|
||
return $items; | ||
} | ||
} |
Oops, something went wrong.