Package xyz.tcheeric.cashu.voucher.pass
Record Class PassJson
java.lang.Object
java.lang.Record
xyz.tcheeric.cashu.voucher.pass.PassJson
public record PassJson(int formatVersion, String passTypeIdentifier, String teamIdentifier, String serialNumber, String description, String organizationName, String logoText, String backgroundColor, String foregroundColor, String labelColor, String expirationDate, boolean voided, PassJson.StoreCard storeCard, List<PassJson.Barcode> barcodes, Map<String,Object> userInfo)
extends Record
The subset of Apple's
pass.json schema this project emits.
We adopt the schema, not the platform: there is no certificate, no
.pkpass container, and no pass update web service. Apple Wallet never
renders these documents — imani's own wallet does. passTypeIdentifier and
teamIdentifier are schema-required and carry no meaning here.
Modelled by hand rather than via jPasskit: that library drags an APNs push client and Netty into the dependency tree, which contradicts this module's design.
Serialisation is the caller's — this module declares only Jackson annotations.
Nulls are omitted so optional keys stay absent rather than appearing as
null, which Apple's schema does not permit.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA machine-readable code.static final recordOne displayed field.static final recordField groups for a store card. -
Constructor Summary
ConstructorsConstructorDescriptionPassJson(int formatVersion, String passTypeIdentifier, String teamIdentifier, String serialNumber, String description, String organizationName, String logoText, String backgroundColor, String foregroundColor, String labelColor, String expirationDate, boolean voided, PassJson.StoreCard storeCard, List<PassJson.Barcode> barcodes, Map<String, Object> userInfo) Creates an instance of aPassJsonrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackgroundColorrecord component.barcodes()Returns the value of thebarcodesrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpirationDaterecord component.Returns the value of theforegroundColorrecord component.intReturns the value of theformatVersionrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thelabelColorrecord component.logoText()Returns the value of thelogoTextrecord component.Returns the value of theorganizationNamerecord component.Returns the value of thepassTypeIdentifierrecord component.Returns the value of theserialNumberrecord component.Returns the value of thestoreCardrecord component.Returns the value of theteamIdentifierrecord component.final StringtoString()Returns a string representation of this record class.userInfo()Returns the value of theuserInforecord component.booleanvoided()Returns the value of thevoidedrecord component.
-
Constructor Details
-
PassJson
public PassJson(int formatVersion, String passTypeIdentifier, String teamIdentifier, String serialNumber, String description, String organizationName, String logoText, String backgroundColor, String foregroundColor, String labelColor, String expirationDate, boolean voided, PassJson.StoreCard storeCard, List<PassJson.Barcode> barcodes, Map<String, Object> userInfo) Creates an instance of aPassJsonrecord class.- Parameters:
formatVersion- the value for theformatVersionrecord componentpassTypeIdentifier- the value for thepassTypeIdentifierrecord componentteamIdentifier- the value for theteamIdentifierrecord componentserialNumber- the value for theserialNumberrecord componentdescription- the value for thedescriptionrecord componentorganizationName- the value for theorganizationNamerecord componentlogoText- the value for thelogoTextrecord componentbackgroundColor- the value for thebackgroundColorrecord componentforegroundColor- the value for theforegroundColorrecord componentlabelColor- the value for thelabelColorrecord componentexpirationDate- the value for theexpirationDaterecord componentvoided- the value for thevoidedrecord componentstoreCard- the value for thestoreCardrecord componentbarcodes- the value for thebarcodesrecord componentuserInfo- the value for theuserInforecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
formatVersion
public int formatVersion()Returns the value of theformatVersionrecord component.- Returns:
- the value of the
formatVersionrecord component
-
passTypeIdentifier
Returns the value of thepassTypeIdentifierrecord component.- Returns:
- the value of the
passTypeIdentifierrecord component
-
teamIdentifier
Returns the value of theteamIdentifierrecord component.- Returns:
- the value of the
teamIdentifierrecord component
-
serialNumber
Returns the value of theserialNumberrecord component.- Returns:
- the value of the
serialNumberrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
organizationName
Returns the value of theorganizationNamerecord component.- Returns:
- the value of the
organizationNamerecord component
-
logoText
Returns the value of thelogoTextrecord component.- Returns:
- the value of the
logoTextrecord component
-
backgroundColor
Returns the value of thebackgroundColorrecord component.- Returns:
- the value of the
backgroundColorrecord component
-
foregroundColor
Returns the value of theforegroundColorrecord component.- Returns:
- the value of the
foregroundColorrecord component
-
labelColor
Returns the value of thelabelColorrecord component.- Returns:
- the value of the
labelColorrecord component
-
expirationDate
Returns the value of theexpirationDaterecord component.- Returns:
- the value of the
expirationDaterecord component
-
voided
public boolean voided()Returns the value of thevoidedrecord component.- Returns:
- the value of the
voidedrecord component
-
storeCard
Returns the value of thestoreCardrecord component.- Returns:
- the value of the
storeCardrecord component
-
barcodes
Returns the value of thebarcodesrecord component.- Returns:
- the value of the
barcodesrecord component
-
userInfo
Returns the value of theuserInforecord component.- Returns:
- the value of the
userInforecord component
-