diff --git a/src/main/java/io/ljunggren/ups/api/UpsProperties.java b/src/main/java/io/ljunggren/ups/api/UpsProperties.java index 2ab216f..c26da31 100644 --- a/src/main/java/io/ljunggren/ups/api/UpsProperties.java +++ b/src/main/java/io/ljunggren/ups/api/UpsProperties.java @@ -10,8 +10,6 @@ private static Properties properties = new Properties(); - private static final String API_TRACKING_URL = "api.tracking.url"; - public UpsProperties(UpsEnvironment environment) { Map fileMap = generateFileMap(); setProperties(fileMap.get(environment)); @@ -34,8 +32,8 @@ } } - public String getTrackingUrl() { - return properties.getProperty(API_TRACKING_URL); + public String getDomain() { + return properties.getProperty("domain"); } } diff --git a/src/main/resources/properties/cie/ups.properties b/src/main/resources/properties/cie/ups.properties index 2f9a7a2..a258ace 100644 --- a/src/main/resources/properties/cie/ups.properties +++ b/src/main/resources/properties/cie/ups.properties @@ -1 +1 @@ -api.tracking.url=https://wwwcie.ups.com/track/v1/details/{inquiryNumber} +domain=https://wwwcie.ups.com diff --git a/src/main/resources/properties/production/ups.properties b/src/main/resources/properties/production/ups.properties index 5b9d460..96cc0ce 100644 --- a/src/main/resources/properties/production/ups.properties +++ b/src/main/resources/properties/production/ups.properties @@ -1 +1 @@ -api.tracking.url=https://onlinetools.ups.com/track/v1/details/{inquiryNumber} +domain=https://onlinetools.ups.com diff --git a/src/test/java/io/ljunggren/ups/api/UpsPropertiesTest.java b/src/test/java/io/ljunggren/ups/api/UpsPropertiesTest.java index 05afc25..54218be 100644 --- a/src/test/java/io/ljunggren/ups/api/UpsPropertiesTest.java +++ b/src/test/java/io/ljunggren/ups/api/UpsPropertiesTest.java @@ -9,14 +9,14 @@ @Test public void getTrackingUrlCieTest() { UpsProperties properties = new UpsProperties(UpsEnvironment.CIE); - String url = properties.getTrackingUrl(); + String url = properties.getDomain(); assertNotNull(url); } @Test public void getTrackingUrlProductionTest() { UpsProperties properties = new UpsProperties(UpsEnvironment.PRODUCTION); - String url = properties.getTrackingUrl(); + String url = properties.getDomain(); assertNotNull(url); }