taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit f5e936afc556755d8b9bfd2a688cdad0e6fcbe3b
parent 668e07b0df6230a927de5a60575c98b9765122f8
Author: Casaburi Johannes <johannes.casaburi@students.bfh.ch>
Date:   Mon, 15 Jan 2024 16:18:41 +0100

Adjust donau charity api

Diffstat:
Mcore/api-donau.rst | 35+++++++++++++++--------------------
1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/core/api-donau.rst b/core/api-donau.rst @@ -41,7 +41,7 @@ The chapters group the families of requests frequently encountered when using th * :ref:`Issue receipts<donau_issue>`: For use by charities: Issue receipts for blinded unique donor ids. * :ref:`Submit receipts<donau_submit>`: Receive the receipts and, if valid, add all of it's donation units to the donor total. Returns a signature on the total yearly donation amount, hash of taxid+salt and year. * :ref:`Charity administration and status information<donau_charity>`: - + * For use by administrators to add/modify a charity * For use by charities to get their remaining donation volume @@ -265,7 +265,7 @@ Use the :ref:`charity GET route<donau_charity_get>` to see the remaining donatio All incoming `BDID` are recorded under the corresponding charity_id by the Donau. .. http:POST:: /batch-issue/$CHARITY_ID - + Send in a `IssueReceiptsRequest` and ask the Donau to sign all it's contained `BDID`. **Request:** `IssueReceiptsRequest` @@ -297,7 +297,7 @@ All incoming `BDID` are recorded under the corresponding charity_id by the Donau interface BDID { donau_pub_hash: HashCode; - taxpayer_blinded_id: BDIDEnvelope; + taxpayer_blinded_id: BDIDEnvelope; } .. ts:def:: BDIDEnvelope @@ -338,7 +338,7 @@ All incoming `BDID` are recorded under the corresponding charity_id by the Donau } .. ts:def:: DonationReceiptSignature - + .. ts:def:: BlindedDonationReceiptSignature type BlindedDonationReceiptSignature = @@ -419,7 +419,7 @@ Submit receipts Inspired by the Taler exchange :ref:`Deposit<deposit-par>`. .. http:POST:: /submit - + Send in donation receipts for the past fiscal year, receive signed total back. **Request:** `SubmitDonationReceiptsRequest` @@ -440,7 +440,7 @@ Inspired by the Taler exchange :ref:`Deposit<deposit-par>`. .. ts:def:: SubmitDonationReceiptsRequest interface SubmitDonationReceiptsRequest{ - // hashed taxpayer ID plus salt + // hashed taxpayer ID plus salt taxnr_hashed: HashCode; // All donation receipts must be for this year. year: Integer; @@ -471,7 +471,7 @@ Inspired by the Taler exchange :ref:`Deposit<deposit-par>`. } .. ts:def:: CSDonationSignature - + interface CSDonationSignature { type: "CS"; @@ -513,7 +513,7 @@ The GET status requests require an authorized bearer token as well. **Reponse:** :http:statuscode:`200 OK`: - The request was successful, and the response is a `Charities`. + The request was successful, and the response is a `Charities`. **Details:** @@ -552,17 +552,12 @@ The GET status requests require an authorized bearer token as well. .. ts:def:: Charity interface Charity { + charity_pub: EddsaPublicKey; + url: string; name: string; - pub_key: EddsaPublicKey; max_per_year: Amount; - donation_history: CharityHistoryYear[]; - } - - .. ts:def:: CharityHistoryYear - - interface CharityHistoryYear { - year: Integer; - final_amout: Amount; + receipts_to_date: Amount; + current_year: Integer; } .. http:POST:: /charity @@ -582,9 +577,9 @@ The GET status requests require an authorized bearer token as well. The request did not contain an accepted administrator bearer token in it's header. .. ts:def:: CharityRequest - + interface CharityRequest{ - pub_key: EddsaPublicKey; + charity_pub: EddsaPublicKey; max_per_year: Amount; name: string; } @@ -594,7 +589,7 @@ The GET status requests require an authorized bearer token as well. interface CharityResponse{ id: Integer; } - + .. http:PATCH:: /charities/{id}