Class CustomerMetadata

    • Constructor Detail

      • CustomerMetadata

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

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

        public CustomerMetadata​(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.
      • CustomerMetadata

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

      • getBusinessName

        public String getBusinessName()
        The name of the business the customer is associated with.
      • getNote

        public String getNote()
        A note about the customer.
      • getDobYear

        public Integer getDobYear()
        The year part of the date of birth for this customer. This part of the date of birth is optional, i.e., it's possible that only dobMonth and dobDay are populated.
      • getDobMonth

        public Integer getDobMonth()
        The month part of the date of birth for this customer.
      • getDobDay

        public Integer getDobDay()
        The day part of the date of birth for this customer.
      • getModifiedTime

        public Long getModifiedTime()
        The timestamp from when this customer's data was last updated.
      • getCustomer

        public Reference getCustomer()
        Customer who this metadata 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
      • isNotNullBusinessName

        public boolean isNotNullBusinessName()
        Checks whether the 'businessName' field is set and is not null
      • isNotNullNote

        public boolean isNotNullNote()
        Checks whether the 'note' field is set and is not null
      • isNotNullDobYear

        public boolean isNotNullDobYear()
        Checks whether the 'dobYear' field is set and is not null
      • isNotNullDobMonth

        public boolean isNotNullDobMonth()
        Checks whether the 'dobMonth' field is set and is not null
      • isNotNullDobDay

        public boolean isNotNullDobDay()
        Checks whether the 'dobDay' 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
      • hasBusinessName

        public boolean hasBusinessName()
        Checks whether the 'businessName' field has been set, however the value could be null
      • hasNote

        public boolean hasNote()
        Checks whether the 'note' field has been set, however the value could be null
      • hasDobYear

        public boolean hasDobYear()
        Checks whether the 'dobYear' field has been set, however the value could be null
      • hasDobMonth

        public boolean hasDobMonth()
        Checks whether the 'dobMonth' field has been set, however the value could be null
      • hasDobDay

        public boolean hasDobDay()
        Checks whether the 'dobDay' 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
      • setBusinessName

        public CustomerMetadata setBusinessName​(String businessName)
        Sets the field 'businessName'.
      • setModifiedTime

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

        public CustomerMetadata 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.
      • clearBusinessName

        public void clearBusinessName()
        Clears the 'businessName' field, the 'has' method for this field will now return false
      • clearNote

        public void clearNote()
        Clears the 'note' field, the 'has' method for this field will now return false
      • clearDobYear

        public void clearDobYear()
        Clears the 'dobYear' field, the 'has' method for this field will now return false
      • clearDobMonth

        public void clearDobMonth()
        Clears the 'dobMonth' field, the 'has' method for this field will now return false
      • clearDobDay

        public void clearDobDay()
        Clears the 'dobDay' 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 CustomerMetadata copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

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