lib/fedex/request/rate.rb in fedex-2.0.1 vs lib/fedex/request/rate.rb in fedex-2.2.0

- old
+ new

@@ -4,11 +4,11 @@ module Request class Rate < Base # Sends post request to Fedex web service and parse the response, a Rate object is created if the response is successful def process_request api_response = self.class.post(api_url, :body => build_xml) - puts api_response if @debug == true + puts api_response if @debug response = parse_response(api_response) if success?(response) rate_details = [response[:rate_reply][:rate_reply_details][:rated_shipment_details]].flatten.first[:shipment_rate_detail] Fedex::Rate.new(rate_details) else @@ -49,11 +49,11 @@ } end builder.doc.root.to_xml end - def service_id - 'crs' + def service + { :id => 'crs', :version => 10 } end # Successful request def success?(response) response[:rate_reply] && \ No newline at end of file