private Map<String, String> convertRefund(RefundRequest request) {
        
        Map<String, String> params = new HashMap<String, String>();
        params.put("Action", "Refund");
        if (request.isSetTransactionId()) {
            params.put("TransactionId", request.getTransactionId());
        }
        if (request.isSetRefundAmount()) {
            Amount  refundAmount = request.getRefundAmount();
            if (refundAmount.isSetCurrencyCode()) {
                params.put("RefundAmount" + "." + "CurrencyCode", refundAmount.getCurrencyCode().value());
            }
            if (refundAmount.isSetValue()) {
                params.put("RefundAmount" + "." + "Value", refundAmount.getValue());
            }
        } 
        if (request.isSetCallerReference()) {
            params.put("CallerReference", request.getCallerReference());
        }
        if (request.isSetCallerDescription()) {
            params.put("CallerDescription", request.getCallerDescription());
        }
        if (request.isSetMarketplaceRefundPolicy()) {
            params.put("MarketplaceRefundPolicy", request.getMarketplaceRefundPolicy().value());
        }
        if (request.isSetOverrideIPNURL()) {
            params.put("OverrideIPNURL", request.getOverrideIPNURL());
        }

        return params;
    }