PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Dmitry Mamontov   Moy Sklad Rest Api   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Moy Sklad Rest Api
Manage sales accounts of Moy Sklad using its API
Author: By
Last change: fix
fix filters
Date: 8 years ago
Size: 699 bytes
 

Contents

Class file image Download
<?php
require 'MSRestApi.php';

$ms = new MSRestApi('admin@xxxxxxx', 'xxxxxxxxx');

$uuid = '7e4b5318-44df-11e5-7a07-673d0083fdac';
$uomGet = $ms->uomGet($uuid);

$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);

$uomDelete = $ms->uomDelete($uuid);

$uomGetList = $ms->uomGetList(array('code' => '<=111'));
?>