Class Track2
java.lang.Object
org.jpos.core.Track2
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classFluent builder that parses a raw track2 string or assembles aTrack2from individual fields and validates the result against a configurable pattern. -
Constructor Summary
ConstructorsConstructorDescriptionTrack2(Track2.Builder builder) Copies the track2 fields from the suppliedTrack2.Builder. -
Method Summary
Modifier and TypeMethodDescriptionstatic Track2.Builderbuilder()Creates a new builder for assembling aTrack2.booleangetCvv()Returns the CVV/CVC value, when present.Returns the discretionary data trailing the service code.getExp()Returns the expiration date.getPan()Returns the primary account number.Returns the service code.getTrack()Returns the raw track2 string this object was built from.inthashCode()toString()
-
Constructor Details
-
Track2
Copies the track2 fields from the suppliedTrack2.Builder.- Parameters:
builder- builder carrying the parsed or assembled track2 fields
-
-
Method Details
-
getPan
-
getExp
-
getCvv
-
getServiceCode
Returns the service code.- Returns:
- three-digit service code, or
nullif absent
-
getDiscretionaryData
Returns the discretionary data trailing the service code.- Returns:
- remaining discretionary data trailing the service code, or
null
-
getTrack
-
toString
-
equals
-
hashCode
-
builder
Creates a new builder for assembling aTrack2.- Returns:
- a new
Track2.Builderfor assembling aTrack2
-