Package com.adyen.model.balanceplatform
Class TransactionRuleInterval
- java.lang.Object
-
- com.adyen.model.balanceplatform.TransactionRuleInterval
-
public class TransactionRuleInterval extends Object
TransactionRuleInterval
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTransactionRuleInterval.DayOfWeekEnumThe day of week, used when the `duration.unit` is **weeks**.static classTransactionRuleInterval.TypeEnumThe [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.
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_DAY_OF_MONTHstatic StringJSON_PROPERTY_DAY_OF_WEEKstatic StringJSON_PROPERTY_DURATIONstatic StringJSON_PROPERTY_TIME_OF_DAYstatic StringJSON_PROPERTY_TIME_ZONEstatic StringJSON_PROPERTY_TYPE
-
Constructor Summary
Constructors Constructor Description TransactionRuleInterval()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TransactionRuleIntervaldayOfMonth(Integer dayOfMonth)TransactionRuleIntervaldayOfWeek(TransactionRuleInterval.DayOfWeekEnum dayOfWeek)TransactionRuleIntervalduration(Duration duration)booleanequals(Object o)Return true if this TransactionRuleInterval object is equal to o.static TransactionRuleIntervalfromJson(String jsonString)Create an instance of TransactionRuleInterval given an JSON stringIntegergetDayOfMonth()The day of month, used when the `duration.unit` is **months**.TransactionRuleInterval.DayOfWeekEnumgetDayOfWeek()The day of week, used when the `duration.unit` is **weeks**.DurationgetDuration()Get durationStringgetTimeOfDay()The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**.StringgetTimeZone()The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).TransactionRuleInterval.TypeEnumgetType()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.inthashCode()voidsetDayOfMonth(Integer dayOfMonth)The day of month, used when the `duration.unit` is **months**.voidsetDayOfWeek(TransactionRuleInterval.DayOfWeekEnum dayOfWeek)The day of week, used when the `duration.unit` is **weeks**.voidsetDuration(Duration duration)durationvoidsetTimeOfDay(String timeOfDay)The time of day, in **hh:mm:ss** format, used when the `duration.unit` is **hours**.voidsetTimeZone(String timeZone)The [time zone](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).voidsetType(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.TransactionRuleIntervaltimeOfDay(String timeOfDay)TransactionRuleIntervaltimeZone(String timeZone)StringtoJson()Convert an instance of TransactionRuleInterval to an JSON stringStringtoString()TransactionRuleIntervaltype(TransactionRuleInterval.TypeEnum type)
-
-
-
Field Detail
-
JSON_PROPERTY_DAY_OF_MONTH
public static final String JSON_PROPERTY_DAY_OF_MONTH
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DAY_OF_WEEK
public static final String JSON_PROPERTY_DAY_OF_WEEK
- See Also:
- Constant Field Values
-
JSON_PROPERTY_DURATION
public static final String JSON_PROPERTY_DURATION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TIME_OF_DAY
public static final String JSON_PROPERTY_TIME_OF_DAY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TIME_ZONE
public static final String JSON_PROPERTY_TIME_ZONE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
dayOfMonth
public TransactionRuleInterval dayOfMonth(Integer dayOfMonth)
-
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-
-
dayOfWeek
public TransactionRuleInterval dayOfWeek(TransactionRuleInterval.DayOfWeekEnum dayOfWeek)
-
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-
-
duration
public TransactionRuleInterval duration(Duration duration)
-
getDuration
public Duration getDuration()
Get duration- Returns:
- duration
-
setDuration
public void setDuration(Duration duration)
duration- Parameters:
duration-
-
timeOfDay
public TransactionRuleInterval timeOfDay(String timeOfDay)
-
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-
-
timeZone
public TransactionRuleInterval timeZone(String timeZone)
-
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-
-
type
public TransactionRuleInterval type(TransactionRuleInterval.TypeEnum type)
-
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.
-
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
-
-