10-11-2025

This commit is contained in:
Mohd-Arham
2025-11-10 10:11:26 +05:30
parent cfac612306
commit c67f222957
34 changed files with 1544 additions and 425 deletions
@@ -13,45 +13,37 @@ import com.billpaymentservice.bbps.service.AgentService;
@RestController
@RequestMapping("/agent")
@CrossOrigin(origins = "*")
public class AgentController {
private final AgentService agentService;
private final AgentService agentService;
public AgentController(AgentService agentService) {
this.agentService = agentService;
}
public AgentController(AgentService agentService) {
this.agentService = agentService;
}
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(
value = "/requestBillFetch",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
public ResponseEntity<ResponseModel> requestBillFetch(
@Validated @RequestBody FetchBillRequest fetchBillRequest) {
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(value = "/requestBillFetch", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> requestBillFetch(@Validated @RequestBody FetchBillRequest fetchBillRequest) {
ResponseModel response = agentService.initiateBillFetch(fetchBillRequest);
return ResponseEntity.ok(response);
}
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(
value = "/fetchBillById",
consumes = MediaType.APPLICATION_JSON_VALUE,
produces = MediaType.APPLICATION_JSON_VALUE
)
public ResponseEntity<ResponseModel> fetchBillById(
@Validated @RequestBody BillFetchByBillIdRequest billFetchByBillIdRequest) {
ResponseModel response = agentService.initiateBillFetch(fetchBillRequest);
return ResponseEntity.ok(response);
}
ResponseModel response = agentService.fetchBillById(billFetchByBillIdRequest);
return ResponseEntity.ok(response);
}
/**
/**
* Fetches bill details from external BBPS service
*/
@PostMapping(value = "/fetchBillById", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> fetchBillById(
@Validated @RequestBody BillFetchByBillIdRequest billFetchByBillIdRequest) {
ResponseModel response = agentService.fetchBillById(billFetchByBillIdRequest);
return ResponseEntity.ok(response);
}
/**
* Fetches bill details validate from external BBPS service
*/
@PostMapping(value = "/requestBillValidate", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
@@ -66,7 +58,8 @@ public class AgentController {
* Fetches bill details by bill Id from external BBPS service
*/
@PostMapping(value = "/requestBillValidateByBillId", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity<ResponseModel> requestBillByBillId(@Validated @RequestBody BillFetchByBillIdRequest billRequest) {
public ResponseEntity<ResponseModel> requestBillByBillId(
@Validated @RequestBody BillFetchByBillIdRequest billRequest) {
ResponseModel response = agentService.initiateBillValidateByBillId(billRequest);
return ResponseEntity.ok(response);