Class AbstractUnimplementedApiClient

java.lang.Object
es.kukenan.smartfi.microservice.contracts.service.backoffice.api.AbstractUnimplementedApiClient
Direct Known Subclasses:
AbstractCoreApiClient

public abstract class AbstractUnimplementedApiClient extends Object
Base class for any API Client.
  • Field Details

    • subsystem

      protected final String subsystem
      Subsystem handled by this API client.
  • Constructor Details

    • AbstractUnimplementedApiClient

      public AbstractUnimplementedApiClient(String subsystem)
      Full state constructor.
      Parameters:
      subsystem - subsystem handled by this API client.
  • Method Details

    • findAllProducts

      public List<ProductDomain> findAllProducts(ProductsSearchRequest searchRequest)
      Find all the products in this API owner by the given user. This function will throw a UnexpectedException if something fails and haltOnErrors flag is set to true.
      Parameters:
      searchRequest - products search request, contains all the required information to search the users and holds other search context information.
      Returns:
      products response.
    • findAllProducts

      public List<ProductDomain> findAllProducts(UserBackoffice userBackoffice, String userToken)
      Find all the products in this API owner by the given user and company. This function will throw a UnexpectedException if something fails and haltOnErrors flag is set to true.
      Parameters:
      userBackoffice - user.
      userToken - user bearer.
      Returns:
      products response.
    • findAllProductsAsync

      @Async public Future<List<ProductDomain>> findAllProductsAsync(ProductsSearchRequest searchRequest)
      Find all the products in this API owner by the given user.
      Parameters:
      searchRequest - products search request.
      Returns:
      products response.
    • findAllProductsAsync

      @Async public Future<List<ProductDomain>> findAllProductsAsync(UserBackoffice userBackoffice, String userToken)
      Find all the products in this API owner by the given user.
      Parameters:
      userBackoffice - user.
      userToken - user bearer.
      Returns:
      products response.
    • findProduct

      public ProductDetailDomain<? extends es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProduct(ProductSearchRequest searchRequest, String userToken)
      Find the given product if owned by the given user.
      Parameters:
      searchRequest - the required data to find a product and build a full ProductDetailDomain.
      userToken - user bearer.
      Returns:
      product identifier.
    • createWalletProduct

      public List<ProductDomain> createWalletProduct(String userId, String userToken)
      Find the given product if owned by the given user.
      Parameters:
      userId - user identifier.
      userToken - user bearer.
      Returns:
      product identifier.
    • createCardProduct

      public List<ProductDomain> createCardProduct(String userId, String userToken)
      Find the given product if owned by the given user.
      Parameters:
      userId - user identifier.
      userToken - user bearer.
      Returns:
      product identifier.
    • findProductPosition

      public ProductDetailDomain<? extends es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProductPosition(ProductSearchRequest searchRequest, String userToken)
      Find the given product position if owned by the given user.
      Parameters:
      searchRequest - the required data to find a product and build a full ProductDetailDomain.
      userToken - userToken.
      Returns:
      product position identifier.
    • findAllMovements

      public MovementDomain findAllMovements(ProductSearchRequest productSearchRequest, String userToken, String dateFrom, String dateTo, String type, String paginationKey, String number, String state, String reason, Boolean allMovements)
      Find all the movements in this API owner by the given user. This function will throw a UnexpectedException if something fails and haltOnErrors flag is set to true.
      Parameters:
      productSearchRequest - search context.
      userToken - user bearer.
      dateFrom - params searching.
      dateTo - params searching.
      type - params searching.
      paginationKey - params searching.
      number - imposition number.
      state - imposition state.
      reason - reason.
      allMovements - all movements.
      Returns:
      movements response.
    • findAllWithheldMovements

      public List<es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto> findAllWithheldMovements(ProductSearchRequest productSearchRequest, String userToken)
      Finds all withheld movements.
      Parameters:
      productSearchRequest - request data.
      userToken - userToken.
      Returns:
      a list of withheld movements.
    • findAllDepositImpositions

      public ImpositionDomain findAllDepositImpositions(ProductSearchRequest productSearchRequest, String userToken)
      Finds all withheld movements.
      Parameters:
      productSearchRequest - request data.
      userToken - userToken.
      Returns:
      a list of withheld movements.
    • findMovement

      public es.kukenan.smartfi.microservice.contracts.api.movement.MovementDto findMovement(Product product, String movementId, String userToken)
      Find an specific imposition movement in this API owner by the given user. This function will throw a UnexpectedException if something fails and haltOnErrors flag is set to true.
      Parameters:
      product - the (registered) product.
      movementId - movement identifier.
      userToken - user bearer.
      Returns:
      imposition movements response.
    • findRepayments

      public es.kukenan.smartfi.microservice.contracts.api.repayment.LoanRepaymentsResponseDto findRepayments(ProductSearchRequest searchRequest, String userToken, String dateFrom, String dateTo)
      Find the repayments of an specific product owner by the given user. This function will throw a UnexpectedException if something fails and haltOnErrors flag is set to true.
      Parameters:
      searchRequest - the required data to find a product.
      userToken - userToken.
      dateFrom - dateFrom.
      dateTo - dateTo.
      Returns:
      the products repayments response.
    • findReceipts

      public ReceiptsDomain findReceipts(ProductSearchRequest searchRequest, String paginationKey, String token)
      Find the receipts of an specific product owner by the given user. This function will throw a UnexpectedException if something fails and haltOnErrors flag is set to true.
      Parameters:
      searchRequest - the required data to find a product.
      paginationKey - pagination Key.
      token - token.
      Returns:
      the products receipts response.
    • findProductAssets

      public List<es.kukenan.smartfi.microservice.contracts.api.assets.AssetDto> findProductAssets(ProductSearchRequest searchRequest)
      Find the assets of an specific product owner by the given user.
      Parameters:
      searchRequest - the required data to find a product.
      Returns:
      the products assets response.
    • findProductAssetDetail

      public es.kukenan.smartfi.microservice.contracts.api.assets.AssetDto findProductAssetDetail(ProductSearchRequest searchRequest, String assetId)
      Find a the given asset of the given product.
      Parameters:
      searchRequest - the (registered) product.
      assetId - the asset identifier..
      Returns:
      the user product assets detail.
    • findProductAssetMovements

      public MovementDomain findProductAssetMovements(ProductSearchRequest searchRequest, String assetId, String dateFrom, String dateTo, String paginationKey)
      Find the movements of the given asset in the given product.
      Parameters:
      searchRequest - the (registered) product.
      assetId - the asset identifier.
      dateFrom - params searching.
      dateTo - params searching.
      paginationKey - pagination key used to request next result page.
      Returns:
      the user product asset movements.
    • findProductComposition

      public List<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findProductComposition(ProductSearchRequest searchRequest, String userToken)
      Extract the given user product composition from the given (registered) product (must be supported, see wants method).
      Parameters:
      searchRequest - the required data to find a product.
      userToken - user bearer token.
      Returns:
      the user product composition extracted from the backoffice.
    • findCashFlow

      public List<es.kukenan.smartfi.microservice.contracts.api.cashflow.CashFlowDto> findCashFlow(UserBackoffice userBackoffice)
      Find cash flow.
      Parameters:
      userBackoffice - user backoffice
      Returns:
      cash flow list
    • findPinCard

      public es.kukenan.smartfi.microservice.contracts.api.card.PinDto findPinCard(UserBackoffice userBackoffice)
      Find pin of the given product.
      Parameters:
      userBackoffice - user backoffice
      Returns:
      pin
    • findCvvCard

      public es.kukenan.smartfi.microservice.contracts.api.card.CvvDto findCvvCard(UserBackoffice userBackoffice)
      Find cvv of the given product.
      Parameters:
      userBackoffice - user backoffice
      Returns:
      cvv