diff options
author | Antoine A <> | 2023-12-02 16:04:19 +0000 |
---|---|---|
committer | Antoine A <> | 2023-12-02 16:04:19 +0000 |
commit | 04ae8385b3c154630b13cba4a9a1e588d43d516a (patch) | |
tree | f7e817337fcdd1603036a77394239bd56086e575 | |
parent | 35f74ce9f92eba3cd686f01ea4563e4965531646 (diff) | |
download | libeufin-04ae8385b3c154630b13cba4a9a1e588d43d516a.tar.gz libeufin-04ae8385b3c154630b13cba4a9a1e588d43d516a.tar.bz2 libeufin-04ae8385b3c154630b13cba4a9a1e588d43d516a.zip |
Add default_debit_threshold to /config
-rw-r--r-- | API_CHANGES.md | 1 | ||||
-rw-r--r-- | bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt | 3 | ||||
-rw-r--r-- | bank/src/main/kotlin/tech/libeufin/bank/TalerMessage.kt | 3 |
3 files changed, 5 insertions, 2 deletions
diff --git a/API_CHANGES.md b/API_CHANGES.md index e714cd0a..07c0f1e0 100644 --- a/API_CHANGES.md +++ b/API_CHANGES.md @@ -6,6 +6,7 @@ This files contains all the API changes for the current release: - POST /accounts: now returns RegisterAccountResponse with IBAN on http code 200 instead of 201 - CREATE /accounts: new debit_threshold field similar to the one of PATH /accounts + - GET /config: new default_debit_threshold field for the default debt limit for newly created accounts ## bank cli diff --git a/bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt b/bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt index 060b1bdd..828c2e77 100644 --- a/bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt +++ b/bank/src/main/kotlin/tech/libeufin/bank/CoreBankApi.kt @@ -52,7 +52,8 @@ fun Routing.coreBankApi(db: Database, ctx: BankConfig) { currency_specification = ctx.regionalCurrencySpec, allow_conversion = ctx.allowConversion, allow_registrations = ctx.allowRegistration, - allow_deletions = ctx.allowAccountDeletion + allow_deletions = ctx.allowAccountDeletion, + default_debit_threshold = ctx.defaultDebtLimit ) ) } diff --git a/bank/src/main/kotlin/tech/libeufin/bank/TalerMessage.kt b/bank/src/main/kotlin/tech/libeufin/bank/TalerMessage.kt index d289b732..e3050d0e 100644 --- a/bank/src/main/kotlin/tech/libeufin/bank/TalerMessage.kt +++ b/bank/src/main/kotlin/tech/libeufin/bank/TalerMessage.kt @@ -230,7 +230,8 @@ data class Config( val currency_specification: CurrencySpecification, val allow_conversion: Boolean, val allow_registrations: Boolean, - val allow_deletions: Boolean + val allow_deletions: Boolean, + val default_debit_threshold: TalerAmount ) { val name: String = "libeufin-bank" val version: String = "0:0:0" |