Package com.adyen.model.balanceplatform
Class TransactionRuleInfo
- java.lang.Object
-
- com.adyen.model.balanceplatform.TransactionRuleInfo
-
public class TransactionRuleInfo extends Object
TransactionRuleInfo
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransactionRuleInfo.OutcomeTypeEnumThe [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule.static classTransactionRuleInfo.RequestTypeEnumIndicates the type of request to which the rule applies.static classTransactionRuleInfo.StatusEnumThe status of the transaction rule.static classTransactionRuleInfo.TypeEnumThe [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_AGGREGATION_LEVELstatic StringJSON_PROPERTY_DESCRIPTIONstatic StringJSON_PROPERTY_END_DATEstatic StringJSON_PROPERTY_ENTITY_KEYstatic StringJSON_PROPERTY_INTERVALstatic StringJSON_PROPERTY_OUTCOME_TYPEstatic StringJSON_PROPERTY_REFERENCEstatic StringJSON_PROPERTY_REQUEST_TYPEstatic StringJSON_PROPERTY_RULE_RESTRICTIONSstatic StringJSON_PROPERTY_SCOREstatic StringJSON_PROPERTY_START_DATEstatic StringJSON_PROPERTY_STATUSstatic StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description TransactionRuleInfo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionRuleInfoaggregationLevel(String aggregationLevel)TransactionRuleInfodescription(String description)TransactionRuleInfoendDate(String endDate)TransactionRuleInfoentityKey(TransactionRuleEntityKey entityKey)booleanequals(Object o)Return true if this TransactionRuleInfo object is equal to o.static TransactionRuleInfofromJson(String jsonString)Create an instance of TransactionRuleInfo given an JSON stringStringgetAggregationLevel()The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**.StringgetDescription()Your description for the transaction rule.StringgetEndDate()The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format.TransactionRuleEntityKeygetEntityKey()Get entityKeyTransactionRuleIntervalgetInterval()Get intervalTransactionRuleInfo.OutcomeTypeEnumgetOutcomeType()The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule.StringgetReference()Your reference for the transaction rule.TransactionRuleInfo.RequestTypeEnumgetRequestType()Indicates the type of request to which the rule applies.TransactionRuleRestrictionsgetRuleRestrictions()Get ruleRestrictionsIntegergetScore()A positive or negative score applied to the transaction if it meets the conditions of the rule.StringgetStartDate()The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format.TransactionRuleInfo.StatusEnumgetStatus()The status of the transaction rule.TransactionRuleInfo.TypeEnumgetType()The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data.inthashCode()TransactionRuleInfointerval(TransactionRuleInterval interval)TransactionRuleInfooutcomeType(TransactionRuleInfo.OutcomeTypeEnum outcomeType)TransactionRuleInforeference(String reference)TransactionRuleInforequestType(TransactionRuleInfo.RequestTypeEnum requestType)TransactionRuleInforuleRestrictions(TransactionRuleRestrictions ruleRestrictions)TransactionRuleInfoscore(Integer score)voidsetAggregationLevel(String aggregationLevel)The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**.voidsetDescription(String description)Your description for the transaction rule.voidsetEndDate(String endDate)The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format.voidsetEntityKey(TransactionRuleEntityKey entityKey)entityKeyvoidsetInterval(TransactionRuleInterval interval)intervalvoidsetOutcomeType(TransactionRuleInfo.OutcomeTypeEnum outcomeType)The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule.voidsetReference(String reference)Your reference for the transaction rule.voidsetRequestType(TransactionRuleInfo.RequestTypeEnum requestType)Indicates the type of request to which the rule applies.voidsetRuleRestrictions(TransactionRuleRestrictions ruleRestrictions)ruleRestrictionsvoidsetScore(Integer score)A positive or negative score applied to the transaction if it meets the conditions of the rule.voidsetStartDate(String startDate)The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format.voidsetStatus(TransactionRuleInfo.StatusEnum status)The status of the transaction rule.voidsetType(TransactionRuleInfo.TypeEnum type)The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data.TransactionRuleInfostartDate(String startDate)TransactionRuleInfostatus(TransactionRuleInfo.StatusEnum status)StringtoJson()Convert an instance of TransactionRuleInfo to an JSON stringStringtoString()TransactionRuleInfotype(TransactionRuleInfo.TypeEnum type)
-
-
-
Field Detail
-
JSON_PROPERTY_AGGREGATION_LEVEL
public static final String JSON_PROPERTY_AGGREGATION_LEVEL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DESCRIPTION
public static final String JSON_PROPERTY_DESCRIPTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_END_DATE
public static final String JSON_PROPERTY_END_DATE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_ENTITY_KEY
public static final String JSON_PROPERTY_ENTITY_KEY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_INTERVAL
public static final String JSON_PROPERTY_INTERVAL
- See Also:
- Constant Field Values
-
JSON_PROPERTY_OUTCOME_TYPE
public static final String JSON_PROPERTY_OUTCOME_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REFERENCE
public static final String JSON_PROPERTY_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_REQUEST_TYPE
public static final String JSON_PROPERTY_REQUEST_TYPE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RULE_RESTRICTIONS
public static final String JSON_PROPERTY_RULE_RESTRICTIONS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SCORE
public static final String JSON_PROPERTY_SCORE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_START_DATE
public static final String JSON_PROPERTY_START_DATE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATUS
public static final String JSON_PROPERTY_STATUS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
aggregationLevel
public TransactionRuleInfo aggregationLevel(String aggregationLevel)
-
getAggregationLevel
public String getAggregationLevel()
The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**.- Returns:
- aggregationLevel
-
setAggregationLevel
public void setAggregationLevel(String aggregationLevel)
The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**. The level must be the [same or lower in hierarchy](https://docs.adyen.com/issuing/transaction-rules#accumulate-data) than the `entityKey`. If not provided, by default, the rule will accumulate data at the **paymentInstrument** level. Possible values: **paymentInstrument**, **paymentInstrumentGroup**, **balanceAccount**, **accountHolder**, **balancePlatform**.- Parameters:
aggregationLevel-
-
description
public TransactionRuleInfo description(String description)
-
getDescription
public String getDescription()
Your description for the transaction rule.- Returns:
- description
-
setDescription
public void setDescription(String description)
Your description for the transaction rule.- Parameters:
description-
-
endDate
public TransactionRuleInfo endDate(String endDate)
-
getEndDate
public String getEndDate()
The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**.- Returns:
- endDate
-
setEndDate
public void setEndDate(String endDate)
The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided, the rule will be evaluated until the rule status is set to **inactive**.- Parameters:
endDate-
-
entityKey
public TransactionRuleInfo entityKey(TransactionRuleEntityKey entityKey)
-
getEntityKey
public TransactionRuleEntityKey getEntityKey()
Get entityKey- Returns:
- entityKey
-
setEntityKey
public void setEntityKey(TransactionRuleEntityKey entityKey)
entityKey- Parameters:
entityKey-
-
interval
public TransactionRuleInfo interval(TransactionRuleInterval interval)
-
getInterval
public TransactionRuleInterval getInterval()
Get interval- Returns:
- interval
-
setInterval
public void setInterval(TransactionRuleInterval interval)
interval- Parameters:
interval-
-
outcomeType
public TransactionRuleInfo outcomeType(TransactionRuleInfo.OutcomeTypeEnum outcomeType)
-
getOutcomeType
public TransactionRuleInfo.OutcomeTypeEnum getOutcomeType()
The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.- Returns:
- outcomeType
-
setOutcomeType
public void setOutcomeType(TransactionRuleInfo.OutcomeTypeEnum outcomeType)
The [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule. If not provided, by default, this is set to **hardBlock**. Possible values: * **hardBlock**: the transaction is declined. * **scoreBased**: the transaction is assigned the `score` you specified. Adyen calculates the total score and if it exceeds 100, the transaction is declined.- Parameters:
outcomeType-
-
reference
public TransactionRuleInfo reference(String reference)
-
getReference
public String getReference()
Your reference for the transaction rule.- Returns:
- reference
-
setReference
public void setReference(String reference)
Your reference for the transaction rule.- Parameters:
reference-
-
requestType
public TransactionRuleInfo requestType(TransactionRuleInfo.RequestTypeEnum requestType)
-
getRequestType
public TransactionRuleInfo.RequestTypeEnum getRequestType()
Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**.- Returns:
- requestType
-
setRequestType
public void setRequestType(TransactionRuleInfo.RequestTypeEnum requestType)
Indicates the type of request to which the rule applies. If not provided, by default, this is set to **authorization**. Possible values: **authorization**, **authentication**, **tokenization**, **bankTransfer**.- Parameters:
requestType-
-
ruleRestrictions
public TransactionRuleInfo ruleRestrictions(TransactionRuleRestrictions ruleRestrictions)
-
getRuleRestrictions
public TransactionRuleRestrictions getRuleRestrictions()
Get ruleRestrictions- Returns:
- ruleRestrictions
-
setRuleRestrictions
public void setRuleRestrictions(TransactionRuleRestrictions ruleRestrictions)
ruleRestrictions- Parameters:
ruleRestrictions-
-
score
public TransactionRuleInfo score(Integer score)
-
getScore
public Integer getScore()
A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**.- Returns:
- score
-
setScore
public void setScore(Integer score)
A positive or negative score applied to the transaction if it meets the conditions of the rule. Required when `outcomeType` is **scoreBased**. The value must be between **-100** and **100**.- Parameters:
score-
-
startDate
public TransactionRuleInfo startDate(String startDate)
-
getStartDate
public String getStartDate()
The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**.- Returns:
- startDate
-
setStartDate
public void setStartDate(String startDate)
The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format. For example, **2020-12-18T10:15:30+01:00**. If not provided when creating a transaction rule, the `startDate` is set to the date when the rule status is set to **active**.- Parameters:
startDate-
-
status
public TransactionRuleInfo status(TransactionRuleInfo.StatusEnum status)
-
getStatus
public TransactionRuleInfo.StatusEnum getStatus()
The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**.- Returns:
- status
-
setStatus
public void setStatus(TransactionRuleInfo.StatusEnum status)
The status of the transaction rule. If you provide a `startDate` in the request, the rule is automatically created with an **active** status. Possible values: **active**, **inactive**.- Parameters:
status-
-
type
public TransactionRuleInfo type(TransactionRuleInfo.TypeEnum type)
-
getType
public TransactionRuleInfo.TypeEnum getType()
The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met.- Returns:
- type
-
setType
public void setType(TransactionRuleInfo.TypeEnum type)
The [type of rule](https://docs.adyen.com/issuing/transaction-rules#rule-types), which defines if a rule blocks transactions based on individual characteristics or accumulates data. Possible values: * **blockList**: decline a transaction when the conditions are met. * **maxUsage**: add the amount or number of transactions for the lifetime of a payment instrument, and then decline a transaction when the specified limits are met. * **velocity**: add the amount or number of transactions based on a specified time interval, and then decline a transaction when the specified limits are met.- Parameters:
type-
-
equals
public boolean equals(Object o)
Return true if this TransactionRuleInfo object is equal to o.
-
fromJson
public static TransactionRuleInfo fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of TransactionRuleInfo given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TransactionRuleInfo
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to TransactionRuleInfo
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of TransactionRuleInfo to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-