Skip to content

Commit

Permalink
Merge pull request #60 from goshippo/estimated_days
Browse files Browse the repository at this point in the history
Update Rate.java to include estimated_days
  • Loading branch information
jfriedr authored May 4, 2021
2 parents 085e9f1 + 416ae00 commit b00fb21
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main/java/com/shippo/model/Rate.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.shippo.exception.AuthenticationException;
import com.shippo.exception.InvalidRequestException;
import com.shippo.net.APIResource;
import com.shippo.Shippo;

public class Rate extends APIResource {
String objectId;
Expand All @@ -23,6 +24,7 @@ public class Rate extends APIResource {
Object provider_image_200;
Object servicelevel;
Object days;
Object estimated_days;
Object durationTerms;
Object messages;

Expand Down Expand Up @@ -139,9 +141,13 @@ public Object getServicelevel() {
public void setServicelevel(Object servicelevel) {
this.servicelevel = servicelevel;
}

public Object getDays() {
return days;
if ( Shippo.apiVersion.compareTo("2017-08-01") < 0) {
return days;
} else {
return estimated_days;
}
}

public void setDays(Object days) {
Expand Down

0 comments on commit b00fb21

Please sign in to comment.