guewen/prestapyt — Issue #2: Partial edit / add
Author: guewen
Created: 2012-02-12 12:18:23+00:00
State: open

The Prestashop's webservice API is exigeant.
To edit a resource, you must post the entire XML with all the values of the resource, modifying the values you want.

If you try to post a XML with only the few fields to modify, you will get a bad request error.

This can be addressed at the prestapyt level but with a performance penalty.

Implementation has to (only on PrestaShopWebServiceDict) :
On a call to edit on prestapyt with a dict of values:
- call the get method on prestashop
- modify the full XML received with the values of the dict
- call edit on prestashop with the modified xml

on a call to add on prestapyt with a dict of values:
- same as upper but get method on prestashop must not be on a resource and must have the options {'schema': 'blank'}