Fra version 6.1
Ændret af David Persson
den 2019/12/09 11:26
Til version 7.1
Ændret af David Persson
den 2019/12/09 11:32
Beskrivelse: Der er ikke nogen kommentar til denne version

Summary

Details

Page properties
Content
... ... @@ -276,15 +276,102 @@
276 276  }
277 277  {{/code}}
278 278  
279 -**Resource properties**
279 +== Transactions ==
280 280  
281 -(% class="table-bordered table-striped" %)
282 -|=Property|=Data type|=Format|=Required in post|=Description
283 -|##amountInclVat##|##decimal##|N.NN|Y|Amount (including VAT) to credit, always two decimals
284 -|##creditedAmount##|##decimal##|N.NN| |The actual amount that was credited, always two decimals
285 285  
286 -== Problems ==
282 +{{code language="http" title="**Request**"}}
283 +POST /ledger/credit-account/v1/XXX/accounts/123/transactions HTTP/1.1
284 +Host: -
285 +Authorization: Bearer <Token>
286 +Content-Type: application/json
287 287  
288 +
289 +{{/code}}
290 +
291 +
292 +{{code language="http" title="**Response**"}}
293 +HTTP/1.1 201 Created
294 +Content-Type: application/json
295 +
296 +{
297 + "operations": null,
298 + "items": [
299 + {
300 + "type": "payment", //transactionTypeGroup
301 + "description": "",
302 + "amount": 200.00,
303 + "billed": false|true,
304 + "date": "2019-10-09", //ValueDate
305 + "reserveDate": null
306 + },
307 + {
308 + "type": "purchase", //transactionTypeGroup
309 + "description": "stora coop visby, k�pref. 12345689",
310 + "amount": 200.00,
311 + "billed": false|true,
312 + "date": "2019-10-09", //ValueDate
313 + "reserveDate": "2019-10-05",
314 + },
315 + {
316 + "type": "credit", //transactionTypeGroup
317 + "description": "",
318 + "amount": 200.00,
319 + "billed": false|true,
320 + "date": "2019-10-09", //ValueDate
321 + "reserveDate": "2019-10-05"
322 + }
323 + ],
324 + "@id": "/ledger/credit-account/v1/501/accounts/123456/transactions?fromDate=2019-10-01",
325 + "view": {
326 + "@id": "/ledger/credit-account/v1/501/accounts/123456/transactions?fromDate=2019-10-01&$top=2&$skip=0",
327 + "next": "/ledger/credit-account/v1/501/accounts/123456/transactions?fromDate=2019-10-01&$top=2&$skip=2"
328 + }
329 +}
330 +{{/code}}
331 +
332 +== Reservations ==
333 +
334 +
335 +{{code language="http" title="**Request**"}}
336 +POST /ledger/credit-account/v1/XXX/accounts/123/reservations HTTP/1.1
337 +Host: -
338 +Authorization: Bearer <Token>
339 +Content-Type: application/json
340 +
341 +
342 +{{/code}}
343 +
344 +
345 +{{code language="http" title="**Response**"}}
346 +HTTP/1.1 201 Created
347 +Content-Type: application/json
348 +
349 +{
350 + "operations": null,
351 + "items": [
352 + {
353 + "amount": 200.00,
354 + "reservationId" : 534313546,
355 + "description" : "", //ta med denna??
356 + "pointOfSale" : "",
357 + "date": "2019-10-05",
358 + },
359 + {
360 + "amount": 450.00,
361 + "reservationId" : 2452434864,
362 + "description" : "", //ta med denna??
363 + "pointOfSale" : "",
364 + "date": "2019-10-02",
365 + },
366 + ],
367 + "@id": "/ledger/credit-account/v1/501/accounts/123456/reservations",
368 +}
369 +{{/code}}
370 +
371 +
372 +
373 +Problems
374 +
288 288  If an error occur or any validation failed, a "problem" response will be returned.
289 289  Below is a list of problems that can occur:
290 290