Java Library to download UPS Quantum View data like package manifest containing tracking information, etc.
- git clone https://github.com/jelqui/java-ups-manifest-xml.git
- cd java-ups-manifest-xml
- add libraries dependencies under src/com/partshighway/ups/xml/libs/*
- jcabi-xml - Best XML Library for parsing documents
- jcabi-http
- jcabi-matchers
- jcabi-immutable
- jcabi-log
- slf4j-api-1.7.25
- slf4j-simple
- javax.json
- javax.json-api
- hamcrest-core
- hamcrest-library
public class Main {
public static void main(String[] args) {
UPSRequest upsRequest=new UPSRequest();
upsRequest.setAccessLicenseNumber("LICENSENUMBER");
upsRequest.setUserId("UPSUSER");
upsRequest.setPassword("UPSPASSWORD");
upsRequest.setBeginDateTime("20170613000000");//starting date
upsRequest.setEndDateTime("20170614235959");//ending date
upsRequest.setUrl("https://onlinetools.ups.com/ups.app/xml/QVEvents");//ups access point
upsRequest.setMaxUPSResponse(100);
upsRequest.run();
int counter=1;
for (Manifest man:upsRequest.getManifestList()) {
Package pkg=man.getPackage();
System.out.println(counter+"\tPickUp Date="+man.getPickupDate()+"\tPO="+pkg.getPO("9",5)+"\tTrackingNumber="+man.getPackage().getTrackingNumber()+"\t"+man.getShipTo().getAddress().getPostalCode());
System.out.println("******************************");
counter++;
}
upsRequest.printResponseFiles();
upsRequest.printRequestFiles();
}
}
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
- jcabi - Small Useful Java Components
- PartsHighway - Online Auto Parts Store