Class PurchaseCardL3

    • Constructor Detail

      • PurchaseCardL3

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

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

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

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

      • getServiceCode

        public String getServiceCode()
        Service code extracted from the track data in Field 35. For all card types, Service code is mandatory for all merchants who directly settle through First Data.
      • getMagneticStripeInd

        public Boolean getMagneticStripeInd()
        If the card was swiped via magnetic strip reader for payment, set this indicator true. Also serviceCode will be mandatory if this is true
      • getLevel3LineItems

        public List<Level3LineItem> getLevel3LineItems()
        List of line items constituting the order using Level3 Purchase card
      • 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
      • isNotNullServiceCode

        public boolean isNotNullServiceCode()
        Checks whether the 'serviceCode' field is set and is not null
      • isNotNullMagneticStripeInd

        public boolean isNotNullMagneticStripeInd()
        Checks whether the 'magneticStripeInd' field is set and is not null
      • isNotNullLevel3LineItems

        public boolean isNotNullLevel3LineItems()
        Checks whether the 'level3LineItems' field is set and is not null
      • isNotEmptyLevel3LineItems

        public boolean isNotEmptyLevel3LineItems()
        Checks whether the 'level3LineItems' field is set and is not null and is not empty
      • hasServiceCode

        public boolean hasServiceCode()
        Checks whether the 'serviceCode' field has been set, however the value could be null
      • hasMagneticStripeInd

        public boolean hasMagneticStripeInd()
        Checks whether the 'magneticStripeInd' field has been set, however the value could be null
      • hasLevel3LineItems

        public boolean hasLevel3LineItems()
        Checks whether the 'level3LineItems' field has been set, however the value could be null
      • setServiceCode

        public PurchaseCardL3 setServiceCode​(String serviceCode)
        Sets the field 'serviceCode'.
      • setMagneticStripeInd

        public PurchaseCardL3 setMagneticStripeInd​(Boolean magneticStripeInd)
        Sets the field 'magneticStripeInd'.
      • setLevel3LineItems

        public PurchaseCardL3 setLevel3LineItems​(List<Level3LineItem> level3LineItems)
        Sets the field 'level3LineItems'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • clearServiceCode

        public void clearServiceCode()
        Clears the 'serviceCode' field, the 'has' method for this field will now return false
      • clearMagneticStripeInd

        public void clearMagneticStripeInd()
        Clears the 'magneticStripeInd' field, the 'has' method for this field will now return false
      • clearLevel3LineItems

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

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