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 stringMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetPartnerId()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()PermitincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.PermitpartnerId(String partnerId)Partner ID (when using the permit-per-partner token sharing model).PermitprofileReference(String profileReference)The profile to apply to this permit (when using the shared permits model).Permitrestriction(PermitRestriction restriction)restrictionPermitresultKey(String resultKey)The key to link permit requests to permit results.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.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)The expiry date for this permit.
-
-
-
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
-
partnerId
public Permit partnerId(String partnerId)
Partner ID (when using the permit-per-partner token sharing model).- Parameters:
partnerId- Partner ID (when using the permit-per-partner token sharing model).- Returns:
- the current
Permitinstance, allowing for method chaining
-
getPartnerId
public String getPartnerId()
Partner ID (when using the permit-per-partner token sharing model).- Returns:
- partnerId Partner ID (when using the permit-per-partner token sharing model).
-
setPartnerId
public void setPartnerId(String partnerId)
Partner ID (when using the permit-per-partner token sharing model).- Parameters:
partnerId- Partner ID (when using the permit-per-partner token sharing model).
-
profileReference
public Permit profileReference(String profileReference)
The profile to apply to this permit (when using the shared permits model).- Parameters:
profileReference- The profile to apply to this permit (when using the shared permits model).- Returns:
- the current
Permitinstance, allowing for method chaining
-
getProfileReference
public String getProfileReference()
The profile to apply to this permit (when using the shared permits model).- Returns:
- profileReference The profile to apply to this permit (when using the shared permits model).
-
setProfileReference
public void setProfileReference(String profileReference)
The profile to apply to this permit (when using the shared permits model).- Parameters:
profileReference- The profile to apply to this permit (when using the shared permits model).
-
restriction
public Permit restriction(PermitRestriction restriction)
restriction- Parameters:
restriction-- Returns:
- the current
Permitinstance, allowing for method chaining
-
getRestriction
public PermitRestriction getRestriction()
Get restriction- Returns:
- restriction
-
setRestriction
public void setRestriction(PermitRestriction restriction)
restriction- Parameters:
restriction-
-
resultKey
public Permit resultKey(String resultKey)
The key to link permit requests to permit results.- Parameters:
resultKey- The key to link permit requests to permit results.- Returns:
- the current
Permitinstance, allowing for method chaining
-
getResultKey
public String getResultKey()
The key to link permit requests to permit results.- Returns:
- resultKey The key to link permit requests to permit results.
-
setResultKey
public void setResultKey(String resultKey)
The key to link permit requests to permit results.- Parameters:
resultKey- The key to link permit requests to permit results.
-
validTillDate
public Permit validTillDate(OffsetDateTime validTillDate)
The expiry date for this permit.- Parameters:
validTillDate- The expiry date for this permit.- Returns:
- the current
Permitinstance, allowing for method chaining
-
getValidTillDate
public OffsetDateTime getValidTillDate()
The expiry date for this permit.- Returns:
- validTillDate The expiry date for this permit.
-
setValidTillDate
public void setValidTillDate(OffsetDateTime validTillDate)
The expiry date for this permit.- Parameters:
validTillDate- The expiry date for this permit.
-
includeNullValues
public Permit includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this Permit object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
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
-
-