This class can Manage accounts of Moy Sklad using its REST API.
It can obtain an authorization password for a given account, so it can send HTTP requests to the Moy Sklad Rest API in order to perform several types of operations.
- PHP version >5.0
- curl
-
Install composer
-
Follow in the project folder:
composer require dmamontov/ms-restapi ~1.1.2In config composer.json your project will be added to the library dmamontov/ms-restapi, who settled in the folder vendor/. In the absence of a config file or folder with vendors they will be created.
If before your project is not used composer, connect the startup file vendors. To do this, enter the code in the project:
require 'path/to/vendor/autoload.php';$ms = new MSRestApi('[email protected]', 'xxxxxxxxxx');
$uuid = '7e4b5318-44df-11e5-7a07-673d0083fdac';
$uomGet = $ms->uomGet($uuid);$ms = new MSRestApi('[email protected]', 'xxxxxxxxxx');
$headerXml = '<?xml version="1.0" encoding="UTF-8"?><%s/>';
$newUom = new SimpleXMLElement(
sprintf($headerXml, 'uom'),
LIBXML_NOENT | LIBXML_NOCDATA |
LIBXML_COMPACT | LIBXML_PARSEHUGE
);
$newUom->addAttribute('favourite', 'false');
$newUom->addAttribute('name', 'example');
$newUom->addChild('code', '999');
$newUom->addChild('externalcode', '999');
$newUom->addChild('description', 'Example 999');
$uomCreate = $ms->uomCreate($newUom);uomGetuomCreateuomDeleteuomGetListuomUpdateListgoodGetgoodCreategoodDeletegoodGetListgoodUpdateListgoodDeleteListgoodFolderGetgoodFolderCreategoodFolderDeletegoodFolderGetListgoodFolderUpdateListgoodFolderDeleteListserviceGetserviceCreateserviceDeleteserviceGetListserviceUpdateListserviceDeleteListwarehouseGetwarehouseCreatewarehouseDeletewarehouseGetListwarehouseUpdateListwarehouseDeleteListcompanyGetcompanyCreatecompanyDeletecompanyGetListcompanyUpdateListcompanyDeleteListmyCompanyGetmyCompanyCreatemyCompanyDeletemyCompanyGetListmyCompanyUpdateListmyCompanyDeleteListpersonGetpersonCreatepersonDeletepersonGetListpersonUpdateListpersonDeleteListemployeeGetemployeeCreateemployeeDeleteemployeeGetListemployeeUpdateListemployeeDeleteListcountryGetcountryCreatecountryDeletecountryGetListcountryUpdateListcountryDeleteListconsignmentGetconsignmentCreateconsignmentDeleteconsignmentGetListconsignmentUpdateListconsignmentDeleteListcurrencyGetcurrencyCreatecurrencyDeletecurrencyGetListcurrencyUpdateListcurrencyDeleteListprocessingPlanFolderGetprocessingPlanFolderCreateprocessingPlanFolderDeleteprocessingPlanFolderGetListprocessingPlanFolderUpdateListprocessingPlanFolderDeleteListprocessingPlanGetprocessingPlanCreateprocessingPlanDeleteprocessingPlanGetListprocessingPlanUpdateListprocessingPlanDeleteListcontractGetcontractCreatecontractDeletecontractGetListcontractUpdateListcontractDeleteListprojectGetprojectCreateprojectDeleteprojectGetListprojectUpdateListprojectDeleteListgtdGetgtdCreategtdDeletegtdGetListgtdUpdateListgtdDeleteListthingGetthingCreatethingDeletethingGetListthingUpdateListthingDeleteListlossReasonGetlossReasonCreatelossReasonDeletelossReasonGetListlossReasonUpdateListlossReasonDeleteListenterReasonGetenterReasonCreateenterReasonDeleteenterReasonGetListenterReasonUpdateListenterReasonDeleteListcustomEntityGetcustomEntityCreatecustomEntityDeletecustomEntityGetListcustomEntityUpdateListcustomEntityDeleteListworkflowGetworkflowCreateworkflowDeleteworkflowGetListworkflowUpdateList
supplyGetsupplyCreatesupplyDeletesupplyGetListsupplyUpdateListsupplyDeleteListdemandGetdemandCreatedemandDeletedemandGetListdemandUpdateListdemandDeleteListlossGetlossCreatelossDeletelossGetListlossUpdateListlossDeleteListenterGetenterCreateenterDeleteenterGetListenterUpdateListenterDeleteListsalesReturnGetsalesReturnCreatesalesReturnDeletesalesReturnGetListsalesReturnUpdateListsalesReturnDeleteListpurchaseReturnGetpurchaseReturnCreatepurchaseReturnDeletepurchaseReturnGetListpurchaseReturnUpdateListpurchaseReturnDeleteListcustomerOrderGetcustomerOrderCreatecustomerOrderDeletecustomerOrderGetListcustomerOrderUpdateListcustomerOrderDeleteListpurchaseOrderGetpurchaseOrderCreatepurchaseOrderDeletepurchaseOrderGetListpurchaseOrderUpdateListpurchaseOrderDeleteListinternalOrderGetinternalOrderCreateinternalOrderDeleteinternalOrderGetListinternalOrderUpdateListinternalOrderDeleteListprocessingOrderGetprocessingOrderCreateprocessingOrderDeleteprocessingOrderGetListprocessingOrderUpdateListprocessingOrderDeleteListprocessingGetprocessingCreateprocessingDeleteprocessingGetListprocessingUpdateListprocessingDeleteListmoveGetmoveCreatemoveDeletemoveGetListmoveUpdateListmoveDeleteListinventoryGetinventoryCreateinventoryDeleteinventoryGetListinventoryUpdateListinventoryDeleteListcashInGetcashInCreatecashInDeletecashInGetListcashInUpdateListcashInDeleteListcashOutGetcashOutCreatecashOutDeletecashOutGetListcashOutUpdateListcashOutDeleteListpaymentInGetpaymentInCreatepaymentInDeletepaymentInGetListpaymentInUpdateListpaymentInDeleteListpaymentOutGetpaymentOutCreatepaymentOutDeletepaymentOutGetListpaymentOutUpdateListpaymentOutDeleteListretailDemandGetretailDemandCreateretailDemandDeleteretailDemandGetListretailDemandUpdateListretailDemandDeleteListretailSalesReturnGetretailSalesReturnCreateretailSalesReturnDeleteretailSalesReturnGetListretailSalesReturnUpdateListretailSalesReturnDeleteList