taler-docs

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

patch-private-pots-POT_ID.rst (1397B)


      1 .. http:patch:: [/instances/$INSTANCES]/private/pots/$POT_ID
      2 
      3   This is used to update a pot.
      4 
      5   **Required permission:** ``pots-write``
      6 
      7   **Request:**
      8 
      9   The request body must be a `PotModifyRequest`.
     10 
     11   **Response:**
     12 
     13   :http:statuscode:`204 No content`:
     14      The pot has successfully modified.
     15   :http:statuscode:`404 Not found`:
     16      The pot or instance is unknown to the backend.
     17   :http:statuscode:`409 Conflict`:
     18      The pot total did not match the expected total
     19      and thus resetting the pot failed.
     20 
     21   **Details:**
     22 
     23   .. ts:def:: PotModifyRequest
     24 
     25     interface PotModifyRequest {
     26 
     27       // Description of the pot. Possibly included
     28       // in the pot message.
     29       description: string;
     30 
     31       // Name of the pot. Must be unique per instance.
     32       pot_name: string;
     33 
     34       // Expected current totals amount in the pot.
     35       // Should be given if ``new_pot_total`` is specified
     36       // as this allows checking that the pot total did
     37       // not change in the meantime.  However, this is
     38       // not enforced server-side, the client may choose
     39       // to not use this safety-measure.
     40       expected_pot_totals?: Amount[];
     41 
     42       // Expected new total amounts to store in the pot.
     43       // Does **not** have to be in the same currencies as
     44       // the existing amounts in the pot. Used to reset
     45       // the pot and/or change the amounts.
     46       new_pot_totals?: Amount[];
     47    }