Class StoredDetails


  • public class StoredDetails
    extends Object
    StoredDetails
    • Constructor Detail

      • StoredDetails

        public StoredDetails()
    • Method Detail

      • getBank

        public BankAccount getBank()
        Get bank
        Returns:
        bank
      • getCard

        public Card getCard()
        Get card
        Returns:
        card
      • setCard

        public void setCard​(Card card)
      • getEmailAddress

        public String getEmailAddress()
        The email associated with stored payment details.
        Returns:
        emailAddress
      • setEmailAddress

        public void setEmailAddress​(String emailAddress)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonObject

        public static void validateJsonObject​(com.google.gson.JsonObject jsonObj)
                                       throws IOException
        Validates 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 StoredDetails
      • fromJson

        public static StoredDetails fromJson​(String jsonString)
                                      throws IOException
        Create an instance of StoredDetails given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of StoredDetails
        Throws:
        IOException - if the JSON string is invalid with respect to StoredDetails
      • toJson

        public String toJson()
        Convert an instance of StoredDetails to an JSON string
        Returns:
        JSON string