Skip to content

Commit

Permalink
Merge pull request #55 from smartystreets/landon/new-intl-fields
Browse files Browse the repository at this point in the history
Add new International fields
  • Loading branch information
RyanLCox1 authored Oct 18, 2024
2 parents 2873e79 + be8c440 commit 0fb5daf
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,51 @@ public class Components implements Serializable {
private String postBox;
private String postBoxType;
private String postBoxNumber;
private String additionalContent;
private String deliveryInstallation;
private String deliveryInstallationType;
private String deliveryInstallationQualifierName;
private String route;
private String routeNumber;
private String routeType;

//endregion

//region [ Getters ]
@JsonProperty("additional_content")
public String getAdditionalContent() {
return additionalContent;
}

@JsonProperty("delivery_installation")
public String getDeliveryInstallation() {
return deliveryInstallation;
}

@JsonProperty("delivery_installation_type")
public String getDeliveryInstallationType() {
return deliveryInstallationType;
}

@JsonProperty("delivery_installation_qualifier_name")
public String getDeliveryInstallationQualifierName() {
return deliveryInstallationQualifierName;
}

@JsonProperty("route")
public String getRoute() {
return route;
}

@JsonProperty("route_number")
public String getRouteNumber() {
return routeNumber;
}

@JsonProperty("route_type")
public String getRouteType() {
return routeType;
}

@JsonProperty("country_iso_3")
public String getCountryIso3() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package com.smartystreets.api.international_street;

import com.smartystreets.api.SmartySerializer;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;

import java.io.IOException;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;

import com.smartystreets.api.SmartySerializer;

public class CandidateTest {

Expand All @@ -31,7 +32,9 @@ public void testAllFieldsFilledCorrectly() throws IOException {
"\"building_trailing_type\":\"44\",\"sub_building_type\":\"45\",\"sub_building_number\":\"46\"," +
"\"sub_building_name\":\"47\",\"sub_building\":\"48\",\"level_type\":\"48.1\",\"level_number\":\"48.2\"," +
"\"post_box\":\"49\",\"post_box_type\":\"50\"," +
"\"post_box_number\":\"51\"},\"metadata\":{\"latitude\":52.0,\"longitude\":53.0," +
"\"post_box_number\":\"51\",\"additional_content\":\"112\",\"delivery_installation\":\"113\"," +
"\"delivery_installation_type\":\"114\",\"delivery_installation_qualifier_name\":\"115\",\"route\":\"116\"," +
"\"route_number\":\"117\",\"route_type\":\"118\"},\"metadata\":{\"latitude\":52.0,\"longitude\":53.0," +
"\"geocode_precision\":\"54\",\"max_geocode_precision\":\"55\",\"address_format\":\"56\"}," +
"\"analysis\":{\"verification_status\":\"57\",\"address_precision\":\"58\",\"max_address_precision\":\"59\"," +
"\"changes\":{\"organization\":\"60\",\"address1\":\"61\",\"address2\":\"62\",\"address3\":\"63\"," +
Expand Down Expand Up @@ -118,7 +121,13 @@ public void testAllFieldsFilledCorrectly() throws IOException {
assertEquals("48.2", components.getLevelNumber());
assertEquals("49", components.getPostBox());
assertEquals("50", components.getPostBoxType());
assertEquals("51", components.getPostBoxNumber());
assertEquals("112", components.getAdditionalContent());
assertEquals("113", components.getDeliveryInstallation());
assertEquals("114", components.getDeliveryInstallationType());
assertEquals("115", components.getDeliveryInstallationQualifierName());
assertEquals("116", components.getRoute());
assertEquals("117", components.getRouteNumber());
assertEquals("118", components.getRouteType());
//endregion

//region [ Metadata ]
Expand Down

0 comments on commit 0fb5daf

Please sign in to comment.