コード例 #1
0
 private static String buildURLByCode(Credentials credentials, String transactionCode) {
   return URL_SERVICE
       + "/"
       + transactionCode
       + "?"
       + UrlUtil.buildQueryString(credentials.getAttributes());
 }
コード例 #2
0
  private static String buildURLByDateInterval(
      Credentials credentials,
      String serviceURL,
      Date initialDate,
      Date finalDate,
      Integer page,
      Integer maxPageResults) {

    SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT);

    StringBuffer url = new StringBuffer();
    url.append(serviceURL);
    url.append("?initialDate=" + (initialDate != null ? sdf.format(initialDate) : ""));
    url.append("&finalDate=" + (finalDate != null ? sdf.format(finalDate) : ""));
    if (page != null) {
      url.append("&page=" + page);
    }
    if (maxPageResults != null) {
      url.append("&maxPageResults=" + maxPageResults);
    }
    url.append("&" + UrlUtil.buildQueryString(credentials.getAttributes()));

    return url.toString();
  }
コード例 #3
0
ファイル: PaymentService.java プロジェクト: tibagni/Delivery
 private static String buildUrl(Credentials credentials, PaymentRequest payment) {
   return URL_SERVICE + "?" + UrlUtil.buildQueryString(credentials.getAttributes());
 }