Skip to content

Commit

Permalink
Added source to reverse geo.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bryan Amundson committed Jun 26, 2023
1 parent 35781cc commit 066c1bc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class Address implements Serializable {
private String city;
private String stateAbbreviation;
private String zipCode;
private String source;

//endregion

Expand All @@ -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; }

}
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,27 @@ public class Lookup implements Serializable {

private double latitude;
private double longitude;
private String source;

private SmartyResponse response;

//endregion

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) {
Expand Down

0 comments on commit 066c1bc

Please sign in to comment.