Skip to content
This repository was archived by the owner on Oct 17, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/main/java/com/hellosign/sdk/HelloSignClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public class HelloSignClient {

public static final String PARAM_FILE_TYPE_URI = "file_type";
public static final String PARAM_GET_URL = "get_url";
public static final String PARAM_QUERY = "query";
public static final String FINAL_COPY_FILE_NAME = "final-copy";
public static final String FINAL_COPY_FILE_EXT = "pdf";
public static final String FILES_FILE_NAME = "files";
Expand Down Expand Up @@ -461,6 +462,26 @@ public SignatureRequestList getSignatureRequests(int page, int pageSize)
.get(BASE_URI + SIGNATURE_REQUEST_LIST_URI).asJson());
}

/**
* Retrieves a specific page of the current user's signature requests.
*
* @param page int
* @param pageSize int Must be between 1 and 100.
* @param query String that includes search terms and/or fields to be used to filter the SignatureRequest objects.
* @return SignatureRequestList
* @throws HelloSignException thrown if there's a problem processing the HTTP request or the
* JSON response.
*/
public SignatureRequestList getSignatureRequests(int page, int pageSize, String query)
throws HelloSignException {
return new SignatureRequestList(
httpClient.withAuth(auth)
.withGetParam(AbstractResourceList.PAGE, Integer.toString(page))
.withGetParam(AbstractResourceList.PAGE_SIZE, Integer.toString(pageSize))
.withGetParam(PARAM_QUERY, query)
.get(BASE_URI + SIGNATURE_REQUEST_LIST_URI).asJson());
}

/**
* Sends the provided signature request to HelloSign.
*
Expand Down