Skip to content

Commit 9b83e0a

Browse files
committed
Began adding smarty-key; smarty-key testing
1 parent 35781cc commit 9b83e0a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/com/smartystreets/api/us_street/Candidate.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public class Candidate implements Serializable {
2222
private String deliveryLine2;
2323
private String lastLine;
2424
private String deliveryPointBarcode;
25+
private String smartyKey;
2526
private Components components;
2627
private Metadata metadata;
2728
private Analysis analysis;
@@ -92,5 +93,10 @@ public String getDeliveryPointBarcode() {
9293
return this.deliveryPointBarcode;
9394
}
9495

96+
@JsonProperty("smarty_key")
97+
public String getSmartyKey() {
98+
return this.smartyKey;
99+
}
100+
95101
//endregion
96102
}

src/test/java/com/smartystreets/api/us_street/CandidateTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public void testFullJSONDeserialization() throws Exception {
2121
+ "\"delivery_line_2\": \"blah blah\",\n"
2222
+ "\"last_line\": \"Provo UT 84604-4405\",\n"
2323
+ "\"delivery_point_barcode\": \"846044405140\",\n"
24+
+ "\"smarty_key\": \"1750774478\",\n"
2425
+ "\"components\": {\n"
2526
+ "\"primary_number\": \"3214\",\n"
2627
+ "\"street_predirection\": \"N\",\n"
@@ -88,6 +89,7 @@ public void testFullJSONDeserialization() throws Exception {
8889
assertEquals("blah blah", candidates[0].getDeliveryLine2());
8990
assertEquals("Provo UT 84604-4405", candidates[0].getLastLine());
9091
assertEquals("846044405140", candidates[0].getDeliveryPointBarcode());
92+
assertEquals("1750774478", candidates[0].getSmartyKey());
9193
assertEquals("3214", candidates[0].getComponents().getPrimaryNumber());
9294
assertEquals("N", candidates[0].getComponents().getStreetPredirection());
9395
assertEquals("Q", candidates[0].getComponents().getStreetPostdirection());

0 commit comments

Comments
 (0)