Skip to content
This repository has been archived by the owner on Sep 26, 2020. It is now read-only.

Commit

Permalink
Merge pull request #42 from fullcontact/email-verification-custom-id
Browse files Browse the repository at this point in the history
EmailVerificationBatchRequest: allow user-specified batch ID
  • Loading branch information
ParisMi committed Mar 20, 2017
2 parents 0f69cc1 + 5d01d94 commit f8a9a7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -7,7 +7,7 @@
<groupId>com.fullcontact</groupId>
<artifactId>fullcontact4j</artifactId>
<name>FullContact Java Bindings</name>
<version>5.0.0</version>
<version>5.1.0</version>
<dependencies>

<dependency>
Expand Down
Expand Up @@ -22,6 +22,7 @@ protected void makeRequest(FullContactApi api, Callback<EmailVerificationAsyncRe
public static class Body {
private List<String> emails;
private String webhookUrl;
private String batchId;

public Body(List<String> emails, String webhookUrl) {
this.emails = emails;
Expand All @@ -40,6 +41,7 @@ public String getWebhookUrl() {
public static class Builder extends FCRequest.BaseBuilder<Builder, EmailVerificationBatchRequest> {
private List<String> emails;
private String webhookUrl;
private String batchId;

protected EmailVerificationBatchRequest createInstance() {
return new EmailVerificationBatchRequest(new Body(emails, webhookUrl));
Expand All @@ -55,6 +57,11 @@ public Builder webhookUrl(String webhookUrl) {
return this;
}

public Builder batchId(String batchId) {
this.batchId = batchId;
return this;
}

protected void validate() {
if(emails == null || emails.size() == 0) {
throw new IllegalArgumentException("request must include emails");
Expand Down

0 comments on commit f8a9a7f

Please sign in to comment.