Class TrackData


  • public class TrackData
    extends Object
    Magnetic track or magnetic ink characters line. ISO 7813 - ISO 4909. Generic data structure for a card track, used when the magstripe card reader is located on the Sale Terminal, or for magstripe Card Reader device request. The data structure is also used to store the line at the bottom of a bank check.
    • Constructor Detail

      • TrackData

        public TrackData()
    • Method Detail

      • trackNumb

        public TrackData trackNumb​(Integer trackNumb)
        Card track number.
        Parameters:
        trackNumb - Card track number.
        Returns:
        the current TrackData instance, allowing for method chaining
      • getTrackNumb

        public Integer getTrackNumb()
        Card track number. minimum: 1 maximum: 3
        Returns:
        trackNumb Card track number.
      • setTrackNumb

        public void setTrackNumb​(Integer trackNumb)
        Card track number.
        Parameters:
        trackNumb - Card track number.
      • trackFormat

        public TrackData trackFormat​(TrackFormat trackFormat)
        trackFormat
        Parameters:
        trackFormat -
        Returns:
        the current TrackData instance, allowing for method chaining
      • getTrackFormat

        public TrackFormat getTrackFormat()
        Get trackFormat
        Returns:
        trackFormat
      • setTrackFormat

        public void setTrackFormat​(TrackFormat trackFormat)
        trackFormat
        Parameters:
        trackFormat -
      • trackValue

        public TrackData trackValue​(String trackValue)
        Card track content.
        Parameters:
        trackValue - Card track content.
        Returns:
        the current TrackData instance, allowing for method chaining
      • getTrackValue

        public String getTrackValue()
        Card track content.
        Returns:
        trackValue Card track content.
      • setTrackValue

        public void setTrackValue​(String trackValue)
        Card track content.
        Parameters:
        trackValue - Card track content.
      • includeNullValues

        public TrackData includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this TrackData object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static TrackData fromJson​(String jsonString)
                                  throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of TrackData given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of TrackData
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to TrackData
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of TrackData to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException