-
-
Save renius/20ba50306b3a93516a2c0fb642409e17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HASH = | |
{ | |
"U6" => { "RTC" => "RFC"}, | |
else: { "MAN" => "TFD"} | |
} | |
def build_status_code(telegram) | |
carrier = telegram.info['CarrierCode'] | |
status = telegram.info['StatusCode'] | |
HASH.fetch(carrier, HASH.fetch(:else, status)).try(:[], status) || status | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment