-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds secondary dataset to enrichment api.
- Loading branch information
Showing
10 changed files
with
481 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...java/com/smartystreets/api/us_enrichment/lookup_types/secondary/SecondaryCountLookup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.smartystreets.api.us_enrichment.lookup_types.secondary; | ||
|
||
import com.smartystreets.api.Serializer; | ||
import com.smartystreets.api.us_enrichment.lookup_types.Lookup; | ||
import com.smartystreets.api.us_enrichment.result_types.secondary.SecondaryCountResponse; | ||
|
||
import java.io.IOException; | ||
|
||
public class SecondaryCountLookup extends Lookup { | ||
|
||
private SecondaryCountResponse[] results; | ||
|
||
public SecondaryCountLookup(String smartyKey) { | ||
super(smartyKey, "secondary", "count"); | ||
} | ||
|
||
public SecondaryCountResponse[] getResults() { | ||
return results; | ||
} | ||
|
||
public void setResults(SecondaryCountResponse[] results) { | ||
this.results = results; | ||
} | ||
|
||
@Override | ||
public void deserializeAndSetResults(Serializer serializer, byte[] payload) throws IOException { | ||
this.results = serializer.deserialize(payload, SecondaryCountResponse[].class); | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...main/java/com/smartystreets/api/us_enrichment/lookup_types/secondary/SecondaryLookup.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package com.smartystreets.api.us_enrichment.lookup_types.secondary; | ||
|
||
import com.smartystreets.api.Serializer; | ||
import com.smartystreets.api.us_enrichment.lookup_types.Lookup; | ||
import com.smartystreets.api.us_enrichment.result_types.secondary.SecondaryResponse; | ||
|
||
import java.io.IOException; | ||
|
||
public class SecondaryLookup extends Lookup { | ||
|
||
private SecondaryResponse[] results; | ||
|
||
public SecondaryLookup(String smartyKey) { | ||
super(smartyKey, "secondary", ""); | ||
} | ||
|
||
public SecondaryResponse[] getResults() { | ||
return results; | ||
} | ||
|
||
public void setResults(SecondaryResponse[] results) { | ||
this.results = results; | ||
} | ||
|
||
@Override | ||
public void deserializeAndSetResults(Serializer serializer, byte[] payload) throws IOException { | ||
this.results = serializer.deserialize(payload, SecondaryResponse[].class); | ||
} | ||
} |
92 changes: 92 additions & 0 deletions
92
src/main/java/com/smartystreets/api/us_enrichment/result_types/secondary/Alias.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
package com.smartystreets.api.us_enrichment.result_types.secondary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class Alias { | ||
|
||
private String smartyKey; | ||
|
||
private String primaryNumber; | ||
|
||
private String streetPredirection; | ||
|
||
private String streetName; | ||
|
||
private String streetSuffix; | ||
|
||
private String streetPostdirection; | ||
|
||
private String cityName; | ||
|
||
private String stateAbbreviation; | ||
|
||
private String zipcode; | ||
|
||
private String plus4Code; | ||
|
||
@JsonProperty("smarty_key") | ||
public String getSmartyKey() { | ||
return smartyKey; | ||
} | ||
|
||
@JsonProperty("primary_number") | ||
public String getPrimaryNumber() { | ||
return primaryNumber; | ||
} | ||
|
||
@JsonProperty("street_predirection") | ||
public String getStreetPredirection() { | ||
return streetPredirection; | ||
} | ||
|
||
@JsonProperty("street_name") | ||
public String getStreetName() { | ||
return streetName; | ||
} | ||
|
||
@JsonProperty("street_suffix") | ||
public String getStreetSuffix() { | ||
return streetSuffix; | ||
} | ||
|
||
@JsonProperty("street_postdirection") | ||
public String getStreetPostdirection() { | ||
return streetPostdirection; | ||
} | ||
|
||
@JsonProperty("city_name") | ||
public String getCityName() { | ||
return cityName; | ||
} | ||
|
||
@JsonProperty("state_abbreviation") | ||
public String getStateAbbreviation() { | ||
return stateAbbreviation; | ||
} | ||
|
||
@JsonProperty("zipcode") | ||
public String getZipcode() { | ||
return zipcode; | ||
} | ||
|
||
@JsonProperty("plus4_code") | ||
public String getPlus4Code() { | ||
return plus4Code; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Alias{" + | ||
"smarty_key='" + getSmartyKey() + '\'' + | ||
", primary_number='" + getPrimaryNumber() + '\'' + | ||
", street_predirection='" + getStreetPredirection() + '\'' + | ||
", street_name='" + getStreetName() + '\'' + | ||
", street_suffix='" + getStreetSuffix() + '\'' + | ||
", street_postdirection='" + getStreetPostdirection() + '\'' + | ||
", city_name='" + getCityName() + '\'' + | ||
", state_abbreviation='" + getStateAbbreviation() + '\'' + | ||
", zipcode='" + getZipcode() + '\'' + | ||
", plus4_code='" + getPlus4Code() + '\'' + | ||
'}'; | ||
} | ||
} |
101 changes: 101 additions & 0 deletions
101
src/main/java/com/smartystreets/api/us_enrichment/result_types/secondary/RootAddress.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
package com.smartystreets.api.us_enrichment.result_types.secondary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class RootAddress { | ||
|
||
private int secondaryCount; | ||
|
||
private String smartyKey; | ||
|
||
private String primaryNumber; | ||
|
||
private String streetPredirection; | ||
|
||
private String streetName; | ||
|
||
private String streetSuffix; | ||
|
||
private String streetPostdirection; | ||
|
||
private String cityName; | ||
|
||
private String stateAbbreviation; | ||
|
||
private String zipcode; | ||
|
||
private String plus4Code; | ||
|
||
@JsonProperty("secondary_count") | ||
public int getSecondaryCount() { | ||
return secondaryCount; | ||
} | ||
|
||
@JsonProperty("smarty_key") | ||
public String getSmartyKey() { | ||
return smartyKey; | ||
} | ||
|
||
@JsonProperty("primary_number") | ||
public String getPrimaryNumber() { | ||
return primaryNumber; | ||
} | ||
|
||
@JsonProperty("street_predirection") | ||
public String getStreetPredirection() { | ||
return streetPredirection; | ||
} | ||
|
||
@JsonProperty("street_name") | ||
public String getStreetName() { | ||
return streetName; | ||
} | ||
|
||
@JsonProperty("street_suffix") | ||
public String getStreetSuffix() { | ||
return streetSuffix; | ||
} | ||
|
||
@JsonProperty("street_postdirection") | ||
public String getStreetPostdirection() { | ||
return streetPostdirection; | ||
} | ||
|
||
@JsonProperty("city_name") | ||
public String getCityName() { | ||
return cityName; | ||
} | ||
|
||
@JsonProperty("state_abbreviation") | ||
public String getStateAbbreviation() { | ||
return stateAbbreviation; | ||
} | ||
|
||
@JsonProperty("zipcode") | ||
public String getZipcode() { | ||
return zipcode; | ||
} | ||
|
||
@JsonProperty("plus4_code") | ||
public String getPlus4Code() { | ||
return plus4Code; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "RootAddress{" + | ||
"secondary_count=" + getSecondaryCount() + | ||
", smarty_key='" + getSmartyKey() + '\'' + | ||
", primary_number='" + getPrimaryNumber() + '\'' + | ||
", street_predirection='" + getStreetPredirection() + '\'' + | ||
", street_name='" + getStreetName() + '\'' + | ||
", street_suffix='" + getStreetSuffix() + '\'' + | ||
", street_postdirection='" + getStreetPostdirection() + '\'' + | ||
", city_name='" + getCityName() + '\'' + | ||
", state_abbreviation='" + getStateAbbreviation() + '\'' + | ||
", zipcode='" + getZipcode() + '\'' + | ||
", plus4_code='" + getPlus4Code() + '\'' + | ||
'}'; | ||
} | ||
} | ||
|
44 changes: 44 additions & 0 deletions
44
src/main/java/com/smartystreets/api/us_enrichment/result_types/secondary/Secondary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package com.smartystreets.api.us_enrichment.result_types.secondary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class Secondary { | ||
|
||
private String smartyKey; | ||
|
||
private String secondaryDesignator; | ||
|
||
private String secondaryNumber; | ||
|
||
private String plus4Code; | ||
|
||
@JsonProperty("smarty_key") | ||
public String getSmartyKey() { | ||
return smartyKey; | ||
} | ||
|
||
@JsonProperty("secondary_designator") | ||
public String getSecondaryDesignator() { | ||
return secondaryDesignator; | ||
} | ||
|
||
@JsonProperty("secondary_number") | ||
public String getSecondaryNumber() { | ||
return secondaryNumber; | ||
} | ||
|
||
@JsonProperty("plus4_code") | ||
public String getPlus4Code() { | ||
return plus4Code; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "Secondary{" + | ||
"smarty_key='" + getSmartyKey() + '\'' + | ||
", secondary_designator='" + getSecondaryDesignator() + '\'' + | ||
", secondary_number='" + getSecondaryNumber() + '\'' + | ||
", plus4_code='" + getPlus4Code() + '\'' + | ||
'}'; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...va/com/smartystreets/api/us_enrichment/result_types/secondary/SecondaryCountResponse.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package com.smartystreets.api.us_enrichment.result_types.secondary; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
||
public class SecondaryCountResponse { | ||
|
||
private String smartyKey; | ||
|
||
private int count; | ||
|
||
@JsonProperty("smarty_key") | ||
public String getSmartyKey() { | ||
return smartyKey; | ||
} | ||
|
||
@JsonProperty("count") | ||
public int getCount() { | ||
return count; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "SecondaryCountResponse{" + | ||
"smartyKey='" + smartyKey + '\'' + | ||
", count=" + count + | ||
'}'; | ||
} | ||
} |
Oops, something went wrong.