Returns a single income.
Status: 200 OK
<income>
<amount type="float">12.52</amount>
<concept>Salary</concept>
<created-at type="datetime">2007-08-10T18:38:12Z</created-at>
<date type="date">2007-08-10</date>
<description>My first salary</description>
<id type="integer">793</id>
<updated-at type="datetime">2007-08-10T18:38:12Z</updated-at>
</income>
Returns a collection of incomes. Note that this request has no filter applied, so the response could be very long.
Status: 200 OK
<incomes>
<income>
...
</income>
<income>
...
</income>
</incomes>
Returns a collection of incomes that belongs to month and year (Based on current time in user's timezone).
Status: 200 OK
<incomes>
<income>
...
</income>
<income>
...
</income>
</incomes>
Returns a collection of incomes that belongs to period (Based on current time in user's timezone).
possible periods are:
Status: 200 OK
<incomes>
<income>
...
</income>
<income>
...
</income>
</incomes>
Returns a collection of incomes that matchs the search properties. Possible properties are:
Examples:
GET /incomes/search.xml?initial_date=2007-08-01&description=salary - This would find incomes from 2007-08-01 matching description like salary.
GET /incomes/search.xml?final_amount=5000&initial_date=2007-08-01 - This would find incomes from 2007-08-01 below 5000 Euro/Dollar/Whatever.
Status: 200 OK
<incomes>
<income>
...
</income>
<income>
...
</income>
</incomes>
Creates a new income. The XML for the new income is returned on a successful request with the timestamps recorded and ids for the income.
<income>
<date type="date">2007-08-10</date>
<concept>Salary</concept>
<amount type="float">12.52</amount>
<description>My first salary</description>
</income>
Status: 201 Created
Location: http://test.gastus.com/incomes/#{new-income-id}.xml
<income>
...
</income>
Updates an existing income with new details from the submitted XML.
<income>
<date type="date">2007-08-10</date>
<concept>Salary</concept>
<amount type="float">12.52</amount>
<description>My first salary</description>
</income>
Status: 200 OK
Destroys the income at the referenced URL.
Status: 200 OK