// Path: src/main/java/com/cardinity/Cardinity.java
// public abstract class Cardinity {
// 
//     public static final String API_BASE = "https://api.cardinity.com";
//     public static final String API_VERSION = "v1";
//     public static final String VERSION = "0.1";
//     public static final String ENCODING_CHARSET = "UTF-8";
// 
// }
// 
// Path: src/main/java/com/cardinity/rest/RestResource.java
// public enum Resource {
//     PAYMENTS, REFUNDS, SETTLEMENTS, VOIDS, CHARGEBACKS
// }


import com.cardinity.Cardinity;
import com.cardinity.rest.RestResource.Resource;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.UUID;
package com.cardinity.rest;



public final class URLUtils {

    private final static String URL_SEPARATOR = "/";

    private URLUtils() {

    }

    public static String buildUrl() {
        return buildCardinityUrl(null, null, null);
    }

    public static String buildUrl(UUID paymentId) {
        return buildCardinityUrl(paymentId, null, null);
    }

    public static String buildUrl(UUID paymentId, Resource resource) {
        return buildCardinityUrl(paymentId, resource, null);
    }

    public static String buildUrl(UUID paymentId, Resource resource, UUID actionID) {
        return buildCardinityUrl(paymentId, resource, actionID);
    }

    private static String buildCardinityUrl(UUID paymentId, Resource action, UUID actionId) {

// Path: src/main/java/com/cardinity/Cardinity.java
// public abstract class Cardinity {
// 
//     public static final String API_BASE = "https://api.cardinity.com";
//     public static final String API_VERSION = "v1";
//     public static final String VERSION = "0.1";
//     public static final String ENCODING_CHARSET = "UTF-8";
// 
// }
// 
// Path: src/main/java/com/cardinity/rest/RestResource.java
// public enum Resource {
//     PAYMENTS, REFUNDS, SETTLEMENTS, VOIDS, CHARGEBACKS
// }


// Path: src/main/java/com/cardinity/rest/URLUtils.java
import com.cardinity.Cardinity;
import com.cardinity.rest.RestResource.Resource;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.UUID;

package com.cardinity.rest;



public final class URLUtils {

    private final static String URL_SEPARATOR = "/";

    private URLUtils() {

    }

    public static String buildUrl() {
        return buildCardinityUrl(null, null, null);
    }

    public static String buildUrl(UUID paymentId) {
        return buildCardinityUrl(paymentId, null, null);
    }

    public static String buildUrl(UUID paymentId, Resource resource) {
        return buildCardinityUrl(paymentId, resource, null);
    }

    public static String buildUrl(UUID paymentId, Resource resource, UUID actionID) {
        return buildCardinityUrl(paymentId, resource, actionID);
    }

    private static String buildCardinityUrl(UUID paymentId, Resource action, UUID actionId) {

        StringBuilder url = new StringBuilder(Cardinity.API_BASE).append(URL_SEPARATOR).append(Cardinity.API_VERSION)