Class Permit


  • public class Permit
    extends Object
    Permit
    • Constructor Detail

      • Permit

        public Permit()
    • Method Detail

      • partnerId

        public Permit partnerId​(String partnerId)
        Partner ID (when using the permit-per-partner token sharing model).
        Parameters:
        partnerId -
        Returns:
        the current Permit instance, allowing for method chaining
      • 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 -
      • profileReference

        public Permit profileReference​(String profileReference)
        The profile to apply to this permit (when using the shared permits model).
        Parameters:
        profileReference -
        Returns:
        the current Permit instance, allowing for method chaining
      • 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)
        restriction
        Parameters:
        restriction -
        Returns:
        the current Permit instance, allowing for method chaining
      • getRestriction

        public PermitRestriction getRestriction()
        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 -
        Returns:
        the current Permit instance, allowing for method chaining
      • 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)
        The expiry date for this permit.
        Parameters:
        validTillDate -
        Returns:
        the current Permit instance, allowing for method chaining
      • 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.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • 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