Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add support for the cost being returned in the available services fro…

…m FedEx rather then having to do two requests

first to get the available services and then a second for the actual cost.
  • Loading branch information...
commit f1adf9cd58ee4d6aeed90820fba65d6d72881e25 1 parent df158b1
rconover authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/Shipment/FedEx.pm
View
4 lib/Shipment/FedEx.pm
@@ -331,6 +331,10 @@ sub _build_services {
id => 'YOUR_PACKAGING',
name => 'Customer Supplied',
),
+ cost => Data::Currency->new(
+ $service->get_RatedShipmentDetails->[0]->get_ShipmentRateDetail->get_TotalNetCharge->get_Amount,
+ $service->get_RatedShipmentDetails->[0]->get_ShipmentRateDetail->get_TotalNetCharge->get_Currency
+ ),
);
}
$services{ground} = $services{'FEDEX_GROUND'} || $services{'GROUND_HOME_DELIVERY'} || $services{'INTERNATIONAL_GROUND'} || Shipment::Service->new();
Please sign in to comment.
Something went wrong with that request. Please try again.