The operation being scored, and everything a rule might need to score it. Attributes carry whatever is specific to one context type - the cart for a purchase, the voucher for a redemption, the submitted email for a signup - so that adding a context type later does not mean adding fields here that every other context leaves null. This is handed straight to rules within the request that created it, so unlike an event it may hold live entities.
Properties
| Property | Returns | Description |
|---|---|---|
| adminOrg | Organisation | The account the operation belongs to. |
| attributes | Map<String,Object> | The context-specific attributes, keyed by one of the ATTR_ constants or a rule-specific name. |
| contextType | FraudContextType | Which operation is being scored. |
| contextTypeName | String | The context type's name, for callers that would rather compare strings than enums. |
| ipAddress | String | The client IP the operation came from. |
| profile | Profile | The profile the operation is for. |
| subjectId | Long | The id of the subject named by getSubjectType. |
| subjectType | String | What kind of thing the operation is about. |
| userAgent | String | The client's user agent header. |
| website | Website | The website the operation happened on. |
Methods
getContextType() · getContextTypeName() · getAdminOrg() · getWebsite() · getProfile() · getIpAddress() · getUserAgent() · getSubjectType() · getSubjectId() · getAttributes() · attribute(String name)
getContextType()
Returns: FraudContextType
Which operation is being scored.
getContextTypeName()
Returns: String
The context type's name, for callers that would rather compare strings than enums.
getAdminOrg()
Returns: Organisation
The account the operation belongs to.
getWebsite()
Returns: Website
The website the operation happened on.
getProfile()
Returns: Profile
The profile the operation is for.
getIpAddress()
Returns: String
The client IP the operation came from.
getUserAgent()
Returns: String
The client's user agent header.
getSubjectType()
Returns: String
What kind of thing the operation is about.
getSubjectId()
Returns: Long
The id of the subject named by getSubjectType.
getAttributes()
Returns: Map<String,Object>
The context-specific attributes, keyed by one of the ATTR_ constants or a rule-specific name.
attribute(String name)
Returns: Object
Look up one context-specific attribute by name.
| Parameter | Description |
|---|---|
name | the attribute name |