diff --git a/src/main/java/com/smartystreets/api/us_reverse_geo/Address.java b/src/main/java/com/smartystreets/api/us_reverse_geo/Address.java index 6e8be06..368e9c4 100644 --- a/src/main/java/com/smartystreets/api/us_reverse_geo/Address.java +++ b/src/main/java/com/smartystreets/api/us_reverse_geo/Address.java @@ -11,6 +11,7 @@ public class Address implements Serializable { private String city; private String stateAbbreviation; private String zipCode; + private String source; //endregion @@ -24,4 +25,7 @@ public class Address implements Serializable { @JsonProperty("zipcode") public String getZipCode() { return this.zipCode; } + @JsonProperty("source") + public String getSource() { return this.source; } + } diff --git a/src/main/java/com/smartystreets/api/us_reverse_geo/Client.java b/src/main/java/com/smartystreets/api/us_reverse_geo/Client.java index cec1279..958c5c4 100644 --- a/src/main/java/com/smartystreets/api/us_reverse_geo/Client.java +++ b/src/main/java/com/smartystreets/api/us_reverse_geo/Client.java @@ -24,6 +24,7 @@ public void send(Lookup lookup) throws SmartyException, IOException, Interrupted DecimalFormat decimalFormat = new DecimalFormat("#.########"); request.putParameter("latitude", decimalFormat.format(lookup.getLatitude())); request.putParameter("longitude", decimalFormat.format(lookup.getLongitude())); + request.putParameter("source", getSource(); Response httpResponse = this.sender.send(request); diff --git a/src/main/java/com/smartystreets/api/us_reverse_geo/Lookup.java b/src/main/java/com/smartystreets/api/us_reverse_geo/Lookup.java index ff43586..fb6706a 100644 --- a/src/main/java/com/smartystreets/api/us_reverse_geo/Lookup.java +++ b/src/main/java/com/smartystreets/api/us_reverse_geo/Lookup.java @@ -8,6 +8,7 @@ public class Lookup implements Serializable { private double latitude; private double longitude; + private String source; private SmartyResponse response; @@ -15,16 +16,19 @@ public class Lookup implements Serializable { public Lookup() { this.response = new SmartyResponse(); } - public Lookup(double latitude, double longitude) { + public Lookup(double latitude, double longitude, String source) { this(); this.latitude = latitude; this.longitude = longitude; + this.source = source; } public Double getLatitude() { return this.latitude; } public Double getLongitude() { return this.longitude; } + public String getSource() { return this.source; } + public SmartyResponse getResponse() { return this.response; } public void setResponse(SmartyResponse response) {