Package com.adyen.model.recurring
Class PermitRestriction
- java.lang.Object
-
- com.adyen.model.recurring.PermitRestriction
-
public class PermitRestriction extends Object
PermitRestriction
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_MAX_AMOUNTstatic StringJSON_PROPERTY_SINGLE_TRANSACTION_LIMITstatic StringJSON_PROPERTY_SINGLE_USE
-
Constructor Summary
Constructors Constructor Description PermitRestriction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Return true if this PermitRestriction object is equal to o.static PermitRestrictionfromJson(String jsonString)Create an instance of PermitRestriction given an JSON stringAmountgetMaxAmount()maxAmountAmountgetSingleTransactionLimit()singleTransactionLimitBooleangetSingleUse()Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.inthashCode()PermitRestrictionmaxAmount(Amount maxAmount)maxAmountvoidsetMaxAmount(Amount maxAmount)maxAmountvoidsetSingleTransactionLimit(Amount singleTransactionLimit)singleTransactionLimitvoidsetSingleUse(Boolean singleUse)Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.PermitRestrictionsingleTransactionLimit(Amount singleTransactionLimit)singleTransactionLimitPermitRestrictionsingleUse(Boolean singleUse)Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.StringtoJson()Convert an instance of PermitRestriction to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_MAX_AMOUNT
public static final String JSON_PROPERTY_MAX_AMOUNT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SINGLE_TRANSACTION_LIMIT
public static final String JSON_PROPERTY_SINGLE_TRANSACTION_LIMIT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_SINGLE_USE
public static final String JSON_PROPERTY_SINGLE_USE
- See Also:
- Constant Field Values
-
-
Method Detail
-
maxAmount
public PermitRestriction maxAmount(Amount maxAmount)
maxAmount- Parameters:
maxAmount-- Returns:
- the current
PermitRestrictioninstance, allowing for method chaining
-
getMaxAmount
public Amount getMaxAmount()
maxAmount- Returns:
- maxAmount
-
setMaxAmount
public void setMaxAmount(Amount maxAmount)
maxAmount- Parameters:
maxAmount-
-
singleTransactionLimit
public PermitRestriction singleTransactionLimit(Amount singleTransactionLimit)
singleTransactionLimit- Parameters:
singleTransactionLimit-- Returns:
- the current
PermitRestrictioninstance, allowing for method chaining
-
getSingleTransactionLimit
public Amount getSingleTransactionLimit()
singleTransactionLimit- Returns:
- singleTransactionLimit
-
setSingleTransactionLimit
public void setSingleTransactionLimit(Amount singleTransactionLimit)
singleTransactionLimit- Parameters:
singleTransactionLimit-
-
singleUse
public PermitRestriction singleUse(Boolean singleUse)
Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.- Parameters:
singleUse-- Returns:
- the current
PermitRestrictioninstance, allowing for method chaining
-
getSingleUse
public Boolean getSingleUse()
Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.- Returns:
- singleUse
-
setSingleUse
public void setSingleUse(Boolean singleUse)
Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.- Parameters:
singleUse-
-
equals
public boolean equals(Object o)
Return true if this PermitRestriction object is equal to o.
-
fromJson
public static PermitRestriction fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PermitRestriction given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PermitRestriction
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PermitRestriction
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PermitRestriction to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-