// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/ServiceName.java
// public final class ServiceName {
// 
//     private static final Pattern PATH_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-]+");
// 
//     public static final ServiceName ACCOUNTING = new ServiceName("accounting-service");
//     public static final ServiceName CONTACT = new ServiceName("contact-service");
//     public static final ServiceName INTEGRATION = new ServiceName("integration-service");
//     public static final ServiceName ORDER = new ServiceName("order-service");
//     public static final ServiceName PRODUCT = new ServiceName("product-service");
//     public static final ServiceName WAREHOUSE = new ServiceName("warehouse-service");
// 
//     private final String path;
// 
//     /**
//      * Constructs a custom service name instance, using the path, for example &quot;product-service&quot;.
//      * @param path path component for the service.
//      */
//     public ServiceName(String path) {
//         validatePath(path);
//         this.path = path;
//     }
// 
//     /**
//      * Returns the URI component for the service, for example &quot;product-service&quot;.
//      * @return path component for the service.
//      */
//     public String getPath() {
//         return path;
//     }
// 
//     private void validatePath(String path) {
//         if (path == null || path.trim().length() == 0) {
//             throw new IllegalArgumentException("Service path must be provided");
//         } else if (!PATH_PATTERN.matcher(path).matches()) {
//             throw new IllegalArgumentException("Service must contain alphanumeric characters, hyphen and underscore only");
//         }
//     }
// 
//     @Override
//     public String toString() {
//         return "ServiceName{" +
//                 "path='" + path + '\'' +
//                 '}';
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         ServiceName that = (ServiceName) o;
//         if (path != null ? !path.equals(that.path) : that.path != null) return false;
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         return path != null ? path.hashCode() : 0;
//     }
// }
// 
// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/http/Method.java
// public enum Method {
// 
//     GET,
//     POST,
//     PUT,
//     DELETE,
//     OPTIONS
// 
// }
// 
// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/util/StringUtils.java
// public final class StringUtils {
// 
//     private StringUtils() { }
// 
//     public static boolean isEmpty(String string) {
//         return string == null || string.length() == 0;
//     }
// 
//     public static boolean isNotEmpty(String string) {
//         return !isEmpty(string);
//     }
// 
//     public static boolean isBlank(String string) {
//         return string == null || string.trim().length() == 0;
//     }
// 
//     public static boolean isNotBlank(String string) {
//         return !isBlank(string);
//     }
// 
//     public static boolean equals(String lhs, String rhs) {
//         if ((lhs == null) != (rhs == null)) {
//             return false;
//         } else if (lhs == null && rhs == null) {
//             return true;
//         } else {
//             return lhs.equals(rhs);
//         }
//     }
// 
//     public static String join(Collection<String> strings, String separator) {
//         StringBuilder builder = new StringBuilder();
//         for (String string : strings) {
//             if (builder.length() > 0) {
//                 builder.append(separator);
//             }
//             builder.append(string);
//         }
//         return builder.toString();
//     }
// 
// }


import uk.co.visalia.brightpearl.apiclient.ServiceName;
import uk.co.visalia.brightpearl.apiclient.http.Method;
import uk.co.visalia.brightpearl.apiclient.util.StringUtils;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
     */
    public B withAddedParams(Map<String, String> params) {
        if (params == null) {
            throw new IllegalArgumentException("Cannot add null params");
        }
        for (Map.Entry<String, String> param : params.entrySet()) {
            withAddedParam(param.getKey(), param.getValue());
        }
        return getThis();
    }

    /**
     * Add querystring parameters to the request, replacing any previously set.
     * @param params map of querystring params.
     * @return builder instance for method chaining.
     */
    public B withParams(Map<String, String> params) {
        this.params = new HashMap<String, String>();
        withAddedParams(params);
        return getThis();
    }

    protected String getRuid() {
        return ruid;
    }

    protected ServiceName getService() {
        return service;
    }

// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/ServiceName.java
// public final class ServiceName {
// 
//     private static final Pattern PATH_PATTERN = Pattern.compile("[a-zA-Z0-9_\\-]+");
// 
//     public static final ServiceName ACCOUNTING = new ServiceName("accounting-service");
//     public static final ServiceName CONTACT = new ServiceName("contact-service");
//     public static final ServiceName INTEGRATION = new ServiceName("integration-service");
//     public static final ServiceName ORDER = new ServiceName("order-service");
//     public static final ServiceName PRODUCT = new ServiceName("product-service");
//     public static final ServiceName WAREHOUSE = new ServiceName("warehouse-service");
// 
//     private final String path;
// 
//     /**
//      * Constructs a custom service name instance, using the path, for example &quot;product-service&quot;.
//      * @param path path component for the service.
//      */
//     public ServiceName(String path) {
//         validatePath(path);
//         this.path = path;
//     }
// 
//     /**
//      * Returns the URI component for the service, for example &quot;product-service&quot;.
//      * @return path component for the service.
//      */
//     public String getPath() {
//         return path;
//     }
// 
//     private void validatePath(String path) {
//         if (path == null || path.trim().length() == 0) {
//             throw new IllegalArgumentException("Service path must be provided");
//         } else if (!PATH_PATTERN.matcher(path).matches()) {
//             throw new IllegalArgumentException("Service must contain alphanumeric characters, hyphen and underscore only");
//         }
//     }
// 
//     @Override
//     public String toString() {
//         return "ServiceName{" +
//                 "path='" + path + '\'' +
//                 '}';
//     }
// 
//     @Override
//     public boolean equals(Object o) {
//         if (this == o) return true;
//         if (o == null || getClass() != o.getClass()) return false;
//         ServiceName that = (ServiceName) o;
//         if (path != null ? !path.equals(that.path) : that.path != null) return false;
//         return true;
//     }
// 
//     @Override
//     public int hashCode() {
//         return path != null ? path.hashCode() : 0;
//     }
// }
// 
// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/http/Method.java
// public enum Method {
// 
//     GET,
//     POST,
//     PUT,
//     DELETE,
//     OPTIONS
// 
// }
// 
// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/util/StringUtils.java
// public final class StringUtils {
// 
//     private StringUtils() { }
// 
//     public static boolean isEmpty(String string) {
//         return string == null || string.length() == 0;
//     }
// 
//     public static boolean isNotEmpty(String string) {
//         return !isEmpty(string);
//     }
// 
//     public static boolean isBlank(String string) {
//         return string == null || string.trim().length() == 0;
//     }
// 
//     public static boolean isNotBlank(String string) {
//         return !isBlank(string);
//     }
// 
//     public static boolean equals(String lhs, String rhs) {
//         if ((lhs == null) != (rhs == null)) {
//             return false;
//         } else if (lhs == null && rhs == null) {
//             return true;
//         } else {
//             return lhs.equals(rhs);
//         }
//     }
// 
//     public static String join(Collection<String> strings, String separator) {
//         StringBuilder builder = new StringBuilder();
//         for (String string : strings) {
//             if (builder.length() > 0) {
//                 builder.append(separator);
//             }
//             builder.append(string);
//         }
//         return builder.toString();
//     }
// 
// }


// Path: src/main/java/uk/co/visalia/brightpearl/apiclient/request/AbstractServiceRequestBuilder.java
import uk.co.visalia.brightpearl.apiclient.ServiceName;
import uk.co.visalia.brightpearl.apiclient.http.Method;
import uk.co.visalia.brightpearl.apiclient.util.StringUtils;
import java.lang.reflect.Type;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

     */
    public B withAddedParams(Map<String, String> params) {
        if (params == null) {
            throw new IllegalArgumentException("Cannot add null params");
        }
        for (Map.Entry<String, String> param : params.entrySet()) {
            withAddedParam(param.getKey(), param.getValue());
        }
        return getThis();
    }

    /**
     * Add querystring parameters to the request, replacing any previously set.
     * @param params map of querystring params.
     * @return builder instance for method chaining.
     */
    public B withParams(Map<String, String> params) {
        this.params = new HashMap<String, String>();
        withAddedParams(params);
        return getThis();
    }

    protected String getRuid() {
        return ruid;
    }

    protected ServiceName getService() {
        return service;
    }

    protected Method getMethod() {