-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathreason.rb
More file actions
90 lines (85 loc) · 4.16 KB
/
Copy pathreason.rb
File metadata and controls
90 lines (85 loc) · 4.16 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# frozen_string_literal: true
require 'minfraud/model/abstract'
module Minfraud
module Model
# The risk score reason for the multiplier.
#
# This class provides both a machine-readable code and a human-readable
# explanation of the reason for the risk score, see
# https://dev.maxmind.com/minfraud/api-documentation/responses/#schema--response--risk-score-reason--multiplier-reason.
# Although more codes may be added in the future, the current codes are:
#
# * BROWSER_LANGUAGE - Riskiness of the browser user-agent and
# language associated with the request.
# * BUSINESS_ACTIVITY - Riskiness of business activity
# associated with the request.
# * COUNTRY - Riskiness of the country associated with the request.
# * CUSTOMER_ID - Riskiness of a customer's activity.
# * EMAIL_DOMAIN - Riskiness of email domain.
# * EMAIL_DOMAIN_NEW - Riskiness of newly-sighted email domain.
# * EMAIL_ADDRESS_NEW - Riskiness of newly-sighted email address.
# * EMAIL_LOCAL_PART - Riskiness of the local part of the email address.
# * EMAIL_VELOCITY - Velocity on email - many requests on same email
# over short period of time.
# * ISSUER_ID_NUMBER_COUNTRY_MISMATCH - Riskiness of the country mismatch
# between IP, billing, shipping and IIN country.
# * ISSUER_ID_NUMBER_ON_SHOP_ID - Risk of Issuer ID Number for the shop ID.
# * ISSUER_ID_NUMBER_LAST_DIGITS_ACTIVITY - Riskiness of many recent requests
# and previous high-risk requests on the IIN and last digits of the credit card.
# * ISSUER_ID_NUMBER_SHOP_ID_VELOCITY - Risk of recent Issuer ID Number activity
# for the shop ID.
# * INTRACOUNTRY_DISTANCE - Risk of distance between IP, billing,
# and shipping location.
# * ANONYMOUS_IP - Risk due to IP being an Anonymous IP.
# * IP_BILLING_POSTAL_VELOCITY - Velocity of distinct billing postal code
# on IP address.
# * IP_EMAIL_VELOCITY - Velocity of distinct email address on IP address.
# * IP_HIGH_RISK_DEVICE - High-risk device sighted on IP address.
# * IP_ISSUER_ID_NUMBER_VELOCITY - Velocity of distinct IIN on IP address.
# * IP_ACTIVITY - Riskiness of IP based on minFraud network activity.
# * LANGUAGE - Riskiness of browser language.
# * MAX_RECENT_EMAIL - Riskiness of email address
# based on past minFraud risk scores on email.
# * MAX_RECENT_PHONE - Riskiness of phone number
# based on past minFraud risk scores on phone.
# * MAX_RECENT_SHIP - Riskiness of email address
# based on past minFraud risk scores on ship address.
# * MULTIPLE_CUSTOMER_ID_ON_EMAIL - Riskiness of email address
# having many customer IDs.
# * ORDER_AMOUNT - Riskiness of the order amount.
# * ORG_DISTANCE_RISK - Risk of ISP and distance between
# billing address and IP location.
# * PHONE - Riskiness of the phone number or related numbers.
# * CART - Riskiness of shopping cart contents.
# * TIME_OF_DAY - Risk due to local time of day.
# * TRANSACTION_REPORT_EMAIL - Risk due to transaction reports
# on the email address.
# * TRANSACTION_REPORT_IP - Risk due to transaction reports on the IP address.
# * TRANSACTION_REPORT_PHONE - Risk due to transaction reports
# on the phone number.
# * TRANSACTION_REPORT_SHIP - Risk due to transaction reports
# on the shipping address.
# * EMAIL_ACTIVITY - Riskiness of the email address
# based on minFraud network activity.
# * PHONE_ACTIVITY - Riskiness of the phone number
# based on minFraud network activity.
# * SHIP_ACTIVITY - Riskiness of ship address based on minFraud network activity.
class Reason < Abstract
# This value is a machine-readable code identifying the reason.
#
# @return [String]
attr_reader :code
# This property provides a human-readable explanation of the reason. The
# description may change at any time and should not be matched against.
#
# @return [String]
attr_reader :reason
# @!visibility private
def initialize(record)
super
@code = get('code')
@reason = get('reason')
end
end
end
end