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 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 of SavedPaymentMethods for the given owner type, owner id and tenant id
      Parameters:
      owningUserType - The type of the saved payment's owning user
      owningUserId - The id of the entity that owns this saved payment method
      tenantId - The ID of the Tenant 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 of SavedPaymentMethods for the given account and its parent accounts
      Parameters:
      accountId - The id of the entity's account
      parentAccountIds - A list of entity's parent account ids
      filters - additional filters to apply in the query.
      page - the requested page of results from the database
      contextInfo - 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 a SavedPaymentMethod given its id, account and its parent accounts This method is for B2B use cases where the SavedPaymentMethod.getOwningUserType() is DefaultSavedPaymentMethodOwningUserTypes.BLC_ACCOUNT.
      Parameters:
      paymentId - The id of the saved payment method
      accountId - The id of the entity's account
      parentAccountIds - A list of entity's parent account ids
      contextInfo - the context info
      Returns:
      A payment for the given payment id, account id, and parent accounts