Class: Response::Resp
- Inherits:
-
Object
- Object
- Response::Resp
- Defined in:
- lib/kount/Response.rb
Instance Method Summary collapse
- #get_auto ⇒ Object
- #get_brand ⇒ Object
- #get_browser ⇒ Object
- #get_cards ⇒ Object
- #get_cookies ⇒ Object
- #get_counters_triggered ⇒ Object
- #get_country ⇒ Object
- #get_date_device_firstseen ⇒ Object
- #get_device_layers ⇒ Object
- #get_devices ⇒ Object
- #get_devicescreen_resolution ⇒ Object
- #get_emails ⇒ Object
- #get_error_count ⇒ Object
- #get_errors ⇒ Object (also: #geterrors)
- #get_fingerprint ⇒ Object
- #get_flash ⇒ Object
- #get_geox ⇒ Object
- #get_http_country ⇒ Object
- #get_ipaddress ⇒ Object
- #get_ipaddress_city ⇒ Object
- #get_ipaddress_country ⇒ Object
- #get_ipaddress_latitude ⇒ Object
- #get_ipaddress_longitude ⇒ Object
- #get_ipaddress_organization ⇒ Object
- #get_ipaddress_region ⇒ Object
- #get_javascript ⇒ Object
- #get_kaptcha ⇒ Object
- #get_language ⇒ Object
- #get_local_time ⇒ Object
- #get_merchant_id ⇒ Object
- #get_mobile_device ⇒ Object
- #get_mobile_forwarder ⇒ Object
- #get_mobile_type ⇒ Object
- #get_mode ⇒ Object
- #get_network ⇒ Object
- #get_numbercounters_triggered ⇒ Object
- #get_numberrules_triggered ⇒ Object
- #get_omniscore ⇒ Object
- #get_order_number ⇒ Object
- #get_os ⇒ Object
- #get_pc_remote ⇒ Object
- #get_pierced_ipaddress ⇒ Object
- #get_piercedipaddress_city ⇒ Object
- #get_piercedipaddress_country ⇒ Object
- #get_piercedipaddress_latitude ⇒ Object
- #get_piercedipaddress_longitude ⇒ Object
- #get_piercedipaddress_organization ⇒ Object
- #get_piercedipaddress_region ⇒ Object
- #get_previous_whitelisted ⇒ Object
- #get_proxy ⇒ Object
- #get_region ⇒ Object
- #get_rules_triggered ⇒ Object
- #get_score ⇒ Object
- #get_secure_merchant_response ⇒ Object
- #get_session_id ⇒ Object
- #get_site ⇒ Object
- #get_timezone ⇒ Object
- #get_transaction_id ⇒ Object
- #get_useragent_string ⇒ Object
- #get_velo ⇒ Object
- #get_version ⇒ Object
- #get_vmax ⇒ Object
- #get_voice_device ⇒ Object
- #get_warning_count ⇒ Object
- #get_warnings ⇒ Object
-
#initialize(paramlist) ⇒ Resp
constructor
A new instance of Resp.
Constructor Details
#initialize(paramlist) ⇒ Resp
Returns a new instance of Resp.
6 7 8 9 |
# File 'lib/kount/Response.rb', line 6 def initialize(paramlist) @paramlist = paramlist puts @paramlist end |
Instance Method Details
#get_auto ⇒ Object
46 47 48 49 |
# File 'lib/kount/Response.rb', line 46 def get_auto auto = @paramlist['AUTO'].to_s auto unless auto.empty? end |
#get_brand ⇒ Object
66 67 68 69 |
# File 'lib/kount/Response.rb', line 66 def get_brand brand = @paramlist['BRND'].to_s brand unless brand.empty? end |
#get_browser ⇒ Object
291 292 293 294 |
# File 'lib/kount/Response.rb', line 291 def get_browser browser = @paramlist['BROWSER'].to_s browser unless browser.empty? end |
#get_cards ⇒ Object
116 117 118 119 |
# File 'lib/kount/Response.rb', line 116 def get_cards cards = @paramlist['CARDS'].to_s cards unless cards.empty? end |
#get_cookies ⇒ Object
181 182 183 184 |
# File 'lib/kount/Response.rb', line 181 def = @paramlist['COOKIES'].to_s unless .empty? end |
#get_counters_triggered ⇒ Object
345 346 347 348 349 350 351 352 353 |
# File 'lib/kount/Response.rb', line 345 def get_counters_triggered counters = [] numCounters = get_numbercounters_triggered (0..numCounters.to_i - 1).each do |i| countername = @paramlist["COUNTER_NAME_#{i}"] counters[countername.to_s] = @paramlist["COUNTER_VALUE_#{i}"] end counters.compact end |
#get_country ⇒ Object
171 172 173 174 |
# File 'lib/kount/Response.rb', line 171 def get_country country = @paramlist['COUNTRY'].to_s country unless country.empty? end |
#get_date_device_firstseen ⇒ Object
271 272 273 274 |
# File 'lib/kount/Response.rb', line 271 def get_date_device_firstseen ddfs = @paramlist['DDFS'].to_s ddfs unless ddfs.empty? end |
#get_device_layers ⇒ Object
131 132 133 134 |
# File 'lib/kount/Response.rb', line 131 def get_device_layers device_layers = @paramlist['DEVICE_LAYERS'].to_s device_layers unless device_layers.empty? end |
#get_devices ⇒ Object
126 127 128 129 |
# File 'lib/kount/Response.rb', line 126 def get_devices devices = @paramlist['DEVICES'].to_s devices unless devices.empty? end |
#get_devicescreen_resolution ⇒ Object
281 282 283 284 |
# File 'lib/kount/Response.rb', line 281 def get_devicescreen_resolution dsr = @paramlist['DSR'].to_s dsr unless dsr.empty? end |
#get_emails ⇒ Object
101 102 103 104 |
# File 'lib/kount/Response.rb', line 101 def get_emails email = @paramlist['EMAILS'].to_s email unless email.empty? end |
#get_error_count ⇒ Object
325 326 327 328 |
# File 'lib/kount/Response.rb', line 325 def get_error_count # changed due to rubocop styling rules for ruby @paramlist['ERROR_COUNT'].to_s end |
#get_errors ⇒ Object Also known as: geterrors
330 331 332 333 334 335 336 337 |
# File 'lib/kount/Response.rb', line 330 def get_errors errors = [] error_count = get_error_count.to_i (0..error_count - 1).each do |i| errors << @paramlist["ERROR_#{i}"] end errors.compact end |
#get_fingerprint ⇒ Object
156 157 158 159 |
# File 'lib/kount/Response.rb', line 156 def get_fingerprint fingerprint = @paramlist['FINGERPRINT'].to_s fingerprint unless fingerprint.empty? end |
#get_flash ⇒ Object
161 162 163 164 |
# File 'lib/kount/Response.rb', line 161 def get_flash flash = @paramlist['FLASH'].to_s flash unless flash.empty? end |
#get_geox ⇒ Object
61 62 63 64 |
# File 'lib/kount/Response.rb', line 61 def get_geox geox = @paramlist['GEOX'].to_s geox unless geox.empty? end |
#get_http_country ⇒ Object
106 107 108 109 |
# File 'lib/kount/Response.rb', line 106 def get_http_country httmcountry = @paramlist['HTTP_COUNTRY'].to_s httmcountry unless httmcountry.empty? end |
#get_ipaddress ⇒ Object
226 227 228 229 |
# File 'lib/kount/Response.rb', line 226 def get_ipaddress ip_ipad = @paramlist['IP_IPAD'].to_s ip_ipad unless ip_ipad.empty? end |
#get_ipaddress_city ⇒ Object
261 262 263 264 |
# File 'lib/kount/Response.rb', line 261 def get_ipaddress_city ip_city = @paramlist['IP_CITY'].to_s ip_city unless ip_city.empty? end |
#get_ipaddress_country ⇒ Object
251 252 253 254 |
# File 'lib/kount/Response.rb', line 251 def get_ipaddress_country ip_country = @paramlist['IP_COUNTRY'].to_s ip_country unless ip_country.empty? end |
#get_ipaddress_latitude ⇒ Object
231 232 233 234 |
# File 'lib/kount/Response.rb', line 231 def get_ipaddress_latitude ip_lat = @paramlist['IP_LAT'].to_s ip_lat unless ip_lat.empty? end |
#get_ipaddress_longitude ⇒ Object
246 247 248 249 |
# File 'lib/kount/Response.rb', line 246 def get_ipaddress_longitude ip_long = @paramlist['IP_LON'].to_s ip_long unless ip_long.empty? end |
#get_ipaddress_organization ⇒ Object
266 267 268 269 |
# File 'lib/kount/Response.rb', line 266 def get_ipaddress_organization ip_org = @paramlist['IP_ORG'].to_s ip_org unless ip_org.empty? end |
#get_ipaddress_region ⇒ Object
256 257 258 259 |
# File 'lib/kount/Response.rb', line 256 def get_ipaddress_region ip_region = @paramlist['IP_REGION'].to_s ip_region unless ip_region.empty? end |
#get_javascript ⇒ Object
176 177 178 179 |
# File 'lib/kount/Response.rb', line 176 def get_javascript javascript = @paramlist['JAVASCRIPT'].to_s javascript unless javascript.empty? end |
#get_kaptcha ⇒ Object
91 92 93 94 |
# File 'lib/kount/Response.rb', line 91 def get_kaptcha kapt = @paramlist['KAPT'].to_s kapt unless kapt.empty? end |
#get_language ⇒ Object
166 167 168 169 |
# File 'lib/kount/Response.rb', line 166 def get_language language = @paramlist['LANGUAGE'].to_s language unless language.empty? end |
#get_local_time ⇒ Object
146 147 148 149 |
# File 'lib/kount/Response.rb', line 146 def get_local_time localtime = @paramlist['LOCALTIME'].to_s localtime unless localtime.empty? end |
#get_merchant_id ⇒ Object
26 27 28 29 |
# File 'lib/kount/Response.rb', line 26 def get_merchant_id merchantid = @paramlist['MERC'].to_s merchantid unless merchantid.empty? end |
#get_mobile_device ⇒ Object
186 187 188 189 |
# File 'lib/kount/Response.rb', line 186 def get_mobile_device mobiledevice = @paramlist['MOBILE_DEVICE'].to_s mobiledevice unless mobiledevice.empty? end |
#get_mobile_forwarder ⇒ Object
136 137 138 139 |
# File 'lib/kount/Response.rb', line 136 def get_mobile_forwarder mobile_forwarder = @paramlist['MOBILE_FORWARDER'].to_s mobile_forwarder unless mobile_forwarder.empty? end |
#get_mobile_type ⇒ Object
151 152 153 154 |
# File 'lib/kount/Response.rb', line 151 def get_mobile_type mobiletype = @paramlist['MOBILE_TYPE'].to_s mobiletype unless mobiletype.empty? end |
#get_mode ⇒ Object
11 12 13 14 |
# File 'lib/kount/Response.rb', line 11 def get_mode modes = @paramlist['MODE'].to_s modes unless modes.empty? end |
#get_network ⇒ Object
81 82 83 84 |
# File 'lib/kount/Response.rb', line 81 def get_network network = @paramlist['NETW'].to_s network unless network.empty? end |
#get_numbercounters_triggered ⇒ Object
340 341 342 343 |
# File 'lib/kount/Response.rb', line 340 def get_numbercounters_triggered # changed due to rubocop styling rules for ruby @paramlist['COUNTERS_TRIGGERED'].to_s end |
#get_numberrules_triggered ⇒ Object
296 297 298 299 |
# File 'lib/kount/Response.rb', line 296 def get_numberrules_triggered # changed due to rubocop styling rules for ruby @paramlist['RULES_TRIGGERED'].to_s end |
#get_omniscore ⇒ Object
56 57 58 59 |
# File 'lib/kount/Response.rb', line 56 def get_omniscore omniscore = @paramlist['OMNISCORE'].to_s omniscore unless omniscore.empty? end |
#get_order_number ⇒ Object
36 37 38 39 |
# File 'lib/kount/Response.rb', line 36 def get_order_number orderno = @paramlist['ORDR'].to_s orderno unless orderno.empty? end |
#get_os ⇒ Object
286 287 288 289 |
# File 'lib/kount/Response.rb', line 286 def get_os os = @paramlist['OS'].to_s os unless os.empty? end |
#get_pc_remote ⇒ Object
121 122 123 124 |
# File 'lib/kount/Response.rb', line 121 def get_pc_remote pcremote = @paramlist['PC_REMOTE'].to_s pcremote unless pcremote.empty? end |
#get_pierced_ipaddress ⇒ Object
191 192 193 194 |
# File 'lib/kount/Response.rb', line 191 def get_pierced_ipaddress pip_address = @paramlist['PIP_IPAD'].to_s pip_address unless pip_address.empty? end |
#get_piercedipaddress_city ⇒ Object
216 217 218 219 |
# File 'lib/kount/Response.rb', line 216 def get_piercedipaddress_city pip_city = @paramlist['PIP_CITY'].to_s pip_city unless pip_city.empty? end |
#get_piercedipaddress_country ⇒ Object
206 207 208 209 |
# File 'lib/kount/Response.rb', line 206 def get_piercedipaddress_country pip_country = @paramlist['PIP_COUNTRY'].to_s pip_country unless pip_country.empty? end |
#get_piercedipaddress_latitude ⇒ Object
196 197 198 199 |
# File 'lib/kount/Response.rb', line 196 def get_piercedipaddress_latitude pip_lat = @paramlist['PIP_LAT'].to_s pip_lat unless pip_lat.empty? end |
#get_piercedipaddress_longitude ⇒ Object
201 202 203 204 |
# File 'lib/kount/Response.rb', line 201 def get_piercedipaddress_longitude pip_long = @paramlist['PIP_LON'].to_s pip_long unless pip_long.empty? end |
#get_piercedipaddress_organization ⇒ Object
221 222 223 224 |
# File 'lib/kount/Response.rb', line 221 def get_piercedipaddress_organization pip_org = @paramlist['PIP_ORG'].to_s pip_org unless pip_org.empty? end |
#get_piercedipaddress_region ⇒ Object
211 212 213 214 |
# File 'lib/kount/Response.rb', line 211 def get_piercedipaddress_region pip_region = @paramlist['PIP_REGION'].to_s pip_region unless pip_region.empty? end |
#get_previous_whitelisted ⇒ Object
236 237 238 239 |
# File 'lib/kount/Response.rb', line 236 def get_previous_whitelisted whitelisted = @paramlist['PREVIOUSLY_WHITELISTED'].to_s whitelisted unless whitelisted.empty? end |
#get_proxy ⇒ Object
96 97 98 99 |
# File 'lib/kount/Response.rb', line 96 def get_proxy proxy = @paramlist['PROXY'].to_s proxy unless proxy.empty? end |
#get_region ⇒ Object
86 87 88 89 |
# File 'lib/kount/Response.rb', line 86 def get_region region = @paramlist['REGN'].to_s region unless region.empty? end |
#get_rules_triggered ⇒ Object
301 302 303 304 305 306 307 308 309 |
# File 'lib/kount/Response.rb', line 301 def get_rules_triggered rules_count = get_numberrules_triggered rules = [] (0..rules_count.to_i - 1).each do |i| ruleid = @paramlist["RULE_ID_#{i}"] rules[ruleid.to_i] = @paramlist["RULE_DESCRIPTION_#{i}"] end rules.compact end |
#get_score ⇒ Object
51 52 53 54 |
# File 'lib/kount/Response.rb', line 51 def get_score score = @paramlist['SCOR'].to_s score unless score.empty? end |
#get_secure_merchant_response ⇒ Object
241 242 243 244 |
# File 'lib/kount/Response.rb', line 241 def get_secure_merchant_response merchant_response = @paramlist['THREE_DS_MERCHANT_RESPONSE'].to_s merchant_response unless merchant_response.empty? end |
#get_session_id ⇒ Object
31 32 33 34 |
# File 'lib/kount/Response.rb', line 31 def get_session_id sessionid = @paramlist['SESS'].to_s sessionid unless sessionid.empty? end |
#get_site ⇒ Object
41 42 43 44 |
# File 'lib/kount/Response.rb', line 41 def get_site site = @paramlist['SITE'].to_s site unless site.empty? end |
#get_timezone ⇒ Object
111 112 113 114 |
# File 'lib/kount/Response.rb', line 111 def get_timezone timezone = @paramlist['TIMEZONE'].to_s timezone unless timezone.empty? end |
#get_transaction_id ⇒ Object
21 22 23 24 |
# File 'lib/kount/Response.rb', line 21 def get_transaction_id tran = @paramlist['TRAN'].to_s tran unless tran.empty? end |
#get_useragent_string ⇒ Object
276 277 278 279 |
# File 'lib/kount/Response.rb', line 276 def get_useragent_string user_agent = @paramlist['UAS'].to_s user_agent unless user_agent.empty? end |
#get_velo ⇒ Object
71 72 73 74 |
# File 'lib/kount/Response.rb', line 71 def get_velo velo = @paramlist['VELO'].to_s velo unless velo.empty? end |
#get_version ⇒ Object
16 17 18 19 |
# File 'lib/kount/Response.rb', line 16 def get_version vers = @paramlist['VERS'].to_s vers unless vers.empty? end |
#get_vmax ⇒ Object
76 77 78 79 |
# File 'lib/kount/Response.rb', line 76 def get_vmax vmax = @paramlist['VMAX'].to_s vmax unless vmax.empty? end |
#get_voice_device ⇒ Object
141 142 143 144 |
# File 'lib/kount/Response.rb', line 141 def get_voice_device voicedevice = @paramlist['VOICE_DEVICE'].to_s voicedevice unless voicedevice.empty? end |
#get_warning_count ⇒ Object
311 312 313 314 |
# File 'lib/kount/Response.rb', line 311 def get_warning_count # changed due to rubocop styling rules for ruby @paramlist['WARNING_COUNT'].to_s end |
#get_warnings ⇒ Object
316 317 318 319 320 321 322 323 |
# File 'lib/kount/Response.rb', line 316 def get_warnings warnings = [] warningcount = get_warning_count (0..warningcount.to_i - 1).each do |i| warnings = @paramlist["WARNING_#{i}"] end warnings.compact end |