lib/fedex/request/shipment.rb in fedex-3.4.0 vs lib/fedex/request/shipment.rb in fedex-3.6.0

- old
+ new

@@ -43,11 +43,11 @@ xml.PackagingType @shipping_options[:packaging_type] ||= "YOUR_PACKAGING" add_shipper(xml) add_recipient(xml) add_shipping_charges_payment(xml) add_special_services(xml) if @shipping_options[:return_reason] - add_customs_clearance(xml) if @customs_clearance + add_customs_clearance(xml) if @customs_clearance_detail add_custom_components(xml) xml.RateRequestTypes "ACCOUNT" add_packages(xml) } end @@ -94,21 +94,21 @@ end # Build xml Fedex Web Service request def build_xml builder = Nokogiri::XML::Builder.new do |xml| - xml.ProcessShipmentRequest(:xmlns => "http://fedex.com/ws/ship/v12"){ + xml.ProcessShipmentRequest(:xmlns => "http://fedex.com/ws/ship/v#{service[:version]}"){ add_web_authentication_detail(xml) add_client_detail(xml) add_version(xml) add_requested_shipment(xml) } end builder.doc.root.to_xml end def service - { :id => 'ship', :version => 12 } + { :id => 'ship', :version => Fedex::API_VERSION } end # Successful request def success?(response) response[:process_shipment_reply] &&