Skip to content
Open
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
->in(__DIR__ . '/src/Services/CRM/Quote/')
->in(__DIR__ . '/src/Services/CRM/Lead/')
->in(__DIR__ . '/src/Services/CRM/Currency/')
->in(__DIR__ . '/src/Services/CRM/CallList/')
->in(__DIR__ . '/src/Services/CRM/Requisites/')
->in(__DIR__ . '/src/Services/CRM/Status/')
->in(__DIR__ . '/src/Services/CRM/Timeline/')
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

### Added

- Added service `Services\CRM\CallList\Service\CallList` with support methods,
see [crm.entity.section.* methods](https://github.com/bitrix24/b24phpsdk/issues/208):
- `get` get information about the call list
- `list` get all call lists, with batch calls support
- `add` add a new call list, with batch calls support
- `update` update the call list, with batch calls support
- `statusList` get a list of the calllist statuses
- `getItems` get call list members
- Added service `Services\Sale\PropertyVariant\Service\PropertyVariant` with support methods,
see [sale.propertyvariant.* methods](https://github.com/bitrix24/b24phpsdk/issues/234):
- `add` adds a variant of an order property
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,10 @@ integration_tests_lead_productrows:
integration_tests_crm_quote:
docker-compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_crm_quote

.PHONY: integration_tests_crm_calllist
integration_tests_crm_calllist:
docker-compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_crm_calllist

.PHONY: integration_tests_crm_requisite
integration_tests_crm_requisite:
docker-compose run --rm php-cli vendor/bin/phpunit --testsuite integration_tests_crm_requisite
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ parameters:
- tests/Integration/Services/CRM/Quote/Service/QuoteProductRowsTest.php
- tests/Integration/Services/CRM/Lead/Service/LeadUserfieldTest.php
- tests/Integration/Services/CRM/Currency
- tests/Integration/Services/CRM/CallList
- tests/Integration/Services/CRM/Requisites
- tests/Integration/Services/Task
- tests/Integration/Services/Sale
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@
<testsuite name="integration_tests_crm_quote">
<directory>./tests/Integration/Services/CRM/Quote/</directory>
</testsuite>
<testsuite name="integration_tests_crm_calllist">
<directory>./tests/Integration/Services/CRM/CallList/</directory>
</testsuite>
<testsuite name="integration_tests_crm_requisite">
<file>./tests/Integration/Services/CRM/Requisites/Service/RequisiteLinkTest.php</file>
</testsuite>
Expand Down
2 changes: 2 additions & 0 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
__DIR__ . '/tests/Integration/Services/CRM/Quote/Service',
__DIR__ . '/src/Services/CRM/Currency',
__DIR__ . '/tests/Integration/Services/CRM/Currency',
__DIR__ . '/src/Services/CRM/CallList',
__DIR__ . '/tests/Integration/Services/CRM/CallList',
__DIR__ . '/src/Services/CRM/Requisites',
__DIR__ . '/tests/Integration/Services/CRM/Requisites',
__DIR__ . '/src/Services/CRM/Timeline',
Expand Down
17 changes: 17 additions & 0 deletions src/Services/CRM/CRMServiceBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,23 @@ public function duplicate(): Duplicates\Service\Duplicate
return $this->serviceCache[__METHOD__];
}

public function callList(): CallList\Service\CallList
{
if (!isset($this->serviceCache[__METHOD__])) {
$batch = new CallList\Batch(
$this->core,
$this->log
);
$this->serviceCache[__METHOD__] = new CallList\Service\CallList(
new CallList\Service\Batch($batch, $this->log),
$this->core,
$this->log
);
}

return $this->serviceCache[__METHOD__];
}

public function status(): Status\Service\Status
{
if (!isset($this->serviceCache[__METHOD__])) {
Expand Down
Loading