codestyle fix
This commit is contained in:
parent
439081e902
commit
7ee518dcc1
10 changed files with 29 additions and 12 deletions
|
@ -24,8 +24,6 @@ use Intaro\RetailCrm\Model\Api\Response\SmsVerification\SmsVerificationStatusReq
|
|||
use Intaro\RetailCrm\Model\Api\Response\SmsVerification\SmsVerificationStatusResponse;
|
||||
use RetailCrm\Http\Client;
|
||||
use RetailCrm\Response\ApiResponse;
|
||||
use smsverificationconfirm;
|
||||
use smsverificationcreate;
|
||||
|
||||
/**
|
||||
* PHP version 5.3
|
||||
|
|
|
@ -2,27 +2,30 @@
|
|||
|
||||
namespace Intaro\RetailCrm\Component\Factory;
|
||||
|
||||
use Bitrix\Main\Config\Option;
|
||||
use Intaro\RetailCrm\Component\ApiClient\ClientAdapter;
|
||||
use Intaro\RetailCrm\Component\ConfigProvider;
|
||||
|
||||
/**
|
||||
* Class ClientFactory
|
||||
* @package Intaro\RetailCrm\Component\Factory
|
||||
*/
|
||||
class ClientFactory
|
||||
{
|
||||
|
||||
/**
|
||||
* create ClientAdapter with current data for access to CRM
|
||||
* Create ClientAdapter with current data for access to CRM
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Component\ApiClient\ClientAdapter|null
|
||||
* @throws \Bitrix\Main\ArgumentNullException
|
||||
* @throws \Bitrix\Main\ArgumentOutOfRangeException
|
||||
*/
|
||||
public static function creacteClientAdapter(): ?ClientAdapter
|
||||
{
|
||||
$apiHost = Option::get('intaro.retailcrm', 'api_host');
|
||||
$apiKey = Option::get('intaro.retailcrm', 'api_key');
|
||||
$apiHost = ConfigProvider::getApiUrl();
|
||||
$apiKey = ConfigProvider::getApiKey();
|
||||
|
||||
if (empty($apiHost) || empty($apiKey)) {
|
||||
return null;
|
||||
} else {
|
||||
return new ClientAdapter($apiHost, $apiKey);
|
||||
}
|
||||
|
||||
return new ClientAdapter($apiHost, $apiKey);
|
||||
}
|
||||
}
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirmRequest
|
||||
*
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Intaro\RetailCrm\Model\Api\Request\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreateRequest
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationStatusRequest
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirmResponse
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreateResponse
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
namespace Intaro\RetailCrm\Model\Api\Response\SmsVerification;
|
||||
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationStatusResponse
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationConfirm
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
class SmsVerificationConfirm extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace Intaro\RetailCrm\Model\Api;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class SmsVerificationCreate
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
class SmsVerificationCreate extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue