Skip to content

Commit

Permalink
Added more source code documentation to indicate that the maximum bat…
Browse files Browse the repository at this point in the history
…ch size is 100.
  • Loading branch information
MouaYing committed Jun 15, 2018
1 parent 326103e commit 5c49c7b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/smartystreets/api/us_street/Batch.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* This class contains a collection of lookups to be sent to the <br>
* SmartyStreets US Street API all at once. This is more efficient than sending them<br>
* one at a time.
* one at a time. Maximum batch size is 100.
*/
public class Batch {
public static final int MAX_BATCH_SIZE = 100;
Expand All @@ -23,7 +23,7 @@ public Batch() {
}

/**
*
* Adds a lookup to the batch, as long as there are less than 100 lookup in the batch already.
* @param newAddress
* @throws BatchFullException Batch size cannot exceed 100
*/
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartystreets/api/us_street/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public void send(Lookup lookup) throws SmartyException, IOException {
}

/**
*
* Sends a batch of up to 100 lookups for validation.
* @param batch Batch must contain between 1 and 100 Lookup objects
* @throws SmartyException
* @throws IOException
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/smartystreets/api/us_zipcode/Batch.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.Vector;

/**
* This class contains a collection of lookups to be sent to the SmartyStreets US ZIP Code API<br>
* This class contains a collection of up to 100 lookups to be sent to the SmartyStreets US ZIP Code API<br>
* all at once. This is more efficient than sending them one at a time.
*/
public class Batch {
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/smartystreets/api/us_zipcode/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ public void send(Lookup lookup) throws SmartyException, IOException {
send(batch);
}

/**
* Sends a batch of up to 100 lookups for validation.
* @param batch Batch must contain between 1 and 100 Lookup objects
* @throws SmartyException
* @throws IOException
*/
public void send(Batch batch) throws SmartyException, IOException {
Request request = new Request();

Expand Down

0 comments on commit 5c49c7b

Please sign in to comment.