Class PimcoreProxy

java.lang.Object
org.bhn.promotion.core.proxy.PimcoreProxy

@Component public class PimcoreProxy extends Object
Proxy class for interacting with the Pimcore API.

This class uses a WebClient to send HTTP requests to the Pimcore API

  • Constructor Details

    • PimcoreProxy

      public PimcoreProxy()
  • Method Details

    • importPromotions

      public reactor.core.publisher.Mono<String> importPromotions(PimcorePromotionModel model, String url)
      Imports a PimcorePromotionModel into the Pimcore system.
      Parameters:
      model - the PimcorePromotionModel to 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

      public String deletePromotions(PimcorePromotionModel model, String url)
      Deletes a PimcorePromotionModel from the Pimcore system.
      Parameters:
      model - the PimcorePromotionModel to 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.