fedex transit times parser #65

merged 2 commits into from Dec 18, 2012

2 participants


Hey @Soleone, @BlakeMesdag

Sometimes (ground shipping, and a few other types) fedex does not give us a DeliveryTimestamp to tell us when a package can be delivered. instead, they give us a transit time range (tho sometimes its not a range and just a single number).

This change adds support to parse that transit time field, and if the delivery timestamp is not specified, we calculate a delivery timestamp based on the transit time.

@orenmazor orenmazor sometimes fedex gives us a transit time in words and no delivery time…
…stamp. in this case, we parse the transit time and calculate a delivery date range from that.
@BlakeMesdag BlakeMesdag commented on the diff Nov 28, 2012
@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
BlakeMesdag Nov 28, 2012 Shopify member

This can be moved into an instance method on the Fedex rate request tests to avoid adding a fixture. Something like this would work:

  def successful_rate_request

Where the ...... is the request below.

Shopify member

You can ignore the fixture comment, tested and is working with 0/1/2 day responses.


@orenmazor orenmazor merged commit 2ca9ac3 into master Dec 18, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment