~singpolyma/sgx-jmp

cd00a327267c8fc6127d0925888d631b9dba9fbd — Christopher Vollick 1 year, 9 days ago 9d529fc
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)