4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/AuthenticationSDK/util/Utility.rb', line 4
def getResponseCodeMessage(responseCode)
responseCode = responseCode.to_s
case responseCode
when "200"
tempResponseCodeMessage = "Transcation Successful"
when "201"
tempResponseCodeMessage = "Transcation Successful"
when "400"
tempResponseCodeMessage = "Bad Request"
when "401"
tempResponseCodeMessage = "Authentication Failed"
when "404"
tempResponseCodeMessage = "Not Found"
when "403"
tempResponseCodeMessage = "Forbidden"
when "500"
tempResponseCodeMessage = "Internal Server Error"
when "502"
tempResponseCodeMessage = "Bad Gateway"
when "503"
tempResponseCodeMessage = "Service Unavailable"
when "504"
tempResponseCodeMessage = "Gateway Timeout"
else
tempResponseCodeMessage= ''
end
return tempResponseCodeMessage
end
|