Package com.adyen.model.recurring
Class Permit
- java.lang.Object
-
- com.adyen.model.recurring.Permit
-
public class Permit extends Object
Permit
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPermit.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_PARTNER_IDstatic StringSERIALIZED_NAME_PROFILE_REFERENCEstatic StringSERIALIZED_NAME_RESTRICTIONstatic StringSERIALIZED_NAME_RESULT_KEYstatic StringSERIALIZED_NAME_VALID_TILL_DATE
-
Constructor Summary
Constructors Constructor Description Permit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static PermitfromJson(String jsonString)Create an instance of Permit given an JSON stringStringgetPartnerId()Partner ID (when using the permit-per-partner token sharing model).StringgetProfileReference()The profile to apply to this permit (when using the shared permits model).PermitRestrictiongetRestriction()Get restrictionStringgetResultKey()The key to link permit requests to permit results.OffsetDateTimegetValidTillDate()The expiry date for this permit.inthashCode()PermitpartnerId(String partnerId)PermitprofileReference(String profileReference)Permitrestriction(PermitRestriction restriction)PermitresultKey(String resultKey)voidsetPartnerId(String partnerId)voidsetProfileReference(String profileReference)voidsetRestriction(PermitRestriction restriction)voidsetResultKey(String resultKey)voidsetValidTillDate(OffsetDateTime validTillDate)StringtoJson()Convert an instance of Permit to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues foundPermitvalidTillDate(OffsetDateTime validTillDate)
-
-
-
Field Detail
-
SERIALIZED_NAME_PARTNER_ID
public static final String SERIALIZED_NAME_PARTNER_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PROFILE_REFERENCE
public static final String SERIALIZED_NAME_PROFILE_REFERENCE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RESTRICTION
public static final String SERIALIZED_NAME_RESTRICTION
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_RESULT_KEY
public static final String SERIALIZED_NAME_RESULT_KEY
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VALID_TILL_DATE
public static final String SERIALIZED_NAME_VALID_TILL_DATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getPartnerId
public String getPartnerId()
Partner ID (when using the permit-per-partner token sharing model).- Returns:
- partnerId
-
setPartnerId
public void setPartnerId(String partnerId)
-
getProfileReference
public String getProfileReference()
The profile to apply to this permit (when using the shared permits model).- Returns:
- profileReference
-
setProfileReference
public void setProfileReference(String profileReference)
-
restriction
public Permit restriction(PermitRestriction restriction)
-
getRestriction
public PermitRestriction getRestriction()
Get restriction- Returns:
- restriction
-
setRestriction
public void setRestriction(PermitRestriction restriction)
-
getResultKey
public String getResultKey()
The key to link permit requests to permit results.- Returns:
- resultKey
-
setResultKey
public void setResultKey(String resultKey)
-
validTillDate
public Permit validTillDate(OffsetDateTime validTillDate)
-
getValidTillDate
public OffsetDateTime getValidTillDate()
The expiry date for this permit.- Returns:
- validTillDate
-
setValidTillDate
public void setValidTillDate(OffsetDateTime validTillDate)
-
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 Permit
-
fromJson
public static Permit fromJson(String jsonString) throws IOException
Create an instance of Permit given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Permit
- Throws:
IOException- if the JSON string is invalid with respect to Permit
-
toJson
public String toJson()
Convert an instance of Permit to an JSON string- Returns:
- JSON string
-
-