From 2828b090d0826cf3391741f5046e3b9405e7e7db Mon Sep 17 00:00:00 2001 From: Harald Musum Date: Tue, 10 Oct 2023 12:37:12 +0200 Subject: Fix text with description of price items --- .../hosted/controller/restapi/pricing/PricingApiHandler.java | 10 +++++----- .../controller/restapi/pricing/PricingApiHandlerTest.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'controller-server') diff --git a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandler.java b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandler.java index 616b128c380..797731f69ee 100644 --- a/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandler.java +++ b/controller-server/src/main/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandler.java @@ -155,12 +155,12 @@ public class PricingApiHandler extends ThreadedHttpRequestHandler { Cursor cursor = slime.setObject(); var array = cursor.setArray("priceInfo"); - addItem(array, "listPrice", priceInfo.listPrice()); - addItem(array, "volumeDiscount", priceInfo.volumeDiscount()); - addItem(array, "committedAmountDiscount", priceInfo.committedAmountDiscount()); - addItem(array, "enclaveDiscount", priceInfo.enclaveDiscount()); + addItem(array, "List price", priceInfo.listPrice()); + addItem(array, "Volume discount", priceInfo.volumeDiscount()); + addItem(array, "Committed spend discount", priceInfo.committedAmountDiscount()); + addItem(array, "Enclave discount", priceInfo.enclaveDiscount()); - cursor.setString("totalAmount", priceInfo.totalAmount().toPlainString()); + cursor.setString("Total", priceInfo.totalAmount().toPlainString()); return new SlimeJsonResponse(slime); } diff --git a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandlerTest.java b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandlerTest.java index 2d93237159d..d5e9b1f90da 100644 --- a/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandlerTest.java +++ b/controller-server/src/test/java/com/yahoo/vespa/hosted/controller/restapi/pricing/PricingApiHandlerTest.java @@ -27,10 +27,10 @@ public class PricingApiHandlerTest extends ControllerContainerCloudTest { tester.assertJsonResponse(request, """ { "priceInfo": [ - {"description": "listPrice", "amount": "2400.00"}, - {"description": "volumeDiscount", "amount": "5.00"} + {"description": "List price", "amount": "2400.00"}, + {"description": "Volume discount", "amount": "5.00"} ], - "totalAmount": "2395.00" + "Total": "2395.00" } """, 200); -- cgit v1.2.3