Skip to content

Commit

Permalink
TestSpringboot: Update Javadoc
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Ledda <leonardoledda@gmail.com>
  • Loading branch information
LeddaZ committed Apr 10, 2024
1 parent 14fd258 commit 09f29d7
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,12 @@ public static String processOrder(@RequestBody OrderIdRequest request) {
}
}

/**
* Updates the price of a finished product.
*
* @param request The request data
* @return The result of the operation.
*/
@PatchMapping("/api/patch/updateFpPrice")
public static String updateFpPrice(@RequestBody ItemIdRequest request) {
try {
Expand Down Expand Up @@ -337,6 +343,12 @@ public static String updateFpPrice(@RequestBody ItemIdRequest request) {
}
}

/**
* Updates the price of a semifinished product.
*
* @param request The request data
* @return The result of the operation.
*/
@PatchMapping("/api/patch/updateSfPrice")
public static String updateSfPrice(@RequestBody OrderIdRequest request) {
try {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package it.leddaz.testspringboot.requests;

/**
* Stores data for requests with an item ID.
*
* @author Leonardo Ledda (LeddaZ)
*/
public class ItemIdRequest {

private int itemId;

/**
* Returns the item ID.
*
* @return The item ID
*/
public int getItemId() {
return itemId;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,20 @@ public class NewOrderRequest {
private int itemId;
private int quantity;

/**
* Returns the item ID.
*
* @return The item ID
*/
public int getItemId() {
return itemId;
}

/**
* Returns the quantity.
*
* @return The quantity
*/
public int getQuantity() {
return quantity;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
package it.leddaz.testspringboot.requests;

/**
* Stores data for requests with an order ID.
*
* @author Leonardo Ledda (LeddaZ)
*/
public class OrderIdRequest {

private int orderId;

/**
* Returns the order ID.
*
* @return The order ID
*/
public int getOrderId() {
return orderId;
}

}

0 comments on commit 09f29d7

Please sign in to comment.