Package com.adyen.model.recurring
Class Permit
- java.lang.Object
-
- com.adyen.model.recurring.Permit
-
public class Permit extends Object
Permit
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_PARTNER_IDstatic StringJSON_PROPERTY_PROFILE_REFERENCEstatic StringJSON_PROPERTY_RESTRICTIONstatic StringJSON_PROPERTY_RESULT_KEYstatic StringJSON_PROPERTY_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)Return true if this Permit object is equal to 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)Partner ID (when using the permit-per-partner token sharing model).voidsetProfileReference(String profileReference)The profile to apply to this permit (when using the shared permits model).voidsetRestriction(PermitRestriction restriction)restrictionvoidsetResultKey(String resultKey)The key to link permit requests to permit results.voidsetValidTillDate(OffsetDateTime validTillDate)The expiry date for this permit.StringtoJson()Convert an instance of Permit to an JSON stringStringtoString()PermitvalidTillDate(OffsetDateTime validTillDate)
-
-
-
Field Detail
-
JSON_PROPERTY_PARTNER_ID
public static final String JSON_PROPERTY_PARTNER_ID
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PROFILE_REFERENCE
public static final String JSON_PROPERTY_PROFILE_REFERENCE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RESTRICTION
public static final String JSON_PROPERTY_RESTRICTION
- See Also:
- Constant Field Values
-
JSON_PROPERTY_RESULT_KEY
public static final String JSON_PROPERTY_RESULT_KEY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_VALID_TILL_DATE
public static final String JSON_PROPERTY_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)
Partner ID (when using the permit-per-partner token sharing model).- Parameters:
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)
The profile to apply to this permit (when using the shared permits model).- Parameters:
profileReference-
-
restriction
public Permit restriction(PermitRestriction restriction)
-
getRestriction
public PermitRestriction getRestriction()
Get restriction- Returns:
- restriction
-
setRestriction
public void setRestriction(PermitRestriction restriction)
restriction- Parameters:
restriction-
-
getResultKey
public String getResultKey()
The key to link permit requests to permit results.- Returns:
- resultKey
-
setResultKey
public void setResultKey(String resultKey)
The key to link permit requests to permit results.- Parameters:
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)
The expiry date for this permit.- Parameters:
validTillDate-
-
equals
public boolean equals(Object o)
Return true if this Permit object is equal to o.
-
fromJson
public static Permit fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Permit given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Permit
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Permit
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Permit to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-