Interface CustomizedSavedPaymentMethodRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
- All Known Subinterfaces:
JpaSavedPaymentMethodRepository<D>
,SavedPaymentMethodRepository<D>
- All Known Implementing Classes:
JpaCustomizedSavedPaymentMethodRepository
public interface CustomizedSavedPaymentMethodRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to saved payment method maintenance and filtering.
- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptionfindByIdForAccount
(String paymentId, String accountId, List<String> parentAccountIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find aSavedPaymentMethod
given its id, account and its parent accounts This method is for B2B use cases where theSavedPaymentMethod.getOwningUserType()
isDefaultSavedPaymentMethodOwningUserTypes.BLC_ACCOUNT
.org.springframework.data.domain.Page<D>
findByOwningUserTypeAndOwningUserIdAndTenantId
(String owningUserType, String owningUserId, String tenantId, org.springframework.data.domain.Pageable page) Find a page ofSavedPaymentMethods
for the given owner type, owner id and tenant idorg.springframework.data.domain.Page<D>
findPageForAccount
(String accountId, List<String> parentAccountIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a page ofSavedPaymentMethods
for the given account and its parent accounts
-
Method Details
-
findByOwningUserTypeAndOwningUserIdAndTenantId
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findByOwningUserTypeAndOwningUserIdAndTenantId(String owningUserType, String owningUserId, String tenantId, @Nullable org.springframework.data.domain.Pageable page) Find a page ofSavedPaymentMethods
for the given owner type, owner id and tenant id- Parameters:
owningUserType
- The type of the saved payment's owning userowningUserId
- The id of the entity that owns this saved payment methodtenantId
- The ID of theTenant
this registration belongs to.page
- the requested page of results from the database- Returns:
- a page of payments for the given owner type and id
-
findPageForAccount
@Policy(operationTypes=READ) org.springframework.data.domain.Page<D> findPageForAccount(String accountId, List<String> parentAccountIds, cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find a page ofSavedPaymentMethods
for the given account and its parent accounts- Parameters:
accountId
- The id of the entity's accountparentAccountIds
- A list of entity's parent account idsfilters
- additional filters to apply in the query.page
- the requested page of results from the databasecontextInfo
- the context info- Returns:
- a page of save payment methods for the given account and parent accounts
-
findByIdForAccount
@Policy(operationTypes=READ) Optional<D> findByIdForAccount(String paymentId, String accountId, List<String> parentAccountIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Find aSavedPaymentMethod
given its id, account and its parent accounts This method is for B2B use cases where theSavedPaymentMethod.getOwningUserType()
isDefaultSavedPaymentMethodOwningUserTypes.BLC_ACCOUNT
.- Parameters:
paymentId
- The id of the saved payment methodaccountId
- The id of the entity's accountparentAccountIds
- A list of entity's parent account idscontextInfo
- the context info- Returns:
- A payment for the given payment id, account id, and parent accounts
-