Skip to content

Commit 1f76fb1

Browse files
committed
Improve comments
1 parent f2138be commit 1f76fb1

File tree

2 files changed

+80
-5
lines changed

2 files changed

+80
-5
lines changed

src/response/models/factors.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ import * as webRecords from '../web-records';
44
import Insights from './insights';
55

66
export default class Factors extends Insights {
7+
/**
8+
* An array of risk score reason objects that describe a risk score
9+
* multiplier and the reasons for that multiplier.
10+
*/
711
public readonly riskScoreReasons?: records.RiskScoreReason[];
812

913
/**

src/response/records.ts

Lines changed: 76 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,15 +362,81 @@ export interface Disposition {
362362
}
363363

364364
/**
365-
* This object describes one of the reasons for the multiplier.
365+
* The risk score reason for the multiplier.
366+
*
367+
* This class provides both a machine-readable code and a human-readable
368+
* explanation of the reason for the risk score. See
369+
* {@link https://dev.maxmind.com/minfraud/api-documentation/responses/#schema--response--risk-score-reason--multiplier-reason | the response API documentation}.
370+
*
371+
* Although more codes may be added in the future, the current codes are:
372+
*
373+
* * `BROWSER_LANGUAGE` - Riskiness of the browser user-agent and language
374+
* associated with the request.
375+
* * `BUSINESS_ACTIVITY` - Riskiness of business activity associated with the
376+
* request.
377+
* * `COUNTRY` - Riskiness of the country associated with the request.
378+
* * `CUSTOMER_ID` - Riskiness of a customer's activity.
379+
* * `EMAIL_DOMAIN` - Riskiness of email domain.
380+
* * `EMAIL_DOMAIN_NEW` - Riskiness of newly-sighted email domain.
381+
* * `EMAIL_ADDRESS_NEW` - Riskiness of newly-sighted email address.
382+
* * `EMAIL_LOCAL_PART` - Riskiness of the local part of the email address.
383+
* * `EMAIL_VELOCITY` - Velocity on email - many requests on same email over
384+
* short period of time.
385+
* * `ISSUER_ID_NUMBER_COUNTRY_MISMATCH` - Riskiness of the country mismatch
386+
* between IP, billing, shipping and IIN country.
387+
* * `ISSUER_ID_NUMBER_ON_SHOP_ID` - Risk of Issuer ID Number for the shop ID.
388+
* * `ISSUER_ID_NUMBER_LAST_DIGITS_ACTIVITY` - Riskiness of many recent
389+
* requests and previous high-risk requests on the IIN and last digits of the
390+
* credit card.
391+
* * `ISSUER_ID_NUMBER_SHOP_ID_VELOCITY` - Risk of recent Issuer ID Number
392+
* activity for the shop ID.
393+
* * `INTRACOUNTRY_DISTANCE` - Risk of distance between IP, billing, and
394+
* shipping location.
395+
* * `ANONYMOUS_IP` - Risk due to IP being an Anonymous IP.
396+
* * `IP_BILLING_POSTAL_VELOCITY` - Velocity of distinct billing postal code on
397+
* IP address.
398+
* * `IP_EMAIL_VELOCITY` - Velocity of distinct email address on IP address.
399+
* * `IP_HIGH_RISK_DEVICE` - High-risk device sighted on IP address.
400+
* * `IP_ISSUER_ID_NUMBER_VELOCITY` - Velocity of distinct IIN on IP address.
401+
* * `IP_ACTIVITY` - Riskiness of IP based on minFraud network activity.
402+
* * `LANGUAGE` - Riskiness of browser language.
403+
* * `MAX_RECENT_EMAIL` - Riskiness of email address based on past minFraud
404+
* risk scores on email.
405+
* * `MAX_RECENT_PHONE` - Riskiness of phone number based on past minFraud risk
406+
* scores on phone.
407+
* * `MAX_RECENT_SHIP` - Riskiness of email address based on past minFraud risk
408+
* scores on ship address.
409+
* * `MULTIPLE_CUSTOMER_ID_ON_EMAIL` - Riskiness of email address having many
410+
* customer IDs.
411+
* * `ORDER_AMOUNT` - Riskiness of the order amount.
412+
* * `ORG_DISTANCE_RISK` - Risk of ISP and distance between billing address and
413+
* IP location.
414+
* * `PHONE` - Riskiness of the phone number or related numbers.
415+
* * `CART` - Riskiness of shopping cart contents.
416+
* * `TIME_OF_DAY` - Risk due to local time of day.
417+
* * `TRANSACTION_REPORT_EMAIL` - Risk due to transaction reports on the email
418+
* address.
419+
* * `TRANSACTION_REPORT_IP` - Risk due to transaction reports on the IP
420+
* address.
421+
* * `TRANSACTION_REPORT_PHONE` - Risk due to transaction reports on the phone
422+
* number.
423+
* * `TRANSACTION_REPORT_SHIP` - Risk due to transaction reports on the
424+
* shipping address.
425+
* * `EMAIL_ACTIVITY` - Riskiness of the email address based on minFraud
426+
* network activity.
427+
* * `PHONE_ACTIVITY` - Riskiness of the phone number based on minFraud network
428+
* activity.
429+
* * `SHIP_ACTIVITY` - Riskiness of ship address based on minFraud network
430+
* activity.
366431
*/
367432
export interface Reason {
368433
/**
369-
* The machine-readable code for the reason.
434+
* A machine-readable code identifying the reason.
370435
*/
371436
code: string;
372437
/**
373-
* The human-readable description of the reason.
438+
* A human-readable explanation of the reason. The description may change at
439+
* any time and should not be matched against.
374440
*/
375441
reason: string;
376442
}
@@ -381,11 +447,16 @@ export interface Reason {
381447
*/
382448
export interface RiskScoreReason {
383449
/**
384-
* The risk score multiplier.
450+
* The factor by which the risk score is increased (if the value is greater
451+
* than 1) or decreased (if the value is less than 1) for given risk
452+
* reason(s).
453+
* Multipliers greater than 1.5 and less than 0.66 are considered significant
454+
* and lead to risk reason(s) being present.
385455
*/
386456
multiplier: number;
387457
/**
388-
* The reasons for the multiplier.
458+
* An array containing Reason objects that describe one of the reasons for
459+
* the multiplier.
389460
*/
390461
reasons: Reason[];
391462
}

0 commit comments

Comments
 (0)