Skip to content

Instantly share code, notes, and snippets.

@bespalown
Last active August 29, 2015 13:59
Show Gist options
  • Save bespalown/10869594 to your computer and use it in GitHub Desktop.
Save bespalown/10869594 to your computer and use it in GitHub Desktop.
Создал свой товар "samolet" с количеством = 5
[
{
"changing_state" : "changed",
"id" : "534e7a0f61646d7ba8000000",
"total_price" : {
"cents" : 0,
"currency" : "RUB"
},
"updated_at" : 1397652370,
"items" : [
{
"product_id" : null,
"price" : {
"cents" : 0,
"currency" : "RUB"
},
"products_list_id" : "534e7a0f61646d7ba8000000",
"changing_state" : "changed",
"id" : null,
"updated_at" : 1397652370,
"version" : 0,
"stricken" : 0,
"count" : 5,
"title" : "samolet"
}
],
"version" : 0,
"items_count" : 2,
"title" : "e"
}
]
2014-04-16 16:46:13.927 FairPrice[12139:907] JSON answer:
(
{
id = 534e7a0f61646d7ba8000000;
items = (
{
count = 5;
id = 534e7b9561646d7b89000000;
"product_id" = "<null>";
"products_list_id" = 534e7a0f61646d7ba8000000;
stricken = 0;
title = samolet;
"updated_at" = 1397652373;
}
);
"items_count" = 2;
title = e;
"total_price" = {
cents = 0;
currency = RUB;
};
"updated_at" = 1397651983;
}
)
___________________________________________
Ну и соответсвенно при вычеркивании товара или при любых действиях product_id уже = 0 и получаем ошибку 404
___________________________________________
[
{
"changing_state" : "changed",
"id" : "534e7a0f61646d7ba8000000",
"total_price" : {
"cents" : 0,
"currency" : "RUB"
},
"updated_at" : 1397652381,
"items" : [
{
"product_id" : 0,
"price" : {
"cents" : 0,
"currency" : null
},
"products_list_id" : "534e7a0f61646d7ba8000000",
"changing_state" : "changed",
"id" : "534e7b9561646d7b89000000",
"updated_at" : 1397652381,
"version" : 0,
"stricken" : 1,
"count" : 5,
"title" : "samolet"
}
],
"version" : 0,
"items_count" : 2,
"title" : "e"
}
]
P.S. Удаление работает.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment