Class PaymentManagementEndpoint
java.lang.Object
com.broadleafcommerce.paymenttransaction.web.endpoint.PaymentManagementEndpoint
@FrameworkRestController
@FrameworkMapping("/payments")
@DataRouteByKey("paymentTransaction")
public class PaymentManagementEndpoint
extends Object
- Author:
- Chris Kittrell (ckittrell)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPaymentManagementEndpoint
(PaymentManagementService<Payment> paymentManagementService, PaymentService<Payment> paymentService, PaymentLockService<Payment> paymentLockService, PaymentSummaryService paymentSummaryService, PaymentVersionValidationService paymentVersionValidationService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
archivePayment
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String paymentId, Integer paymentVersion, PaymentLockInfo paymentLockInfo) blockCustomerMutabilityForPaymentFinalization
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, PaymentLockTokens paymentLockTokens) blockCustomerMutabilityOfPayments
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, boolean markTransactionsIneligibleForAutoReversal, PaymentLockTokens paymentLockTokens) createPayment
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, CreatePaymentRequest createPaymentRequest) protected PaymentLockService<Payment>
protected PaymentManagementService<Payment>
protected PaymentService<Payment>
protected PaymentSummaryService
protected PaymentVersionValidationService
protected com.broadleafcommerce.common.extension.TypeFactory
lockAndRetrievePayments
(LockPaymentRequest lockRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) lockPayment
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String paymentId, Integer paymentVersion) lockPayments
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, LockPaymentRequest lockRequest) org.springframework.data.domain.Page<PaymentSummary>
readAllPaymentsForOwner
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, String sourceEntityType, String sourceEntityId, org.springframework.data.domain.Pageable page) org.springframework.data.domain.Page<PaymentSummary>
readAllPaymentsForOwnerFilterBySourceEntityTypes
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, Set<String> sourceEntityTypes, org.springframework.data.domain.Pageable page) readPaymentById
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String paymentId) void
releasePaymentLocks
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, UnlockPaymentRequest req) removeCustomerMutabilityBlockForPaymentFinalization
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, PaymentLockTokens paymentLockTokens) void
setTypeFactory
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) transferPaymentsFromCSR
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, PaymentLockTokens paymentLockTokens) transferPaymentsToCSR
(com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String ownerType, String ownerId, PaymentLockTokens paymentLockTokens) void
unlockPayment
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String paymentId, String lockToken, Integer paymentVersion) org.springframework.http.ResponseEntity<PaymentSummary>
updatePayment
(jakarta.servlet.http.HttpServletRequest request, com.broadleafcommerce.data.tracking.core.context.ContextInfo context, String paymentId, SystemUpdatePaymentRequest req, Integer paymentVersion, PaymentLockInfo paymentLockInfo)
-
Field Details
-
BASE_URI
- See Also:
-
VERSION_VALIDATION_ERR_MSG
- See Also:
-
-
Constructor Details
-
PaymentManagementEndpoint
public PaymentManagementEndpoint(PaymentManagementService<Payment> paymentManagementService, PaymentService<Payment> paymentService, PaymentLockService<Payment> paymentLockService, PaymentSummaryService paymentSummaryService, PaymentVersionValidationService paymentVersionValidationService)
-
-
Method Details
-
createPayment
@FrameworkPostMapping(consumes="application/json") @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public PaymentSummary createPayment(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody CreatePaymentRequest createPaymentRequest) -
lockAndRetrievePayments
@FrameworkPostMapping(value="/lock-and-retrieve", consumes="application/json") @Policy(permissionRoots="PAYMENT_LOCK_MANAGEMENT") public LockPaymentsResponse lockAndRetrievePayments(@RequestBody LockPaymentRequest lockRequest, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
lockPayments
@FrameworkPostMapping(value="/lock", consumes="application/json") @Policy(permissionRoots="PAYMENT_LOCK_MANAGEMENT") public Map<String,String> lockPayments(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody LockPaymentRequest lockRequest) -
releasePaymentLocks
@FrameworkPostMapping(value="/unlock", consumes="application/json") @Policy(permissionRoots="PAYMENT_LOCK_MANAGEMENT") public void releasePaymentLocks(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody UnlockPaymentRequest req) -
lockPayment
@FrameworkPostMapping(value="/{id}/lock", consumes="application/json") @Policy(permissionRoots="PAYMENT_LOCK_MANAGEMENT") public String lockPayment(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String paymentId, Integer paymentVersion) -
unlockPayment
@FrameworkPostMapping(value="/{id}/unlock/{token}", consumes="application/json") @Policy(permissionRoots="PAYMENT_LOCK_MANAGEMENT") public void unlockPayment(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String paymentId, @PathVariable("token") String lockToken, Integer paymentVersion) -
readAllPaymentsForOwner
@FrameworkGetMapping(params={"ownerType","ownerId"}) @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public org.springframework.data.domain.Page<PaymentSummary> readAllPaymentsForOwner(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, @RequestParam(required=false) String sourceEntityType, @RequestParam(required=false) String sourceEntityId, @PageableDefault(size=50) org.springframework.data.domain.Pageable page) -
readAllPaymentsForOwnerFilterBySourceEntityTypes
@FrameworkGetMapping(params={"ownerType","ownerId","sourceEntityTypes"}) @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public org.springframework.data.domain.Page<PaymentSummary> readAllPaymentsForOwnerFilterBySourceEntityTypes(@ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, @RequestParam Set<String> sourceEntityTypes, @PageableDefault(size=50) org.springframework.data.domain.Pageable page) -
readPaymentById
@FrameworkGetMapping("/{id}") @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public PaymentSummary readPaymentById(jakarta.servlet.http.HttpServletRequest request, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String paymentId) -
updatePayment
@FrameworkPatchMapping(value="/{id}", consumes="application/json") @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public org.springframework.http.ResponseEntity<PaymentSummary> updatePayment(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String paymentId, @RequestBody SystemUpdatePaymentRequest req, Integer paymentVersion, PaymentLockInfo paymentLockInfo) -
archivePayment
@FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public void archivePayment(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String paymentId, Integer paymentVersion, PaymentLockInfo paymentLockInfo) -
blockCustomerMutabilityOfPayments
@FrameworkPatchMapping(value="/block-customer-mutability", params={"ownerType","ownerId"}) @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public UpdatePaymentsResponse blockCustomerMutabilityOfPayments(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, @RequestParam(required=false,defaultValue="true") boolean markTransactionsIneligibleForAutoReversal, PaymentLockTokens paymentLockTokens) -
blockCustomerMutabilityForPaymentFinalization
@FrameworkPatchMapping(value="/block-customer-mutability-for-payment-finalization", params={"ownerType","ownerId"}) @Policy(permissionRoots="MUTABILITY_BLOCK_FOR_PAYMENT_FINALIZATION") public UpdatePaymentsResponse blockCustomerMutabilityForPaymentFinalization(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, PaymentLockTokens paymentLockTokens) -
removeCustomerMutabilityBlockForPaymentFinalization
@FrameworkPatchMapping(value="/remove-customer-mutability-block-for-payment-finalization", params={"ownerType","ownerId"}) @Policy(permissionRoots="MUTABILITY_BLOCK_FOR_PAYMENT_FINALIZATION") public UpdatePaymentsResponse removeCustomerMutabilityBlockForPaymentFinalization(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, PaymentLockTokens paymentLockTokens) -
transferPaymentsToCSR
@FrameworkPatchMapping(value="/transfer-to-csr", params={"ownerType","ownerId"}) @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public UpdatePaymentsResponse transferPaymentsToCSR(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, PaymentLockTokens paymentLockTokens) -
transferPaymentsFromCSR
@FrameworkPatchMapping(value="/transfer-from-csr", params={"ownerType","ownerId"}) @Policy(permissionRoots="SYSTEM_PAYMENT_MANAGEMENT") public UpdatePaymentsResponse transferPaymentsFromCSR(@ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestParam String ownerType, @RequestParam String ownerId, PaymentLockTokens paymentLockTokens) -
getPaymentManagementService
-
getPaymentService
-
getPaymentLockService
-
getPaymentSummaryService
-
getPaymentVersionValidationService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
setTypeFactory
@Autowired public void setTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-