Class PaymentOptionController
java.lang.Object
com.skava.paymentapp.web.paymentoption.PaymentOptionController
@RestController
@RequestMapping("/paymentoptions")
public class PaymentOptionController
extends Object
- Author:
- Infosys Equinox
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<PaymentOptionResponse>
createPaymentOptionDetails
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, @Valid PaymentOptionRequest request) POST API to create payment optionsorg.springframework.http.ResponseEntity<com.skava.core.ResponseModel>
deletePaymentOptionById
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, Integer paymentOptionId) org.springframework.http.ResponseEntity<GetAllPaymentOptionResponse>
findAllPaymentOptions
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, String filter, int page, int size, String sort) org.springframework.http.ResponseEntity<PaymentOptionResponse>
findPaymentOptionById
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, Integer paymentOptionId) org.springframework.http.ResponseEntity<GetEligiblePaymentOptionResponse>
getEligiblePaymentOptions
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, Long storeId, boolean skipValidation, @Valid GetEligiblePaymentOptionRequest request) POST API to fetch all eligible payment optionsorg.springframework.http.ResponseEntity<PaymentOptionResponse>
patchUpdatePaymentOptionDetails
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, Integer paymentOptionId, @Valid PaymentOptionRequest request) org.springframework.http.ResponseEntity<PaymentOptionResponse>
putPaymentOptionDetails
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, Integer paymentOptionId, @Valid PaymentOptionRequest request)
-
Constructor Details
-
PaymentOptionController
public PaymentOptionController()
-
-
Method Details
-
createPaymentOptionDetails
@ResponseStatus(CREATED) @PostMapping @PreAuthorize("hasPrivilegeForBusinessById(\'payment/create/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/create/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<PaymentOptionResponse> createPaymentOptionDetails(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @Valid @RequestBody(required=true) @Valid PaymentOptionRequest request) POST API to create payment options- Parameters:
httpRequest
-httpResponse
-version
-locale
-collectionId
-authToken
-request
-- Returns:
-
findPaymentOptionById
@ResponseStatus(OK) @GetMapping("/{paymentoptionid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/view/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/view/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<PaymentOptionResponse> findPaymentOptionById(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @PathVariable(value="paymentoptionid",required=true) @IgnoreAudit Integer paymentOptionId) - Parameters:
httpRequest
-httpResponse
-version
-locale
-collectionId
-authToken
-paymentOptionId
-- Returns:
-
findAllPaymentOptions
@ResponseStatus(OK) @GetMapping @PreAuthorize("hasPrivilegeForBusinessById(\'payment/view/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/view/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<GetAllPaymentOptionResponse> findAllPaymentOptions(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestParam(value="filter",required=false) String filter, @RequestParam(value="page",required=false,defaultValue="1") int page, @RequestParam(value="size",required=false,defaultValue="10") int size, @RequestParam(value="sort",required=false) String sort) - Parameters:
httpRequest
-httpResponse
-version
-locale
-collectionId
-authToken
-paymentOptionId
-- Returns:
-
deletePaymentOptionById
@ResponseStatus(NO_CONTENT) @DeleteMapping("/{paymentoptionid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/delete/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/delete/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<com.skava.core.ResponseModel> deletePaymentOptionById(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @PathVariable(value="paymentoptionid",required=true) @IgnoreAudit Integer paymentOptionId) - Parameters:
httpRequest
-httpResponse
-version
-locale
-collectionId
-authToken
-paymentOptionId
-- Returns:
-
putPaymentOptionDetails
@ResponseStatus(OK) @PutMapping("/{paymentoptionid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/update/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/update/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<PaymentOptionResponse> putPaymentOptionDetails(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @PathVariable(value="paymentoptionid",required=true) @IgnoreAudit Integer paymentOptionId, @Valid @RequestBody(required=true) @Valid PaymentOptionRequest request) -
patchUpdatePaymentOptionDetails
@ResponseStatus(OK) @PatchMapping("/{paymentoptionid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/update/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/update/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<PaymentOptionResponse> patchUpdatePaymentOptionDetails(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @PathVariable(value="paymentoptionid",required=true) @IgnoreAudit Integer paymentOptionId, @Valid @RequestBody(required=true) @Valid PaymentOptionRequest request) -
getEligiblePaymentOptions
@ResponseStatus(OK) @PostMapping("/geteligible") @PreAuthorize("hasRoleForServiceAndCollection(\'ROLE_REG_USER\',\'payment\', #collectionId) || hasRoleForServiceAndCollection(\'ROLE_GUEST\',\'payment\', #collectionId) || hasRoleForServiceAndCollection(\'ROLE_ACCOUNT_BUYER_ADMIN\',\'payment\', #collectionId) || hasRoleForServiceAndCollection(\'ROLE_ACCOUNT_BUYER\',\'payment\', #collectionId) || hasPrivilegeForServiceAndCollection(\'payment/geteligible/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<GetEligiblePaymentOptionResponse> getEligiblePaymentOptions(@IgnoreAudit jakarta.servlet.http.HttpServletRequest httpRequest, @IgnoreAudit jakarta.servlet.http.HttpServletResponse httpResponse, @RequestHeader(value="x-version-id",required=false,defaultValue="8.17.4") String version, @RequestHeader(value="locale",required=false,defaultValue="en_US") String locale, @RequestHeader(value="x-collection-id",required=true) long collectionId, @RequestHeader(value="x-store-id",required=false) Long storeId, @RequestHeader(value="skipValidation",required=false,defaultValue="false") boolean skipValidation, @Valid @RequestBody(required=false) @Valid GetEligiblePaymentOptionRequest request) POST API to fetch all eligible payment options- Parameters:
httpRequest
-httpResponse
-version
-locale
-collectionId
-authToken
-request
-- Returns:
-