Package org.bhn.promotion.core.proxy
Class PromotionServiceProxy
java.lang.Object
org.bhn.promotion.core.proxy.PromotionServiceProxy
Proxy class for interacting with the Promotion Service API.
This class provides methods to create, update, and manage promo budgets by making HTTP requests
to an external API using WebClient.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAndorProductsByUpcs(List<String> upcs, String source) Retrieves product details by a list of UPCs using a REST API call.getPromotionBudgetInfo(List<String> promoCodes, String source) getTenantById(String tenantId) Retrieves a tenant by its ID from the promotion service.getTenantByName(String tenantName) Retrieves a tenant by its ID from the promotion service.voidvoidsaveRollback(RollbackDTO rollbackDTO, String source) Saves aRollbackDTOobject by sending an HTTP POST request to the Promotion service.
-
Constructor Details
-
PromotionServiceProxy
public PromotionServiceProxy()
-
-
Method Details
-
saveOrder
-
saveRollback
Saves aRollbackDTOobject by sending an HTTP POST request to the Promotion service.- Parameters:
rollbackDTO- TheRollbackDTOobject containing the rollback data to be saved in OrderEntity.
-
getAndorProductsByUpcs
Retrieves product details by a list of UPCs using a REST API call.- Parameters:
upcs- the list of UPCs to retrieve product details for- Returns:
- AndorCommerceProductResponse containing the product details, or null if an error occurs
-
getTenantById
Retrieves a tenant by its ID from the promotion service.- Parameters:
tenantId- The ID of the tenant to retrieve.- Returns:
- TenantDTO containing the tenant details, or null if not found.
-
getPromotionBudgetInfo
-
getTenantByName
Retrieves a tenant by its ID from the promotion service.- Parameters:
tenantName- The ID of the tenant to retrieve.- Returns:
- TenantDTO containing the tenant details, or null if not found.
-