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...
1 files changed, 1 insertions(+), 1 deletions(-) M lib/port_in_order.rb
M lib/port_in_order.rb => lib/port_in_order.rb +1 -1
@@ 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)