lib/active_shipping/carriers/fedex.rb in active_shipping-1.2.2 vs lib/active_shipping/carriers/fedex.rb in active_shipping-1.3.0
- old
+ new
@@ -175,10 +175,15 @@
response = commit(save_request(request), (options[:test] || false))
parse_ship_response(response)
end
+ def maximum_address_field_length
+ # See Fedex Developper Guide
+ 35
+ end
+
protected
def build_shipment_request(origin, destination, packages, options = {})
imperial = location_uses_imperial(origin)
@@ -470,10 +475,10 @@
rate_estimates = xml.root.css('> RateReplyDetails').map do |rated_shipment|
service_code = rated_shipment.at('ServiceType').text
is_saturday_delivery = rated_shipment.at('AppliedOptions').try(:text) == 'SATURDAY_DELIVERY'
service_type = is_saturday_delivery ? "#{service_code}_SATURDAY_DELIVERY" : service_code
- transit_time = rated_shipment.at('TransitTime').text if service_code == "FEDEX_GROUND"
+ transit_time = rated_shipment.at('TransitTime').text if ["FEDEX_GROUND", "GROUND_HOME_DELIVERY"].include?(service_code)
max_transit_time = rated_shipment.at('MaximumTransitTime').try(:text) if service_code == "FEDEX_GROUND"
delivery_timestamp = rated_shipment.at('DeliveryTimestamp').try(:text)
delivery_range = delivery_range_from(transit_time, max_transit_time, delivery_timestamp, options)