Class PaymentOptionRuleController
java.lang.Object
com.skava.paymentapp.web.paymentoption.PaymentOptionRuleController
@RestController
@RequestMapping("/paymentoptions")
public class PaymentOptionRuleController
extends Object
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse>
createRule
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, @Valid CreatePaymentOptionRuleRequest request, long collectionId, int paymentoptionid) POST - Create Payment Option Ruleorg.springframework.http.ResponseEntity<com.skava.core.ResponseModel>
deleteById
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, int paymentOptionId, int ruleId) DELETE - Delete Payment Option Ruleorg.springframework.http.ResponseEntity<GetAllPaymentOptionRuleResponse>
getAllRules
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, int paymentoptionid, long collectionId, String filter, int page, int size, String sort) GET All payment option rulesorg.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse>
getRuleById
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, int paymentOptionId, int ruleId) GET - Get Payment Option Ruleorg.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse>
patchUpdate
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, int paymentOptionId, int ruleId, @Valid CreatePaymentOptionRuleRequest request) PATCH Patch Update Payment Option Ruleorg.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse>
updateById
(jakarta.servlet.http.HttpServletRequest httpRequest, jakarta.servlet.http.HttpServletResponse httpResponse, String version, String locale, long collectionId, int paymentOptionId, int ruleId, @Valid CreatePaymentOptionRuleRequest request) PUT - Update Payment Option Rule
-
Constructor Details
-
PaymentOptionRuleController
public PaymentOptionRuleController()
-
-
Method Details
-
createRule
@ResponseStatus(CREATED) @PostMapping("/{paymentoptionid}/rules") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/create/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/create/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse> createRule(@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, @Valid @RequestBody(required=true) @Valid CreatePaymentOptionRuleRequest request, @RequestHeader(value="x-collection-id",required=true) long collectionId, @PathVariable(value="paymentoptionid",required=true) int paymentoptionid) POST - Create Payment Option Rule- Parameters:
httpRequest
-httpResponse
-request
- - payloadcollectionId
- - collection idpaymentoptionid
- - payment option id- Returns:
- CreatePaymentOptionRuleResponse
-
getAllRules
@ResponseStatus(OK) @GetMapping("/{paymentoptionid}/rules") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/view/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/view/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<GetAllPaymentOptionRuleResponse> getAllRules(@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, @PathVariable(value="paymentoptionid",required=true) int paymentoptionid, @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) GET All payment option rules- Parameters:
httpRequest
-httpResponse
-version
-locale
-paymentoptionid
-collectionId
-authToken
-filter
-page
-size
-sort
-- Returns:
-
getRuleById
@ResponseStatus(OK) @GetMapping("/{paymentoptionid}/rules/{ruleid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/view/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/view/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse> getRuleById(@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) int paymentOptionId, @PathVariable(value="ruleid",required=true) int ruleId) GET - Get Payment Option Rule- Parameters:
httpRequest
-httpResponse
-collectionId
- - collection idpaymentOptionId
- - payment option idruleId
- - payment option rule id- Returns:
- CreatePaymentOptionRuleResponse
-
updateById
@ResponseStatus(OK) @PutMapping("/{paymentoptionid}/rules/{ruleid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/update/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/update/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse> updateById(@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) int paymentOptionId, @PathVariable(value="ruleid",required=true) int ruleId, @Valid @RequestBody(required=true) @Valid CreatePaymentOptionRuleRequest request) PUT - Update Payment Option Rule- Parameters:
collectionId
- - collection idpaymentOptionId
- - payment option idruleId
- - payment option rule idrequest
- - payload- Returns:
- CreatePaymentOptionRuleResponse
-
patchUpdate
@ResponseStatus(OK) @PatchMapping("/{paymentoptionid}/rules/{ruleid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/update/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/update/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<CreatePaymentOptionRuleResponse> patchUpdate(@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) int paymentOptionId, @PathVariable(value="ruleid",required=true) int ruleId, @Valid @RequestBody(required=true) @Valid CreatePaymentOptionRuleRequest request) PATCH Patch Update Payment Option Rule- Parameters:
httpRequest
-httpResponse
-collectionId
- - collection idpaymentOptionId
- - payment option idruleId
- - payment option rule idrequest
- - payload- Returns:
- CreatePaymentOptionRuleResponse
-
deleteById
@ResponseStatus(NO_CONTENT) @DeleteMapping("/{paymentoptionid}/rules/{ruleid}") @PreAuthorize("hasPrivilegeForBusinessById(\'payment/delete/paymentoption\', #businessId) || hasPrivilegeForServiceAndCollection(\'payment/delete/paymentoption\',\'payment\', #collectionId)") public org.springframework.http.ResponseEntity<com.skava.core.ResponseModel> deleteById(@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) int paymentOptionId, @PathVariable(value="ruleid",required=true) int ruleId) DELETE - Delete Payment Option Rule- Parameters:
httpRequest
-httpResponse
-collectionId
- - collection idpaymentOptionId
- - payment option idruleId
- - payment option rule id- Returns:
- String
-