Package org.bhn.promotion.core.proxy
Class PimcoreProxy
java.lang.Object
org.bhn.promotion.core.proxy.PimcoreProxy
Proxy class for interacting with the Pimcore API.
This class uses a WebClient to send HTTP requests to the Pimcore API
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeletePromotions(PimcorePromotionModel model, String url) Deletes aPimcorePromotionModelfrom the Pimcore system.reactor.core.publisher.Mono<String>importPromotions(PimcorePromotionModel model, String url) Imports aPimcorePromotionModelinto the Pimcore system.
-
Constructor Details
-
PimcoreProxy
public PimcoreProxy()
-
-
Method Details
-
importPromotions
public reactor.core.publisher.Mono<String> importPromotions(PimcorePromotionModel model, String url) Imports aPimcorePromotionModelinto the Pimcore system.- Parameters:
model- thePimcorePromotionModelto be imported.url- the URL to which the import request should be sent.- Returns:
- a String representation of the response from the Pimcore API. Note that the actual return value may not represent the final outcome of the import operation, as this method uses a reactive approach and returns immediately after initiating the request.
-
deletePromotions
Deletes aPimcorePromotionModelfrom the Pimcore system.- Parameters:
model- thePimcorePromotionModelto be deleted.url- the URL to which the delete request should be sent.- Returns:
- a String representation of the response from the Pimcore API. Note that the actual return value may not represent the final outcome of the delete operation, as this method uses a reactive approach and returns immediately after initiating the request.
-