-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactoring: Address, AssignVehicle, DriversScheduleswithTerritoriesV… #22
base: master
Are you sure you want to change the base?
Conversation
…3, GetOrdersByCustomFields, OrdersManager, PickupDropoffJoint, RoutingManager, TelematicsGetVendorInfo, TelematicsManager
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r4m-cristianv Please check my comments
@@ -160,7 +160,7 @@ public static void main(String[] args) { | |||
optParameters.setAddresses(addresses); | |||
|
|||
try { | |||
DataObject responseObject = manager.runOptimization(optParameters); | |||
DataObject responseObject = manager.runOptimizationWithRedirect0(optParameters); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed we have this method:
public RoutingManager(String apiKey, boolean disableRedirects) {
super(apiKey, disableRedirects);
}
to disabled redirects
When that method is used we do this:
if (this.disableRedirects) {
builder.addParameter("redirect", "0");
client = HttpClients.custom().disableRedirectHandling().build();
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you are right, I missed this
@@ -22,8 +22,8 @@ public static void main(String[] args) { | |||
TelematicsManager manager = new TelematicsManager(apiKey); | |||
|
|||
try { | |||
TelematicsVendorsInfo vendor = manager.getTelematicsVendorInfo("3"); | |||
System.out.println(vendor.getVendor()); | |||
TelematicsVendorInfo vendor = manager.getTelematicsVendorInfo("3", "62f6197505da3f545c4fc9cb87ae76c9"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@r4m-cristianv Why you added this uuid key here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was getting unauthorized access error, that is why I added this api token, but now I double checked and the test passed without api token, so I removed it
@@ -65,6 +65,12 @@ public DataObject runOptimization(OptimizationParameters parameters) throws APIE | |||
URIBuilder builder = Manager.defaultBuilder(OPTIMIZATION_EP); | |||
return this.makeJSONRequest(RequestMethod.POST, builder, parameters, DataObject.class); | |||
} | |||
|
|||
public DataObject runOptimizationWithRedirect0(OptimizationParameters parameters) throws APIException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed @r4m-cristianv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed
…3, GetOrdersByCustomFields, OrdersManager, PickupDropoffJoint, RoutingManager, TelematicsGetVendorInfo, TelematicsManager