Package com.adyen.model.recurring
Class PermitRestriction
- java.lang.Object
-
- com.adyen.model.recurring.PermitRestriction
-
public class PermitRestriction extends Object
PermitRestriction
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPermitRestriction.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_MAX_AMOUNTstatic StringSERIALIZED_NAME_SINGLE_TRANSACTION_LIMITstatic StringSERIALIZED_NAME_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)static PermitRestrictionfromJson(String jsonString)Create an instance of PermitRestriction given an JSON stringAmountgetMaxAmount()Get maxAmountAmountgetSingleTransactionLimit()Get singleTransactionLimitBooleangetSingleUse()Only a single payment can be made using this permit if set to true, otherwise multiple payments are allowed.inthashCode()PermitRestrictionmaxAmount(Amount maxAmount)voidsetMaxAmount(Amount maxAmount)voidsetSingleTransactionLimit(Amount singleTransactionLimit)voidsetSingleUse(Boolean singleUse)PermitRestrictionsingleTransactionLimit(Amount singleTransactionLimit)PermitRestrictionsingleUse(Boolean singleUse)StringtoJson()Convert an instance of PermitRestriction to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_MAX_AMOUNT
public static final String SERIALIZED_NAME_MAX_AMOUNT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SINGLE_TRANSACTION_LIMIT
public static final String SERIALIZED_NAME_SINGLE_TRANSACTION_LIMIT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_SINGLE_USE
public static final String SERIALIZED_NAME_SINGLE_USE
- See Also:
- Constant Field Values
-
-
Method Detail
-
maxAmount
public PermitRestriction maxAmount(Amount maxAmount)
-
getMaxAmount
public Amount getMaxAmount()
Get maxAmount- Returns:
- maxAmount
-
setMaxAmount
public void setMaxAmount(Amount maxAmount)
-
singleTransactionLimit
public PermitRestriction singleTransactionLimit(Amount singleTransactionLimit)
-
getSingleTransactionLimit
public Amount getSingleTransactionLimit()
Get singleTransactionLimit- Returns:
- singleTransactionLimit
-
setSingleTransactionLimit
public void setSingleTransactionLimit(Amount singleTransactionLimit)
-
singleUse
public PermitRestriction singleUse(Boolean singleUse)
-
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)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to PermitRestriction
-
fromJson
public static PermitRestriction fromJson(String jsonString) throws IOException
Create an instance of PermitRestriction given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PermitRestriction
- Throws:
IOException- if the JSON string is invalid with respect to PermitRestriction
-
toJson
public String toJson()
Convert an instance of PermitRestriction to an JSON string- Returns:
- JSON string
-
-