lib/g4s/insured_ship.rb in g4s_client-0.1.6 vs lib/g4s/insured_ship.rb in g4s_client-0.1.7

- old
+ new

@@ -7,20 +7,24 @@ def calculateEstimatedPrice(shipment_request = ShipmentRequest.new) reset_service_instance @service.headerhandler << ShipmentRequestHeader.new(shipment_request) # add new headers. @service.calculateEstimatedPrice(CalculateEstimatedPrice.new()) + end - puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> #{@service.filterchain }" + def createShipment(shipment_request = ShipmentRequest.new, commodity_list = CommodityList.new) + reset_service_instance + @service.headerhandler << ShipmentRequestHeader.new(shipment_request) # add new headers. + @service.headerhandler << CommodityListHeader.new(commodity_list) # add new headers. + @service.createShipment(CreateShipment.new()) end protected def reset_service_instance @service = G4s.instance.shipping.service # must make a new instance each time. @service.wiredump_dev=STDERR @service.options['protocol.http.ssl_config.verify_mode'] = OpenSSL::SSL::VERIFY_NONE @service.filterchain << G4sNamespaceFilter.new - puts "gogogo" end end