lib/active_shipping/carriers/usps.rb in active_shipping-1.12.0 vs lib/active_shipping/carriers/usps.rb in active_shipping-1.12.1

- old
+ new

@@ -11,10 +11,11 @@ # to do before they put your API key in production mode. class USPS < Carrier EventDetails = Struct.new(:description, :time, :zoneless_time, :location, :event_code) ONLY_PREFIX_EVENTS = ['DELIVERED','OUT FOR DELIVERY'] self.retry_safe = true + self.ssl_version = :TLSv1_2 cattr_reader :name @@name = "USPS" LIVE_DOMAIN = 'production.shippingapis.com' @@ -419,10 +420,10 @@ xml.Size(USPS.size_code_for(package)) xml.Width("%0.2f" % [package.inches(:width), 0.01].max) xml.Length("%0.2f" % [package.inches(:length), 0.01].max) xml.Height("%0.2f" % [package.inches(:height), 0.01].max) xml.Girth("%0.2f" % [package.inches(:girth), 0.01].max) - xml.OriginZip(origin.zip) + xml.OriginZip(strip_zip(origin.zip)) if commercial_type = commercial_type(options) xml.public_send(COMMERCIAL_FLAG_NAME.fetch(commercial_type), 'Y') end if destination.zip.present? xml.AcceptanceDateTime((options[:acceptance_time] || Time.now.utc).iso8601)