Class CardProductController

java.lang.Object
es.kukenan.smartfi.microservice.smartficore.controller.CardProductController

@RestController public class CardProductController extends Object
Controller to reply Credit Product endpoints definition.
  • Field Details

    • API_PATH

      public static final String API_PATH
      REST API base path.
      See Also:
    • cardService

      @Autowired private CardService cardService
      Card Product service.
    • contextManager

      @Autowired private es.kukenan.smartfi.common.context.RequestContextManager contextManager
      Request context manager.
  • Constructor Details

    • CardProductController

      public CardProductController()
  • Method Details

    • getCardsProductsByUser

      @GetMapping(value="/api/v1/actions/card-product/", produces="application/json") public org.springframework.http.ResponseEntity<List<CardProduct>> getCardsProductsByUser(@RequestHeader(name="X-USER-PROFILE-ID") String userId)
      Retrieve cards products.
      Parameters:
      userId - user id.
      Returns:
      the cards products.
    • createCard

      @PostMapping(value="/api/v1/actions/card-product/", produces="application/json") public org.springframework.http.ResponseEntity<Object> createCard(@RequestHeader(name="X-USER-PROFILE-ID") String userId)
      Create card product.
      Parameters:
      userId - User Id.
      Returns:
      the card product.
    • enableDisableCardProduct

      @PutMapping(value="/api/v1/actions/card-product/{cardProductId}", produces="application/json") public org.springframework.http.ResponseEntity<CardProduct> enableDisableCardProduct(@PathVariable String cardProductId, @RequestBody boolean enableDisable)
      Enable/Disable card product.
      Parameters:
      cardProductId - Product Id.
      enableDisable - boolean.
      Returns:
      the card product.