Skip to content

Commit 8702007

Browse files
sdagostisdagosti
authored andcommitted
Updated comments on the code
1 parent 7c72505 commit 8702007

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/main/java/it/eng/dome/billing/proxy/controller/BillingController.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,15 @@ public class BillingController {
5353
/**
5454
* The POST /billing/previewPrice REST API is invoked to calculate the price preview (i.e., prices and taxes) of a ProcuctOrder (TMF622-v4).
5555
*
56-
* @param orderJson The ProductOrder (TMF622-v4) as a Json string for which the prices and taxes must be calculated
57-
* @return The ProductOrder as a Json string with prices and taxes
56+
* @param billingPreviewRequestDTO The DTO, as a json string, contains information about the ProductOrder (TMF622-v4) and, in case of pay per use scenario, the list of simulate Usage (TMF635-v4) for which the price preview must be calculated.* @return The ProductOrder as a Json string with prices and taxes
5857
* @throws Throwable If an error occurs during the calculation of the product order's price preview
5958
*/
6059

6160
@RequestMapping(value = "/previewPrice", method = RequestMethod.POST, produces = "application/json", consumes = "application/json")
62-
public String calculatePricePreview(@RequestBody String orderJson) throws Throwable {
61+
public String calculatePricePreview(@RequestBody String billingPreviewRequestDTO) throws Throwable {
6362
logger.info("Received request to calculate price preview");
6463

65-
String orderWithPrice = billing.billingPreviewPrice(orderJson);
64+
String orderWithPrice = billing.billingPreviewPrice(billingPreviewRequestDTO);
6665

6766
logger.info("Calculate Invoicing (preview price) to apply Taxes");
6867
return billing.invoicingPreviewTaxes(orderWithPrice);

src/main/java/it/eng/dome/billing/proxy/service/BillingProxyService.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ public class BillingProxyService implements IProxyService {
2727

2828

2929

30-
public String billingPreviewPrice(String order) {
30+
public String billingPreviewPrice(String billingPreviewRequestDTO) {
3131
HttpHeaders headers = new HttpHeaders();
3232
headers.setContentType(MediaType.APPLICATION_JSON);
33-
HttpEntity<String> request = new HttpEntity<>(order, headers);
33+
HttpEntity<String> request = new HttpEntity<>(billingPreviewRequestDTO, headers);
3434

35-
logger.debug("Payload billing preview price received:\n" + order);
35+
logger.debug("Payload billing preview price received:\n" + billingPreviewRequestDTO);
3636
ResponseEntity<String> response = restTemplate.postForEntity(billinEngine + "/billing/previewPrice", request, String.class);
3737

3838
if (response != null && response.getBody() != null) {

0 commit comments

Comments
 (0)