Skip to content

Commit 0fb5daf

Browse files
authored
Merge pull request #55 from smartystreets/landon/new-intl-fields
Add new International fields
2 parents 2873e79 + be8c440 commit 0fb5daf

File tree

2 files changed

+56
-6
lines changed

2 files changed

+56
-6
lines changed

src/main/java/com/smartystreets/api/international_street/Components.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,51 @@ public class Components implements Serializable {
5353
private String postBox;
5454
private String postBoxType;
5555
private String postBoxNumber;
56+
private String additionalContent;
57+
private String deliveryInstallation;
58+
private String deliveryInstallationType;
59+
private String deliveryInstallationQualifierName;
60+
private String route;
61+
private String routeNumber;
62+
private String routeType;
5663

5764
//endregion
5865

5966
//region [ Getters ]
67+
@JsonProperty("additional_content")
68+
public String getAdditionalContent() {
69+
return additionalContent;
70+
}
71+
72+
@JsonProperty("delivery_installation")
73+
public String getDeliveryInstallation() {
74+
return deliveryInstallation;
75+
}
76+
77+
@JsonProperty("delivery_installation_type")
78+
public String getDeliveryInstallationType() {
79+
return deliveryInstallationType;
80+
}
81+
82+
@JsonProperty("delivery_installation_qualifier_name")
83+
public String getDeliveryInstallationQualifierName() {
84+
return deliveryInstallationQualifierName;
85+
}
86+
87+
@JsonProperty("route")
88+
public String getRoute() {
89+
return route;
90+
}
91+
92+
@JsonProperty("route_number")
93+
public String getRouteNumber() {
94+
return routeNumber;
95+
}
96+
97+
@JsonProperty("route_type")
98+
public String getRouteType() {
99+
return routeType;
100+
}
60101

61102
@JsonProperty("country_iso_3")
62103
public String getCountryIso3() {

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

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
package com.smartystreets.api.international_street;
22

3-
import com.smartystreets.api.SmartySerializer;
4-
import org.junit.Test;
3+
import static org.junit.Assert.assertEquals;
4+
import static org.junit.Assert.assertNotNull;
55

66
import java.io.IOException;
77

8-
import static org.junit.Assert.assertEquals;
9-
import static org.junit.Assert.assertNotNull;
8+
import org.junit.Test;
9+
10+
import com.smartystreets.api.SmartySerializer;
1011

1112
public class CandidateTest {
1213

@@ -31,7 +32,9 @@ public void testAllFieldsFilledCorrectly() throws IOException {
3132
"\"building_trailing_type\":\"44\",\"sub_building_type\":\"45\",\"sub_building_number\":\"46\"," +
3233
"\"sub_building_name\":\"47\",\"sub_building\":\"48\",\"level_type\":\"48.1\",\"level_number\":\"48.2\"," +
3334
"\"post_box\":\"49\",\"post_box_type\":\"50\"," +
34-
"\"post_box_number\":\"51\"},\"metadata\":{\"latitude\":52.0,\"longitude\":53.0," +
35+
"\"post_box_number\":\"51\",\"additional_content\":\"112\",\"delivery_installation\":\"113\"," +
36+
"\"delivery_installation_type\":\"114\",\"delivery_installation_qualifier_name\":\"115\",\"route\":\"116\"," +
37+
"\"route_number\":\"117\",\"route_type\":\"118\"},\"metadata\":{\"latitude\":52.0,\"longitude\":53.0," +
3538
"\"geocode_precision\":\"54\",\"max_geocode_precision\":\"55\",\"address_format\":\"56\"}," +
3639
"\"analysis\":{\"verification_status\":\"57\",\"address_precision\":\"58\",\"max_address_precision\":\"59\"," +
3740
"\"changes\":{\"organization\":\"60\",\"address1\":\"61\",\"address2\":\"62\",\"address3\":\"63\"," +
@@ -118,7 +121,13 @@ public void testAllFieldsFilledCorrectly() throws IOException {
118121
assertEquals("48.2", components.getLevelNumber());
119122
assertEquals("49", components.getPostBox());
120123
assertEquals("50", components.getPostBoxType());
121-
assertEquals("51", components.getPostBoxNumber());
124+
assertEquals("112", components.getAdditionalContent());
125+
assertEquals("113", components.getDeliveryInstallation());
126+
assertEquals("114", components.getDeliveryInstallationType());
127+
assertEquals("115", components.getDeliveryInstallationQualifierName());
128+
assertEquals("116", components.getRoute());
129+
assertEquals("117", components.getRouteNumber());
130+
assertEquals("118", components.getRouteType());
122131
//endregion
123132

124133
//region [ Metadata ]

0 commit comments

Comments
 (0)