Package com.adyen.model.tapi
Class TrackData
- java.lang.Object
-
- com.adyen.model.tapi.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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_TRACK_FORMATstatic StringJSON_PROPERTY_TRACK_NUMBstatic StringJSON_PROPERTY_TRACK_VALUE
-
Constructor Summary
Constructors Constructor Description TrackData()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Return true if this TrackData object is equal to o.static TrackDatafromJson(String jsonString)Create an instance of TrackData given an JSON stringMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.TrackFormatgetTrackFormat()Get trackFormatIntegergetTrackNumb()Card track number. minimum: 1 maximum: 3StringgetTrackValue()Card track content.inthashCode()TrackDataincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetTrackFormat(TrackFormat trackFormat)trackFormatvoidsetTrackNumb(Integer trackNumb)Card track number.voidsetTrackValue(String trackValue)Card track content.StringtoJson()Convert an instance of TrackData to an JSON stringStringtoString()TrackDatatrackFormat(TrackFormat trackFormat)trackFormatTrackDatatrackNumb(Integer trackNumb)Card track number.TrackDatatrackValue(String trackValue)Card track content.
-
-
-
Field Detail
-
JSON_PROPERTY_TRACK_NUMB
public static final String JSON_PROPERTY_TRACK_NUMB
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TRACK_FORMAT
public static final String JSON_PROPERTY_TRACK_FORMAT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TRACK_VALUE
public static final String JSON_PROPERTY_TRACK_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
trackNumb
public TrackData trackNumb(Integer trackNumb)
Card track number.- Parameters:
trackNumb- Card track number.- Returns:
- the current
TrackDatainstance, 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
TrackDatainstance, 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
TrackDatainstance, 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.
-
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
-
-