NEW New REST API explorer. Can create invoice and orders with lines.

This commit is contained in:
Laurent Destailleur
2016-07-29 02:28:51 +02:00
parent 9ca7f2cb66
commit 4e8e7f8e05
6 changed files with 100 additions and 122 deletions

View File

@@ -86,8 +86,11 @@ class DolibarrApi
function _cleanObjectDatas($object) {
// Remove $db object property for object
unset($object->db);
unset($object->db);
// Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses
unset($object->linkedObjects);
// Remove the $oldcopy property because it is not supported by the JSON
// encoder. The following error is generated when trying to serialize
// it: "Error encoding/decoding JSON: Type is not supported"
@@ -109,13 +112,15 @@ class DolibarrApi
}
// If object has linked objects, remove $db property
/*
if(isset($object->linkedObjects) && count($object->linkedObjects) > 0) {
foreach($object->linkedObjects as $type_object => $linked_object) {
foreach($linked_object as $object2clean) {
$this->_cleanObjectDatas($object2clean);
}
}
}
}*/
return $object;
}