Closed mileyvirus closed 4 years ago
Found the solution, I added expense_data["category_id"] = expense_data.pop("category")
in createExpense
before sending the expense_data
and sure enough it works.
So the correct name is category_id
and when you create a new expense you just do expense.setCategory(5)
where 5 is Electricity.
I do need to update the documentation. Once done I will mark it as done
So, I had a look at this. Unfortunately, this is a bug. Ideally you should be able to do this
cat = Category()
cat.setId(10)
expense.setCategory(cat)
and it should work
I am fixing this and it will be available in next release (this week)
~Same goes for group and currency as well~
This is fixed and available for use in version 1.2.0
Great job, thanks!
Whatever I tried just creates an expense but with the General category…
"category":{"id":18,"name":"General"}
I suspect it's because you can't have nested parameters…