-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdevice.rb
More file actions
51 lines (44 loc) · 1.54 KB
/
Copy pathdevice.rb
File metadata and controls
51 lines (44 loc) · 1.54 KB
1
2
3
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# frozen_string_literal: true
require 'minfraud/model/abstract'
module Minfraud
module Model
# Model with information about the device.
#
# In order to receive device output from minFraud Insights or minFraud
# Factors, you must be using the Device Tracking Add-on
# (https://dev.maxmind.com/minfraud/track-devices/?lang=en).
class Device < Abstract
# This number represents our confidence that the device_id refers to a
# unique device as opposed to a cluster of similar devices. A confidence
# of 0.01 indicates very low confidence that the device is unique,
# whereas 99 indicates very high confidence.
#
# @return [Float, nil]
attr_reader :confidence
# A UUID that MaxMind uses for the device associated with this IP
# address.
#
# @return [String, nil]
attr_reader :id
# This is the date and time of the last sighting of the device. This is
# an RFC 3339 date-time.
#
# @return [String, nil]
attr_reader :last_seen
# This is the local date and time of the transaction in the time zone of
# the device. This is determined by using the UTC offset associated with
# the device. This is an RFC 3339 date-time
#
# @return [String, nil]
attr_reader :local_time
# @!visibility private
def initialize(record)
super
@confidence = get('confidence')
@id = get('id')
@last_seen = get('last_seen')
@local_time = get('local_time')
end
end
end
end