Package com.adyen.model.balanceplatform
Class TransactionRule
- java.lang.Object
-
- com.adyen.model.balanceplatform.TransactionRule
-
public class TransactionRule extends Object
TransactionRule
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransactionRule.OutcomeTypeEnumThe [outcome](https://docs.adyen.com/issuing/transaction-rules#outcome) that will be applied when a transaction meets the conditions of the rule.static classTransactionRule.RequestTypeEnumIndicates the type of request to which the rule applies.static classTransactionRule.StatusEnumThe status of the transaction rule.static classTransactionRule.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_IDstatic 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 TransactionRule()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionRuleaggregationLevel(String aggregationLevel)The level at which data must be accumulated, used in rules with `type` **velocity** or **maxUsage**.TransactionRuledescription(String description)Your description for the transaction rule.TransactionRuleendDate(String endDate)The date when the rule will stop being evaluated, in ISO 8601 extended offset date-time format.TransactionRuleentityKey(TransactionRuleEntityKey entityKey)entityKeybooleanequals(Object o)Return true if this TransactionRule object is equal to o.static TransactionRulefromJson(String jsonString)Create an instance of TransactionRule 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()entityKeyStringgetId()The unique identifier of the transaction rule.TransactionRuleIntervalgetInterval()intervalTransactionRule.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.TransactionRule.RequestTypeEnumgetRequestType()Indicates the type of request to which the rule applies.TransactionRuleRestrictionsgetRuleRestrictions()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.TransactionRule.StatusEnumgetStatus()The status of the transaction rule.TransactionRule.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()TransactionRuleid(String id)The unique identifier of the transaction rule.TransactionRuleinterval(TransactionRuleInterval interval)intervalTransactionRuleoutcomeType(TransactionRule.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.TransactionRulereference(String reference)Your reference for the transaction rule.TransactionRulerequestType(TransactionRule.RequestTypeEnum requestType)Indicates the type of request to which the rule applies.TransactionRuleruleRestrictions(TransactionRuleRestrictions ruleRestrictions)ruleRestrictionsTransactionRulescore(Integer score)A positive or negative score applied to the transaction if it meets the conditions of the rule.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)entityKeyvoidsetId(String id)The unique identifier of the transaction rule.voidsetInterval(TransactionRuleInterval interval)intervalvoidsetOutcomeType(TransactionRule.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(TransactionRule.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(TransactionRule.StatusEnum status)The status of the transaction rule.voidsetType(TransactionRule.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.TransactionRulestartDate(String startDate)The date when the rule will start to be evaluated, in ISO 8601 extended offset date-time format.TransactionRulestatus(TransactionRule.StatusEnum status)The status of the transaction rule.StringtoJson()Convert an instance of TransactionRule to an JSON stringStringtoString()TransactionRuletype(TransactionRule.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.
-
-
-
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_ID
public static final String JSON_PROPERTY_ID
- 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 TransactionRule aggregationLevel(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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
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 TransactionRule description(String description)
Your description for the transaction rule.- Parameters:
description-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
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 TransactionRule endDate(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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
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 TransactionRule entityKey(TransactionRuleEntityKey entityKey)
entityKey- Parameters:
entityKey-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getEntityKey
public TransactionRuleEntityKey getEntityKey()
entityKey- Returns:
- entityKey
-
setEntityKey
public void setEntityKey(TransactionRuleEntityKey entityKey)
entityKey- Parameters:
entityKey-
-
id
public TransactionRule id(String id)
The unique identifier of the transaction rule.- Parameters:
id-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getId
public String getId()
The unique identifier of the transaction rule.- Returns:
- id
-
setId
public void setId(String id)
The unique identifier of the transaction rule.- Parameters:
id-
-
interval
public TransactionRule interval(TransactionRuleInterval interval)
interval- Parameters:
interval-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getInterval
public TransactionRuleInterval getInterval()
interval- Returns:
- interval
-
setInterval
public void setInterval(TransactionRuleInterval interval)
interval- Parameters:
interval-
-
outcomeType
public TransactionRule outcomeType(TransactionRule.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. 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. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.- Parameters:
outcomeType-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getOutcomeType
public TransactionRule.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. 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. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.- Returns:
- outcomeType
-
setOutcomeType
public void setOutcomeType(TransactionRule.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. 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. Default value: **hardBlock**. > **scoreBased** is not allowed when `requestType` is **bankTransfer**.- Parameters:
outcomeType-
-
reference
public TransactionRule reference(String reference)
Your reference for the transaction rule.- Parameters:
reference-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
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 TransactionRule requestType(TransactionRule.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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getRequestType
public TransactionRule.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(TransactionRule.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 TransactionRule ruleRestrictions(TransactionRuleRestrictions ruleRestrictions)
ruleRestrictions- Parameters:
ruleRestrictions-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getRuleRestrictions
public TransactionRuleRestrictions getRuleRestrictions()
ruleRestrictions- Returns:
- ruleRestrictions
-
setRuleRestrictions
public void setRuleRestrictions(TransactionRuleRestrictions ruleRestrictions)
ruleRestrictions- Parameters:
ruleRestrictions-
-
score
public TransactionRule score(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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
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 TransactionRule startDate(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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
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 TransactionRule status(TransactionRule.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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getStatus
public TransactionRule.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(TransactionRule.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 TransactionRule type(TransactionRule.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-- Returns:
- the current
TransactionRuleinstance, allowing for method chaining
-
getType
public TransactionRule.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(TransactionRule.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 TransactionRule object is equal to o.
-
fromJson
public static TransactionRule fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of TransactionRule given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of TransactionRule
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to TransactionRule
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of TransactionRule to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-