Class CustomerInfo

    • Constructor Detail

      • CustomerInfo

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

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

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

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

      • getCustomer

        public Customer getCustomer()
        The customer object that Clover uses. This is the base model for a Clover customer, any additional information external systems need should exist in other fields
      • getDisplayString

        public String getDisplayString()
        A custom way to display this customer for an external system
      • getExternalId

        public String getExternalId()
        an id for an external system to use to reference this Customer.
      • getExternalSystemName

        public String getExternalSystemName()
        The name of the external system that 'owns' this. It is the system that understands the link from the externalId to the Customer.
      • getExtras

        public Map<String,​String> getExtras()
        Extra data used by external systems.
      • 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
      • isNotNullCustomer

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

        public boolean isNotNullDisplayString()
        Checks whether the 'displayString' field is set and is not null
      • isNotNullExternalId

        public boolean isNotNullExternalId()
        Checks whether the 'externalId' field is set and is not null
      • isNotNullExternalSystemName

        public boolean isNotNullExternalSystemName()
        Checks whether the 'externalSystemName' field is set and is not null
      • isNotNullExtras

        public boolean isNotNullExtras()
        Checks whether the 'extras' field is set and is not null
      • isNotEmptyExtras

        public boolean isNotEmptyExtras()
        Checks whether the 'extras' field is set and is not null and is not empty
      • hasCustomer

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

        public boolean hasDisplayString()
        Checks whether the 'displayString' field has been set, however the value could be null
      • hasExternalId

        public boolean hasExternalId()
        Checks whether the 'externalId' field has been set, however the value could be null
      • hasExternalSystemName

        public boolean hasExternalSystemName()
        Checks whether the 'externalSystemName' field has been set, however the value could be null
      • hasExtras

        public boolean hasExtras()
        Checks whether the 'extras' field has been set, however the value could be null
      • setCustomer

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

        public CustomerInfo setDisplayString​(String displayString)
        Sets the field 'displayString'.
      • setExternalId

        public CustomerInfo setExternalId​(String externalId)
        Sets the field 'externalId'.
      • setExternalSystemName

        public CustomerInfo setExternalSystemName​(String externalSystemName)
        Sets the field 'externalSystemName'.
      • clearCustomer

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

        public void clearDisplayString()
        Clears the 'displayString' field, the 'has' method for this field will now return false
      • clearExternalId

        public void clearExternalId()
        Clears the 'externalId' field, the 'has' method for this field will now return false
      • clearExternalSystemName

        public void clearExternalSystemName()
        Clears the 'externalSystemName' field, the 'has' method for this field will now return false
      • clearExtras

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

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