Class Card

    • Constructor Detail

      • Card

        public Card()
        Constructs a new empty instance.
      • Card

        protected Card​(boolean noInit)
        Constructs a new empty instance.
      • Card

        public Card​(JSONObject jsonObject)
        Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • Card

        public Card​(Card src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getId

        public String getId()
      • getFirst6

        public String getFirst6()
      • getLast4

        public String getLast4()
      • getFirstName

        public String getFirstName()
      • getLastName

        public String getLastName()
      • getExpirationDate

        public String getExpirationDate()
      • getCardType

        public String getCardType()
      • getToken

        public String getToken()
      • getTokenType

        public TokenType getTokenType()
      • getModifiedTime

        public Long getModifiedTime()
        The timestamp from when this card was last updated.
      • getCustomer

        public Reference getCustomer()
        Customer who this card belongs to.
      • getJSONObject

        public JSONObject getJSONObject()
        Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be reflected in this instance and vice-versa.
        Specified by:
        getJSONObject in interface JSONifiable
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullFirst6

        public boolean isNotNullFirst6()
        Checks whether the 'first6' field is set and is not null
      • isNotNullLast4

        public boolean isNotNullLast4()
        Checks whether the 'last4' field is set and is not null
      • isNotNullFirstName

        public boolean isNotNullFirstName()
        Checks whether the 'firstName' field is set and is not null
      • isNotNullLastName

        public boolean isNotNullLastName()
        Checks whether the 'lastName' field is set and is not null
      • isNotNullExpirationDate

        public boolean isNotNullExpirationDate()
        Checks whether the 'expirationDate' field is set and is not null
      • isNotNullCardType

        public boolean isNotNullCardType()
        Checks whether the 'cardType' field is set and is not null
      • isNotNullToken

        public boolean isNotNullToken()
        Checks whether the 'token' field is set and is not null
      • isNotNullTokenType

        public boolean isNotNullTokenType()
        Checks whether the 'tokenType' field is set and is not null
      • isNotNullModifiedTime

        public boolean isNotNullModifiedTime()
        Checks whether the 'modifiedTime' field is set and is not null
      • isNotNullCustomer

        public boolean isNotNullCustomer()
        Checks whether the 'customer' field is set and is not null
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasFirst6

        public boolean hasFirst6()
        Checks whether the 'first6' field has been set, however the value could be null
      • hasLast4

        public boolean hasLast4()
        Checks whether the 'last4' field has been set, however the value could be null
      • hasFirstName

        public boolean hasFirstName()
        Checks whether the 'firstName' field has been set, however the value could be null
      • hasLastName

        public boolean hasLastName()
        Checks whether the 'lastName' field has been set, however the value could be null
      • hasExpirationDate

        public boolean hasExpirationDate()
        Checks whether the 'expirationDate' field has been set, however the value could be null
      • hasCardType

        public boolean hasCardType()
        Checks whether the 'cardType' field has been set, however the value could be null
      • hasToken

        public boolean hasToken()
        Checks whether the 'token' field has been set, however the value could be null
      • hasTokenType

        public boolean hasTokenType()
        Checks whether the 'tokenType' field has been set, however the value could be null
      • hasModifiedTime

        public boolean hasModifiedTime()
        Checks whether the 'modifiedTime' field has been set, however the value could be null
      • hasCustomer

        public boolean hasCustomer()
        Checks whether the 'customer' field has been set, however the value could be null
      • setId

        public Card setId​(String id)
        Sets the field 'id'.
      • setFirst6

        public Card setFirst6​(String first6)
        Sets the field 'first6'.
      • setLast4

        public Card setLast4​(String last4)
        Sets the field 'last4'.
      • setFirstName

        public Card setFirstName​(String firstName)
        Sets the field 'firstName'.
      • setLastName

        public Card setLastName​(String lastName)
        Sets the field 'lastName'.
      • setExpirationDate

        public Card setExpirationDate​(String expirationDate)
        Sets the field 'expirationDate'.
      • setCardType

        public Card setCardType​(String cardType)
        Sets the field 'cardType'.
      • setToken

        public Card setToken​(String token)
        Sets the field 'token'.
      • setTokenType

        public Card setTokenType​(TokenType tokenType)
        Sets the field 'tokenType'.
      • setModifiedTime

        public Card setModifiedTime​(Long modifiedTime)
        Sets the field 'modifiedTime'.
      • setCustomer

        public Card setCustomer​(Reference customer)
        Sets the field 'customer'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearFirst6

        public void clearFirst6()
        Clears the 'first6' field, the 'has' method for this field will now return false
      • clearLast4

        public void clearLast4()
        Clears the 'last4' field, the 'has' method for this field will now return false
      • clearFirstName

        public void clearFirstName()
        Clears the 'firstName' field, the 'has' method for this field will now return false
      • clearLastName

        public void clearLastName()
        Clears the 'lastName' field, the 'has' method for this field will now return false
      • clearExpirationDate

        public void clearExpirationDate()
        Clears the 'expirationDate' field, the 'has' method for this field will now return false
      • clearCardType

        public void clearCardType()
        Clears the 'cardType' field, the 'has' method for this field will now return false
      • clearToken

        public void clearToken()
        Clears the 'token' field, the 'has' method for this field will now return false
      • clearTokenType

        public void clearTokenType()
        Clears the 'tokenType' field, the 'has' method for this field will now return false
      • clearModifiedTime

        public void clearModifiedTime()
        Clears the 'modifiedTime' field, the 'has' method for this field will now return false
      • clearCustomer

        public void clearCustomer()
        Clears the 'customer' field, the 'has' method for this field will now return false
      • containsChanges

        public boolean containsChanges()
        Returns true if this instance has any changes.
      • resetChangeLog

        public void resetChangeLog()
        Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
      • copyChanges

        public Card copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(Card src)
        Copy all the changed fields from the given source to this instance.