All Downloads are FREE. Search and download functionalities are using the official Maven repository.

co.easimart.EasimartRESTConfigCommand Maven / Gradle / Ivy

package co.easimart;

import co.easimart.http.EasimartHttpRequest;

import java.util.HashMap;
import java.util.Map;

/** package */ class EasimartRESTConfigCommand extends EasimartRESTCommand {

  public EasimartRESTConfigCommand(
          String httpPath,
          EasimartHttpRequest.Method httpMethod,
          Map parameters,
          String sessionToken) {
    super(httpPath, httpMethod, parameters, sessionToken);
  }

  public static EasimartRESTConfigCommand fetchConfigCommand(String sessionToken) {
    return new EasimartRESTConfigCommand("config", EasimartHttpRequest.Method.GET, null, sessionToken);
  }

  public static EasimartRESTConfigCommand updateConfigCommand(
      final Map configParameters, String sessionToken) {
    Map> commandParameters = null;
    if (configParameters != null) {
      commandParameters = new HashMap<>();
      commandParameters.put("params", configParameters);
    }
    return new EasimartRESTConfigCommand(
        "config", EasimartHttpRequest.Method.PUT, commandParameters, sessionToken);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy