commit 65c59455e4e04e25d749916c95c383cda83047d1
parent e36b44842903bac92f9caadc30504742efb263ee
Author: Antoine A <>
Date: Mon, 12 May 2025 14:58:01 +0200
[dd:libeufin-conversion-rate-group] improve API design
Diffstat:
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/design-documents/063-libeufin-conversion-rate-group.rst b/design-documents/063-libeufin-conversion-rate-group.rst
@@ -50,7 +50,7 @@ This would become the ``default`` group, that will be used by all created users.
.. ts:def:: ConversionRateGroupRequest
interface ConversionRateGroupRequest {
- // The name of this group
+ // The name of this group, cannot be ``default``
name: string;
// A description of the group
@@ -74,12 +74,14 @@ This would become the ``default`` group, that will be used by all created users.
// Fiat amount fee to subtract after applying the cashout ratio.
cashout_fee?: Amount;
}
+
+TODO: do we also enable different rouding mode ??
.. ts:def:: ConversionRateGroup
interface ConversionRateGroup {
- // The name of this group, null if default group
- name?: string;
+ // The name of this group, ``default`` is the default group
+ name: string;
// A description of the group
description?: string;
@@ -90,6 +92,9 @@ This would become the ``default`` group, that will be used by all created users.
// Number of users affected to this group
num_users: Integer;
+ // Applied conversion rate
+ conversion_rate: ConversionRate;
+
// Minimum fiat amount authorised for cashin before conversion
cashin_min_amount?: Amount;
@@ -135,7 +140,5 @@ DELETE conversion-rate-group/$GROUP-ID:
We add admin only ``conversion_rate_group`` optional field to POST /accounts and PATCH /accounts/$USERNAME.
-We add ``conversion_rate_group`` optional field and query filter to GET /accounts
-We add ``conversion_rate_group`` optional field to GET /accounts/$USERNAME
-
-TODO: should GET /accounts/$USERNAME return the conversion rate group and/or the conversion rate? (reduce the number of fetch for the SPA and improve consistency)
-\ No newline at end of file
+We add ``conversion_rate_group`` `Integer` optional field and query filter to GET /accounts
+We add ``conversion_rate_group`` `ConversionRateGroup` field of GET /accounts/$USERNAME
+\ No newline at end of file