Skip to content

Latest commit

 

History

History
67 lines (54 loc) · 2.63 KB

README.md

File metadata and controls

67 lines (54 loc) · 2.63 KB

java-ups-manifest-xml

Java Library to download UPS Quantum View data like package manifest containing tracking information, etc.

Installation

Dependencies

Usage

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();

    }

}

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Credits

License

GNU GENERAL PUBLIC LICENSE