From d6c5eaa8b19a7d4cc108ffafd0691ad499238b84 Mon Sep 17 00:00:00 2001 From: Marcello Stanisci Date: Fri, 14 Dec 2018 19:41:12 +0100 Subject: Update according to #5066. --- api-bank.rst | 1 + api-merchant.rst | 13 ++++--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/api-bank.rst b/api-bank.rst index f038d6b4..41d739bf 100644 --- a/api-bank.rst +++ b/api-bank.rst @@ -167,6 +167,7 @@ request. :query direction: argument taking values `debit` or `credit`, according to the caller willing to receive both incoming and outgoing, only outgoing, or only incoming records. Use `both` to return both directions. :query cancelled: argument taking values `omit` or `show` to filter out rejected transactions :query account_number: bank account whose history is to be returned. *Currently ignored*, as multiple bank accounts per user are not implemented yet. + :query ordering: can be `descending` or `ascending` and regulates whether the row are returned youger-to-older or vice versa. Defaults to `descending`. **Response** diff --git a/api-merchant.rst b/api-merchant.rst index aa435b75..5c797038 100644 --- a/api-merchant.rst +++ b/api-merchant.rst @@ -550,16 +550,11 @@ Transaction history **Request** - :query date: only transactions *older* than this parameter will be returned. It's a timestamp, given in seconds. - Being optional, it defaults to the current time if not given. - :query start: only transactions having `row_id` less than `start` will be returned. Being optional, it defaults to the - highest `row_id` contained in the DB (namely, the youngest entry). - :query delta: at most `delta` entries will be returned. Being optional, it defaults to 20. + :query date: time threshold, see `delta` for its interpretation. + :query start: row number threshold, see `delta` for its interpretation. Defaults to `UINT64_MAX`, namely the biggest row id possible in the database. + :query delta: takes value of the form `N (-N)`, so that at most `N` values strictly younger (older) than `start` and `date` are returned. Defaults to `-20`. :query instance: on behalf of which merchant instance the query should be accomplished. - - A typical usage is to firstly call this API without `start` and `date` parameter, then fetch the oldest - `row_id` from the results, and then keep calling the API by using the oldest row ID as `start` parameter. - This way we simply "scroll" results from the youngest to the oldest, `delta` entries at time. + :query ordering: takes value `descending` or `ascending` according to the results wanted from younger to older or vice versa. Defaults to `descending`. **Response** -- cgit v1.2.3