Skip to content

Commit

Permalink
Merge branch 'smarty-key'
Browse files Browse the repository at this point in the history
  • Loading branch information
savannah-ryan committed Jul 6, 2023
2 parents b6291a9 + 9b83e0a commit de44388
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/com/smartystreets/api/us_street/Candidate.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public class Candidate implements Serializable {
private String deliveryLine2;
private String lastLine;
private String deliveryPointBarcode;
private String smartyKey;
private Components components;
private Metadata metadata;
private Analysis analysis;
Expand Down Expand Up @@ -92,5 +93,10 @@ public String getDeliveryPointBarcode() {
return this.deliveryPointBarcode;
}

@JsonProperty("smarty_key")
public String getSmartyKey() {
return this.smartyKey;
}

//endregion
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public void testFullJSONDeserialization() throws Exception {
+ "\"delivery_line_2\": \"blah blah\",\n"
+ "\"last_line\": \"Provo UT 84604-4405\",\n"
+ "\"delivery_point_barcode\": \"846044405140\",\n"
+ "\"smarty_key\": \"1750774478\",\n"
+ "\"components\": {\n"
+ "\"primary_number\": \"3214\",\n"
+ "\"street_predirection\": \"N\",\n"
Expand Down Expand Up @@ -88,6 +89,7 @@ public void testFullJSONDeserialization() throws Exception {
assertEquals("blah blah", candidates[0].getDeliveryLine2());
assertEquals("Provo UT 84604-4405", candidates[0].getLastLine());
assertEquals("846044405140", candidates[0].getDeliveryPointBarcode());
assertEquals("1750774478", candidates[0].getSmartyKey());
assertEquals("3214", candidates[0].getComponents().getPrimaryNumber());
assertEquals("N", candidates[0].getComponents().getStreetPredirection());
assertEquals("Q", candidates[0].getComponents().getStreetPostdirection());
Expand Down

0 comments on commit de44388

Please sign in to comment.