Class TransactionRuleInterval


  • public class TransactionRuleInterval
    extends Object
    TransactionRuleInterval
    • Constructor Detail

      • TransactionRuleInterval

        public TransactionRuleInterval()
    • Method Detail

      • getDayOfMonth

        public Integer getDayOfMonth()
        The day of month, used when the `duration.unit` is **months**. If not provided, by default, this is set to **1**, the first day of the month.
        Returns:
        dayOfMonth
      • setDayOfMonth

        public void setDayOfMonth​(Integer dayOfMonth)
        The day of month, used when the `duration.unit` is **months**. If not provided, by default, this is set to **1**, the first day of the month.
        Parameters:
        dayOfMonth -
      • getDayOfWeek

        public TransactionRuleInterval.DayOfWeekEnum getDayOfWeek()
        The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**.
        Returns:
        dayOfWeek
      • setDayOfWeek

        public void setDayOfWeek​(TransactionRuleInterval.DayOfWeekEnum dayOfWeek)
        The day of week, used when the `duration.unit` is **weeks**. If not provided, by default, this is set to **monday**. Possible values: **sunday**, **monday**, **tuesday**, **wednesday**, **thursday**, **friday**.
        Parameters:
        dayOfWeek -
      • getDuration

        public Duration getDuration()
        Get duration
        Returns:
        duration
      • setDuration

        public void setDuration​(Duration duration)
        duration
        Parameters:
        duration -
      • getTimeOfDay

        public String getTimeOfDay()
        The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**. If not provided, by default, this is set to **00:00:00**.
        Returns:
        timeOfDay
      • setTimeOfDay

        public void setTimeOfDay​(String timeOfDay)
        The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**. If not provided, by default, this is set to **00:00:00**.
        Parameters:
        timeOfDay -
      • getTimeZone

        public String getTimeZone()
        The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, **Europe/Amsterdam**. By default, this is set to **UTC**.
        Returns:
        timeZone
      • setTimeZone

        public void setTimeZone​(String timeZone)
        The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones). For example, **Europe/Amsterdam**. By default, this is set to **UTC**.
        Parameters:
        timeZone -
      • getType

        public TransactionRuleInterval.TypeEnum getType()
        The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify.
        Returns:
        type
      • setType

        public void setType​(TransactionRuleInterval.TypeEnum type)
        The [type of interval](https://docs.adyen.com/issuing/transaction-rules#time-intervals) during which the rule conditions and limits apply, and how often counters are reset. Possible values: * **perTransaction**: conditions are evaluated and the counters are reset for every transaction. * **daily**: the counters are reset daily at 00:00:00 CET. * **weekly**: the counters are reset every Monday at 00:00:00 CET. * **monthly**: the counters reset every first day of the month at 00:00:00 CET. * **lifetime**: conditions are applied to the lifetime of the payment instrument. * **rolling**: conditions are applied and the counters are reset based on a `duration`. If the reset date and time are not provided, Adyen applies the default reset time similar to fixed intervals. For example, if the duration is every two weeks, the counter resets every third Monday at 00:00:00 CET. * **sliding**: conditions are applied and the counters are reset based on the current time and a `duration` that you specify.
        Parameters:
        type -
      • equals

        public boolean equals​(Object o)
        Return true if this TransactionRuleInterval object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • fromJson

        public static TransactionRuleInterval fromJson​(String jsonString)
                                                throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of TransactionRuleInterval given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of TransactionRuleInterval
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to TransactionRuleInterval
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of TransactionRuleInterval to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException