Class TransactionRuleInfo


  • public class TransactionRuleInfo
    extends Object
    TransactionRuleInfo
    • Constructor Detail

      • TransactionRuleInfo

        public TransactionRuleInfo()
    • Method Detail

      • 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 -
      • 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 -
      • 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 -
      • 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 -
      • 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 -
      • 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 -
      • setRuleRestrictions

        public void setRuleRestrictions​(TransactionRuleRestrictions ruleRestrictions)
        ruleRestrictions
        Parameters:
        ruleRestrictions -
      • 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 -
      • 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 -
      • 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 -
      • 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.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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