Class CardProductController
java.lang.Object
es.kukenan.smartfi.microservice.smartficore.controller.CardProductController
Controller to reply Credit Product endpoints definition.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringREST API base path.private CardServiceCard Product service.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context manager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Object>createCard(String userId) Create card product.org.springframework.http.ResponseEntity<CardProduct>enableDisableCardProduct(String cardProductId, boolean enableDisable) Enable/Disable card product.org.springframework.http.ResponseEntity<List<CardProduct>>getCardsProductsByUser(String userId) Retrieve cards products.
-
Field Details
-
API_PATH
REST API base path.- See Also:
-
cardService
Card Product service. -
contextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager contextManagerRequest 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.
-