Class FundTransferController
java.lang.Object
org.training.fundtransfer.controller.FundTransferController
@RestController
@RequestMapping("/fund-transfers")
public class FundTransferController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<FundTransferResponse>fundTransfer(FundTransferRequest fundTransferRequest) Handles the fund transfer request.org.springframework.http.ResponseEntity<List<FundTransferDto>>getAllTransfersByAccountId(String accountId) Retrieves all fund transfers by account ID.org.springframework.http.ResponseEntity<FundTransferDto>getTransferDetailsFromReferenceId(String referenceId) Retrieves the transfer details from the given reference ID.
-
Constructor Details
-
FundTransferController
public FundTransferController()
-
-
Method Details
-
fundTransfer
@PostMapping public org.springframework.http.ResponseEntity<FundTransferResponse> fundTransfer(@RequestBody FundTransferRequest fundTransferRequest) Handles the fund transfer request.- Parameters:
fundTransferRequest- The fund transfer request object.- Returns:
- The response entity containing the fund transfer response.
-
getTransferDetailsFromReferenceId
@GetMapping("/{referenceId}") public org.springframework.http.ResponseEntity<FundTransferDto> getTransferDetailsFromReferenceId(@PathVariable String referenceId) Retrieves the transfer details from the given reference ID.- Parameters:
referenceId- the reference ID of the transfer- Returns:
- the transfer details as a ResponseEntity
-
getAllTransfersByAccountId
@GetMapping public org.springframework.http.ResponseEntity<List<FundTransferDto>> getAllTransfersByAccountId(@RequestParam String accountId) Retrieves all fund transfers by account ID.- Parameters:
accountId- the ID of the account- Returns:
- the list of fund transfer DTOs
-