finish customer-related methods in the client facade, fixes in models
This commit is contained in:
parent
658316dc96
commit
083ee1c2bf
15 changed files with 643 additions and 100 deletions
|
@ -11,42 +11,129 @@
|
|||
*/
|
||||
namespace Intaro\RetailCrm\Component\ApiClient;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Deserializer;
|
||||
use Intaro\RetailCrm\Component\Json\Serializer;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateAddressesCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateAddressesEditRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateAddressesRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesEditRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsEditRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateFixExternalIdsRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateListRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateNotesRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateUploadRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersEditRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersFixExternalIdsRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersGetRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersHistoryRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersListRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersNotesCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersNotesRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersUploadRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CompaniesResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CreateResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomerChangeResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomerCorporateResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomerResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomersCorporateAddressesResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomersCorporateContactsResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomersCorporateResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomersNotesResponse;
|
||||
use RetailCrm\ApiClient;
|
||||
use Intaro\RetailCrm\Component\Json\Serializer;
|
||||
use Intaro\RetailCrm\Component\Json\Deserializer;
|
||||
use Intaro\RetailCrm\Model\Api\Response\HistoryResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomerResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CompaniesResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomersResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\OperationResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomerChangeResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomersUploadResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\CustomerCorporateResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersGetRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersListRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersEditRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersUploadRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersHistoryRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersFixExternalIdsRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateUploadRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCreateRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateFixExternalIdsRequest;
|
||||
use Intaro\RetailCrm\Model\Api\Response\HistoryResponse;
|
||||
use Intaro\RetailCrm\Model\Api\Response\OperationResponse;
|
||||
use RetailCrm\ApiClient;
|
||||
use RetailCrm\Response\ApiResponse;
|
||||
|
||||
/**
|
||||
* Class ClientAdapter
|
||||
* Class ClientAdapter. It's sole purpose is to allow models usage via old API client.
|
||||
* Currently, it only implements customers and corporate customers methods (except combine method).
|
||||
* Better solution can be found later. For now, this will work just fine.
|
||||
*
|
||||
* @package Intaro\RetailCrm\Component\ApiClient
|
||||
*
|
||||
* @method ApiResponse usersList(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse usersGroups($page = null, $limit = null)
|
||||
* @method ApiResponse usersStatus($id, $status)
|
||||
* @method ApiResponse usersGet($id)
|
||||
* @method ApiResponse ordersList(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse customersCorporateNotesDelete($id)
|
||||
* @method ApiResponse ordersCreate(array $order, $site = null)
|
||||
* @method ApiResponse ordersFixExternalIds(array $ids)
|
||||
* @method ApiResponse ordersStatuses(array $ids = array(), array $externalIds = array())
|
||||
* @method ApiResponse ordersUpload(array $orders, $site = null)
|
||||
* @method ApiResponse ordersGet($id, $by = 'externalId', $site = null)
|
||||
* @method ApiResponse ordersEdit(array $order, $by = 'externalId', $site = null)
|
||||
* @method ApiResponse ordersHistory(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse ordersCombine($order, $resultOrder, $technique = 'ours')
|
||||
* @method ApiResponse ordersPaymentCreate(array $payment, $site = null)
|
||||
* @method ApiResponse ordersPaymentEdit(array $payment, $by = 'id', $site = null)
|
||||
* @method ApiResponse ordersPaymentDelete($id)
|
||||
* @method ApiResponse customersCombine(array $customers, $resultCustomer)
|
||||
* @method ApiResponse customersNotesDelete($id)
|
||||
* @method ApiResponse customFieldsList(array $filter = array(), $limit = null, $page = null)
|
||||
* @method ApiResponse customFieldsCreate($entity, $customField)
|
||||
* @method ApiResponse customFieldsEdit($entity, $customField)
|
||||
* @method ApiResponse customFieldsGet($entity, $code)
|
||||
* @method ApiResponse customDictionariesList(array $filter = array(), $limit = null, $page = null)
|
||||
* @method ApiResponse customDictionariesCreate($customDictionary)
|
||||
* @method ApiResponse customDictionariesEdit($customDictionary)
|
||||
* @method ApiResponse customDictionariesGet($code)
|
||||
* @method ApiResponse tasksList(array $filter = array(), $limit = null, $page = null)
|
||||
* @method ApiResponse tasksCreate($task, $site = null)
|
||||
* @method ApiResponse tasksEdit($task, $site = null)
|
||||
* @method ApiResponse tasksGet($id)
|
||||
* @method ApiResponse ordersPacksList(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse ordersPacksCreate(array $pack, $site = null)
|
||||
* @method ApiResponse ordersPacksHistory(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse ordersPacksGet($id)
|
||||
* @method ApiResponse ordersPacksDelete($id)
|
||||
* @method ApiResponse ordersPacksEdit(array $pack, $site = null)
|
||||
* @method ApiResponse storeInventories(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse storeInventoriesUpload(array $offers, $site = null)
|
||||
* @method ApiResponse storePricesUpload(array $prices, $site = null)
|
||||
* @method ApiResponse storeProducts(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse integrationModulesGet($code)
|
||||
* @method ApiResponse integrationModulesEdit(array $configuration)
|
||||
* @method ApiResponse deliveryTracking($code, array $statusUpdate)
|
||||
* @method ApiResponse countriesList()
|
||||
* @method ApiResponse deliveryServicesList()
|
||||
* @method ApiResponse deliveryServicesEdit(array $data)
|
||||
* @method ApiResponse deliveryTypesList()
|
||||
* @method ApiResponse deliveryTypesEdit(array $data)
|
||||
* @method ApiResponse orderMethodsList()
|
||||
* @method ApiResponse orderMethodsEdit(array $data)
|
||||
* @method ApiResponse orderTypesList()
|
||||
* @method ApiResponse orderTypesEdit(array $data)
|
||||
* @method ApiResponse paymentStatusesList()
|
||||
* @method ApiResponse paymentStatusesEdit(array $data)
|
||||
* @method ApiResponse paymentTypesList()
|
||||
* @method ApiResponse paymentTypesEdit(array $data)
|
||||
* @method ApiResponse productStatusesList()
|
||||
* @method ApiResponse productStatusesEdit(array $data)
|
||||
* @method ApiResponse storeProductsGroups(array $filter = array(), $page = null, $limit = null)
|
||||
* @method ApiResponse sitesList()
|
||||
* @method ApiResponse sitesEdit(array $data)
|
||||
* @method ApiResponse statusGroupsList()
|
||||
* @method ApiResponse statusesList()
|
||||
* @method ApiResponse statusesEdit(array $data)
|
||||
* @method ApiResponse storesList()
|
||||
* @method ApiResponse storesEdit(array $data)
|
||||
* @method ApiResponse pricesTypes()
|
||||
* @method ApiResponse pricesEdit(array $data)
|
||||
* @method ApiResponse telephonyCallsUpload(array $calls)
|
||||
* @method ApiResponse telephonyCallManager($phone, $details)
|
||||
* @method ApiResponse segmentsList(array $filter = array(), $limit = null, $page = null)
|
||||
* @method ApiResponse statisticUpdate()
|
||||
* @method ApiResponse getSite()
|
||||
* @method ApiResponse setSite($site)
|
||||
*/
|
||||
class ClientAdapter
|
||||
{
|
||||
|
@ -302,26 +389,6 @@ class ClientAdapter
|
|||
return Deserializer::deserializeArray($response->getResponseBody(), CustomerCorporateResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get corporate customer companies by id or externalId
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesRequest $request
|
||||
*
|
||||
* @return CompaniesResponse|null
|
||||
*/
|
||||
public function customersCorporateCompanies(CustomersCorporateCompaniesRequest $request): ?CompaniesResponse {
|
||||
$response = $this->client->customersCorporateCompanies(
|
||||
(string) $request->id,
|
||||
Serializer::serializeArray($request->filter),
|
||||
$request->page,
|
||||
$request->limit,
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CompaniesResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a customer corporate
|
||||
*
|
||||
|
@ -357,49 +424,6 @@ class ClientAdapter
|
|||
return Deserializer::deserializeArray($response->getResponseBody(), HistoryResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create corporate customer contact
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CreateResponse|null
|
||||
*/
|
||||
public function customersCorporateContactsCreate(CustomersCorporateCompaniesRequest $request): ?CreateResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateContactsCreate(
|
||||
(string) $request->id,
|
||||
Serializer::serializeArray($request->filter),
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get corporate customer contacts by id or externalId
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CustomersCorporateContactsResponse|null
|
||||
*/
|
||||
public function customersCorporateContacts(CustomersCorporateContactsRequest $request): ?CustomersCorporateContactsResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateContacts(
|
||||
$request->externalId,
|
||||
Serializer::serializeArray($request->filter),
|
||||
$request->page,
|
||||
$request->limit,
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray(
|
||||
$response->getResponseBody(),
|
||||
CustomersCorporateContactsResponse::class
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns filtered corporate customers list
|
||||
*
|
||||
|
@ -452,4 +476,190 @@ class ClientAdapter
|
|||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get corporate customer addresses
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateAddressesRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CustomersCorporateAddressesResponse|null
|
||||
*/
|
||||
public function customersCorporateAddresses(CustomersCorporateAddressesRequest $request): ?CustomersCorporateAddressesResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateAddresses(
|
||||
$request->externalId,
|
||||
Serializer::serializeArray($request->filter),
|
||||
$request->page,
|
||||
$request->limit,
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray(
|
||||
$response->getResponseBody(),
|
||||
CustomersCorporateAddressesResponse::class
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create corporate customer note
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateAddressesCreateRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CreateResponse|null
|
||||
*/
|
||||
public function customersCorporateAddressesCreate(CustomersCorporateAddressesCreateRequest $request): ?CreateResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateAddressesCreate(
|
||||
$request->externalId,
|
||||
Serializer::serializeArray($request->address),
|
||||
$request->externalId,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit corporate customer note
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateAddressesEditRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CreateResponse|null
|
||||
*/
|
||||
public function customersCorporateAddressesEdit(CustomersCorporateAddressesEditRequest $request): ?OperationResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateAddressesEdit(
|
||||
$request->externalId,
|
||||
$request->entityBy === self::EXTERNAL_ID ? $request->address->externalId : $request->address->id,
|
||||
Serializer::serializeArray($request->address),
|
||||
$request->by,
|
||||
$request->entityBy,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), OperationResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get corporate customer companies by id or externalId
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesRequest $request
|
||||
*
|
||||
* @return CompaniesResponse|null
|
||||
*/
|
||||
public function customersCorporateCompanies(CustomersCorporateCompaniesRequest $request): ?CompaniesResponse {
|
||||
$response = $this->client->customersCorporateCompanies(
|
||||
$request->idOrExternalId,
|
||||
Serializer::serializeArray($request->filter),
|
||||
$request->page,
|
||||
$request->limit,
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CompaniesResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create corporate customer companies
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesCreateRequest $request
|
||||
*
|
||||
* @return CompaniesResponse|null
|
||||
*/
|
||||
public function customersCorporateCompaniesCreate(CustomersCorporateCompaniesCreateRequest $request): ?CreateResponse {
|
||||
$response = $this->client->customersCorporateCompaniesCreate(
|
||||
$request->externalId,
|
||||
Serializer::serializeArray($request->company),
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Edit corporate customer companies by id or externalId
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateCompaniesEditRequest $request
|
||||
*
|
||||
* @return CompaniesResponse|null
|
||||
*/
|
||||
public function customersCorporateCompaniesEdit(CustomersCorporateCompaniesEditRequest $request): ?OperationResponse {
|
||||
$response = $this->client->customersCorporateAddressesEdit(
|
||||
$request->externalId,
|
||||
$request->entityBy === self::EXTERNAL_ID ? $request->company->externalId : $request->company->id,
|
||||
Serializer::serializeArray($request->company),
|
||||
$request->by,
|
||||
$request->entityBy,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get corporate customer contacts by id or externalId
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CustomersCorporateContactsResponse|null
|
||||
*/
|
||||
public function customersCorporateContacts(CustomersCorporateContactsRequest $request): ?CustomersCorporateContactsResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateContacts(
|
||||
$request->externalId,
|
||||
Serializer::serializeArray($request->filter),
|
||||
$request->page,
|
||||
$request->limit,
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray(
|
||||
$response->getResponseBody(),
|
||||
CustomersCorporateContactsResponse::class
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create corporate customer contact
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsCreateRequest $request
|
||||
*
|
||||
* @return \Intaro\RetailCrm\Model\Api\Response\CreateResponse|null
|
||||
*/
|
||||
public function customersCorporateContactsCreate(CustomersCorporateContactsCreateRequest $request): ?CreateResponse
|
||||
{
|
||||
$response = $this->client->customersCorporateContactsCreate(
|
||||
$request->idOrExternalId,
|
||||
Serializer::serializeArray($request->contact),
|
||||
$request->by,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit corporate customer contacts by id or externalId
|
||||
*
|
||||
* @param \Intaro\RetailCrm\Model\Api\Request\Customers\CustomersCorporateContactsEditRequest $request
|
||||
*
|
||||
* @return CompaniesResponse|null
|
||||
*/
|
||||
public function customersCorporateContactsEdit(CustomersCorporateContactsEditRequest $request): ?OperationResponse {
|
||||
$response = $this->client->customersCorporateContactsEdit(
|
||||
$request->idOrExternalId,
|
||||
$request->entityBy === self::EXTERNAL_ID ? $request->contact->externalId : $request->contact->id,
|
||||
Serializer::serializeArray($request->contact),
|
||||
$request->by,
|
||||
$request->entityBy,
|
||||
$request->site
|
||||
);
|
||||
|
||||
return Deserializer::deserializeArray($response->getResponseBody(), CreateResponse::class);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Customers;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Model\Api\Request\ByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* Class CustomersCorporateAddressesCreateRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
*/
|
||||
class CustomersCorporateAddressesCreateRequest extends AbstractApiModel
|
||||
{
|
||||
use ByTrait;
|
||||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $externalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Address
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Address")
|
||||
* @Mapping\SerializedName("address")
|
||||
*/
|
||||
public $address;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Customers;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Model\Api\Request\ByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\EntityByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* Class CustomersCorporateAddressesEditRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
*/
|
||||
class CustomersCorporateAddressesEditRequest extends AbstractApiModel
|
||||
{
|
||||
use ByTrait;
|
||||
use EntityByTrait;
|
||||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $externalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Address
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Address")
|
||||
* @Mapping\SerializedName("address")
|
||||
*/
|
||||
public $address;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Customers;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Model\Api\Request\ByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\PaginatedTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* Class CustomersNotesRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
*/
|
||||
class CustomersCorporateAddressesRequest extends AbstractApiModel
|
||||
{
|
||||
use ByTrait;
|
||||
use PaginatedTrait;
|
||||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $externalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Request\Filter\CustomersCorporateAddressesFilter
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Request\Filter\CustomersCorporateAddressesFilter")
|
||||
* @Mapping\SerializedName("filter")
|
||||
*/
|
||||
public $filter;
|
||||
}
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Customers;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Model\Api\Request\ByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* Class CustomersCorporateCompaniesCreateRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
*/
|
||||
class CustomersCorporateCompaniesCreateRequest extends AbstractApiModel
|
||||
{
|
||||
use ByTrait;
|
||||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $externalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Company
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Company")
|
||||
* @Mapping\SerializedName("company")
|
||||
*/
|
||||
public $company;
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Customers;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Model\Api\Request\ByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\EntityByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* Class CustomersCorporateCompaniesEditRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
*/
|
||||
class CustomersCorporateCompaniesEditRequest extends AbstractApiModel
|
||||
{
|
||||
use ByTrait;
|
||||
use EntityByTrait;
|
||||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $externalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Company
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Company")
|
||||
* @Mapping\SerializedName("company")
|
||||
*/
|
||||
public $company;
|
||||
}
|
|
@ -29,12 +29,9 @@ class CustomersCorporateCompaniesRequest extends AbstractApiModel
|
|||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @Mapping\Type("int")
|
||||
* @Mapping\SerializedName("id")
|
||||
* @var string
|
||||
*/
|
||||
public $id;
|
||||
public $idOrExternalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Request\Filter\CompanyFilter
|
||||
|
|
|
@ -27,12 +27,9 @@ class CustomersCorporateContactsCreateRequest extends AbstractApiModel
|
|||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*
|
||||
* @Mapping\Type("int")
|
||||
* @Mapping\SerializedName("id")
|
||||
* @var string
|
||||
*/
|
||||
public $id;
|
||||
public $idOrExternalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\CustomerContact
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Customers;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\Request\ByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
use Intaro\RetailCrm\Model\Api\Request\EntityByTrait;
|
||||
use Intaro\RetailCrm\Model\Api\Request\SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* Class CustomersCorporateContactsEditRequest
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Customers
|
||||
*/
|
||||
class CustomersCorporateContactsEditRequest extends AbstractApiModel
|
||||
{
|
||||
use ByTrait;
|
||||
use EntityByTrait;
|
||||
use SiteScopedTrait;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $idOrExternalId;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\CustomerContact
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\CustomerContact")
|
||||
* @Mapping\SerializedName("contact")
|
||||
*/
|
||||
public $contact;
|
||||
}
|
|
@ -25,9 +25,9 @@ class CustomersCorporateListRequest extends AbstractApiModel
|
|||
use PaginatedTrait;
|
||||
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Request\Filter\CorporateCustomerFilter
|
||||
* @var \Intaro\RetailCrm\Model\Api\Request\Filter\CustomersCorporateFilter
|
||||
*
|
||||
* @Mapping\Type("IIntaro\RetailCrm\Model\Api\Request\Filter\CorporateCustomerFilter")
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Request\Filter\CustomersCorporateFilter")
|
||||
* @Mapping\SerializedName("filter")
|
||||
*/
|
||||
public $filter;
|
||||
|
|
|
@ -27,7 +27,7 @@ class CustomersListRequest extends AbstractApiModel
|
|||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Request\Filter\CustomerFilter
|
||||
*
|
||||
* @Mapping\Type("IIntaro\RetailCrm\Model\Api\Request\Filter\CustomerFilter")
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Request\Filter\CustomerFilter")
|
||||
* @Mapping\SerializedName("filter")
|
||||
*/
|
||||
public $filter;
|
||||
|
|
|
@ -28,7 +28,7 @@ class CustomersNotesCreateRequest extends AbstractApiModel
|
|||
* @var \Intaro\RetailCrm\Model\Api\CustomerNote
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\CustomerNote")
|
||||
* @Mapping\SerializedName("filter")
|
||||
* @Mapping\SerializedName("note")
|
||||
*/
|
||||
public $note;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Filter
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Request\Filter;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class CustomersCorporateAddressesFilter
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Filter
|
||||
*/
|
||||
class CustomersCorporateAddressesFilter extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var int[]
|
||||
*
|
||||
* @Mapping\Type("int[]")
|
||||
* @Mapping\SerializedName("ids")
|
||||
*/
|
||||
public $ids;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("name")
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("city")
|
||||
*/
|
||||
public $city;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*
|
||||
* @Mapping\Type("string")
|
||||
* @Mapping\SerializedName("region")
|
||||
*/
|
||||
public $region;
|
||||
}
|
|
@ -15,11 +15,11 @@ use Intaro\RetailCrm\Component\Json\Mapping;
|
|||
use Intaro\RetailCrm\Model\Api\AbstractApiModel;
|
||||
|
||||
/**
|
||||
* Class CorporateCustomerFilter
|
||||
* Class CustomersCorporateFilter
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api\Request\Filter
|
||||
*/
|
||||
class CorporateCustomerFilter extends AbstractApiModel
|
||||
class CustomersCorporateFilter extends AbstractApiModel
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
|
@ -0,0 +1,30 @@
|
|||
<?php
|
||||
/**
|
||||
* PHP version 7.1
|
||||
*
|
||||
* @category Integration
|
||||
* @package Intaro\RetailCrm\Model\Api\Response
|
||||
* @author retailCRM <integration@retailcrm.ru>
|
||||
* @license MIT
|
||||
* @link http://retailcrm.ru
|
||||
* @see http://retailcrm.ru/docs
|
||||
*/
|
||||
namespace Intaro\RetailCrm\Model\Api\Response;
|
||||
|
||||
use Intaro\RetailCrm\Component\Json\Mapping;
|
||||
|
||||
/**
|
||||
* Class CustomersNotesResponse
|
||||
*
|
||||
* @package Intaro\RetailCrm\Model\Api
|
||||
*/
|
||||
class CustomersCorporateAddressesResponse extends OperationResponse
|
||||
{
|
||||
/**
|
||||
* @var \Intaro\RetailCrm\Model\Api\Address[]
|
||||
*
|
||||
* @Mapping\Type("Intaro\RetailCrm\Model\Api\Address[]")
|
||||
* @Mapping\SerializedName("addresses")
|
||||
*/
|
||||
public $addresses;
|
||||
}
|
Loading…
Add table
Reference in a new issue