From cd00a327267c8fc6127d0925888d631b9dba9fbd Mon Sep 17 00:00:00 2001 From: Christopher Vollick <0@psycoti.ca> Date: Tue, 21 Feb 2023 15:00:51 -0500 Subject: [PATCH] Porting Zips Can Contain "-" I use presence of only numerals to guess if a port is Canadian or not. Today we got a Zip+4, which has a dash. Right... that... --- lib/port_in_order.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/port_in_order.rb b/lib/port_in_order.rb index 5030fc0e621c7223dab086e1d2c699288ba9a63c..4e29c21c8383097fbe70ef767a619a118ffbc7eb 100644 --- a/lib/port_in_order.rb +++ b/lib/port_in_order.rb @@ -8,7 +8,7 @@ class PortInOrder "BillingTelephoneNumber", "Subscriber", "WirelessInfo" ) # If the zip has anything that's not a digit, assume Canada - if params.dig("Subscriber", "ServiceAddress", "Zip") =~ /[^\d\s]/ + if params.dig("Subscriber", "ServiceAddress", "Zip") =~ /[^-\d\s]/ Canada.new(customer, params) else new(customer, params)