Class VoidedLineItem

    • Constructor Detail

      • VoidedLineItem

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

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

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

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

      • getLineItem

        public LineItem getLineItem()
        The line item that was voided
      • getMerchant

        public Reference getMerchant()
      • getReason

        public String getReason()
        Why was the line item voided
      • getRemovedBy

        public Reference getRemovedBy()
        Employee who voided the item
      • getApprovedBy

        public Reference getApprovedBy()
        Optional info about employee who approved deletion of line item in case current employee does not have the permission
      • getCreatedBy

        public Reference getCreatedBy()
        Employee who created the order from which the line item was voided
      • getDeletedTime

        public Long getDeletedTime()
        Timestamp of when this line item was deleted
      • getEnvironment

        public String getEnvironment()
        Which environment was this recorded in
      • getClientEventType

        public ClientEventType getClientEventType()
        What event on the client removed this? Was it because of moving a table? Or was it plain old deleting a line item?
      • 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
      • isNotNullLineItem

        public boolean isNotNullLineItem()
        Checks whether the 'lineItem' field is set and is not null
      • isNotNullMerchant

        public boolean isNotNullMerchant()
        Checks whether the 'merchant' field is set and is not null
      • isNotNullReason

        public boolean isNotNullReason()
        Checks whether the 'reason' field is set and is not null
      • isNotNullRemovedBy

        public boolean isNotNullRemovedBy()
        Checks whether the 'removedBy' field is set and is not null
      • isNotNullApprovedBy

        public boolean isNotNullApprovedBy()
        Checks whether the 'approvedBy' field is set and is not null
      • isNotNullCreatedBy

        public boolean isNotNullCreatedBy()
        Checks whether the 'createdBy' field is set and is not null
      • isNotNullDeletedTime

        public boolean isNotNullDeletedTime()
        Checks whether the 'deletedTime' field is set and is not null
      • isNotNullEnvironment

        public boolean isNotNullEnvironment()
        Checks whether the 'environment' field is set and is not null
      • isNotNullClientEventType

        public boolean isNotNullClientEventType()
        Checks whether the 'clientEventType' field is set and is not null
      • hasLineItem

        public boolean hasLineItem()
        Checks whether the 'lineItem' field has been set, however the value could be null
      • hasMerchant

        public boolean hasMerchant()
        Checks whether the 'merchant' field has been set, however the value could be null
      • hasReason

        public boolean hasReason()
        Checks whether the 'reason' field has been set, however the value could be null
      • hasRemovedBy

        public boolean hasRemovedBy()
        Checks whether the 'removedBy' field has been set, however the value could be null
      • hasApprovedBy

        public boolean hasApprovedBy()
        Checks whether the 'approvedBy' field has been set, however the value could be null
      • hasCreatedBy

        public boolean hasCreatedBy()
        Checks whether the 'createdBy' field has been set, however the value could be null
      • hasDeletedTime

        public boolean hasDeletedTime()
        Checks whether the 'deletedTime' field has been set, however the value could be null
      • hasEnvironment

        public boolean hasEnvironment()
        Checks whether the 'environment' field has been set, however the value could be null
      • hasClientEventType

        public boolean hasClientEventType()
        Checks whether the 'clientEventType' field has been set, however the value could be null
      • setLineItem

        public VoidedLineItem setLineItem​(LineItem lineItem)
        Sets the field 'lineItem'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setMerchant

        public VoidedLineItem setMerchant​(Reference merchant)
        Sets the field 'merchant'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setRemovedBy

        public VoidedLineItem setRemovedBy​(Reference removedBy)
        Sets the field 'removedBy'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setApprovedBy

        public VoidedLineItem setApprovedBy​(Reference approvedBy)
        Sets the field 'approvedBy'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setCreatedBy

        public VoidedLineItem setCreatedBy​(Reference createdBy)
        Sets the field 'createdBy'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setDeletedTime

        public VoidedLineItem setDeletedTime​(Long deletedTime)
        Sets the field 'deletedTime'.
      • setEnvironment

        public VoidedLineItem setEnvironment​(String environment)
        Sets the field 'environment'.
      • clearLineItem

        public void clearLineItem()
        Clears the 'lineItem' field, the 'has' method for this field will now return false
      • clearMerchant

        public void clearMerchant()
        Clears the 'merchant' field, the 'has' method for this field will now return false
      • clearReason

        public void clearReason()
        Clears the 'reason' field, the 'has' method for this field will now return false
      • clearRemovedBy

        public void clearRemovedBy()
        Clears the 'removedBy' field, the 'has' method for this field will now return false
      • clearApprovedBy

        public void clearApprovedBy()
        Clears the 'approvedBy' field, the 'has' method for this field will now return false
      • clearCreatedBy

        public void clearCreatedBy()
        Clears the 'createdBy' field, the 'has' method for this field will now return false
      • clearDeletedTime

        public void clearDeletedTime()
        Clears the 'deletedTime' field, the 'has' method for this field will now return false
      • clearEnvironment

        public void clearEnvironment()
        Clears the 'environment' field, the 'has' method for this field will now return false
      • clearClientEventType

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

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