Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Add USPS Track/Confirm Fields request call (rev=1) to USPS Carrier #159

wants to merge 7 commits into


None yet
5 participants

adamjk commented May 21, 2014

This adds the track/confirm with fields call to the USPS carrier class. This is uses the latest revision 1 and provides fields rather than free-text to parse in the response. It includes unit and remote tests.

@csaunders csaunders and 1 other commented on an outdated diff May 22, 2014

@@ -227,6 +237,18 @@ def build_tracking_request(tracking_number, options={})
+ def build_tracking_with_fields_request(tracking_numbers)
+ # Using revision 1 api for new functionality
+ xml_request = XmlNode.new('TrackFieldRequest', 'USERID' => @options[:login]) do |root_node|
+ root_node << XmlNode.new('Revision', 1)
+ # NOTE not sure of purpose and use of the client ip address
+ root_node << XmlNode.new('ClientIp', @@ip_addr)

csaunders May 22, 2014


I'd rather see this as a configuration value than have it determined programatically.

If this kind of processing is running on multiple hosts the IP addresses could all be different.


adamjk May 22, 2014

Do you have any idea how the ip address is used by USPS?


csaunders May 22, 2014




csaunders commented May 22, 2014

@nwjsmith feel like giving this a review over as well?


wvanbergen commented Jan 30, 2015

Can you rebase this on the latest master? The USPS carrier implementation was rewritten using Nokogiri.


trishume commented May 27, 2015

I recently implemented this in #260 and released it.

herp-a-derp-derp duplicating work! Sorry I'm blind and totally missed this PR.

@trishume trishume closed this May 27, 2015


kmcphillips commented May 27, 2015

Yup. This is in 1.1.3 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment