Interface IWalletTemplateFieldMapping

The WalletTemplateFieldMapping object contains the configuration for the field mappings on the Apple Wallet layout of the template.

interface IWalletTemplateFieldMapping {
    androidType?: "LINK" | "TEXT" | "IMAGE";
    changeMessage?: string;
    currencyCode?: string;
    dateStyle?: "PKDateStyleNone" | "PKDateStyleShort" | "PKDateStyleMedium" | "PKDateStyleLong" | "PKDateStyleFull";
    defaultValue?: string;
    ignoresTimeZone?: boolean;
    isDefault?: boolean;
    isRelative?: boolean;
    key: string;
    label: string;
    mappedValue?: string;
    numberStyle?: "PKNumberStyleDecimal" | "PKNumberStylePercent" | "PKNumberStyleScientific" | "PKNumberStyleSpellOut";
    textAlignment?: "PKTextAlignmentLeft" | "PKTextAlignmentCenter" | "PKTextAlignmentRight" | "PKTextAlignmentNatural";
    timeStyle?: "PKDateStyleNone" | "PKDateStyleShort" | "PKDateStyleMedium" | "PKDateStyleLong" | "PKDateStyleFull";
}

Properties

androidType?: "LINK" | "TEXT" | "IMAGE"

Current not used

changeMessage?: string

The changeMessage of the field, this is used to determine the message that is displayed when the field is changed, that is displayed in a push notification.

  • Currently we only recomment using in the currentMessage display.
currencyCode?: string

The currencyCode of the field, this is used to determine the currency code for the field. Current not used

dateStyle?: "PKDateStyleNone" | "PKDateStyleShort" | "PKDateStyleMedium" | "PKDateStyleLong" | "PKDateStyleFull"

The dateStyle of the field, this is used to determine the type of display for a date. Not currently used

defaultValue?: string

The default value is used when no mapped value is set or if the mapped value is found to be undefined. No variable support is provided for default values.

ignoresTimeZone?: boolean

Current not used

isDefault?: boolean

Current not used

isRelative?: boolean

Current not used

key: string

The field key, this is the key used in the layout to map the field to the template. This must be unique to each field, and should only be applied to a PassData and AndroidPassData record once each.

label: string

The field label, this is the label used in the layout to map the field to the template.

mappedValue?: string

The mapped value is used to map the field to a variable in the program. You can either put the path to the card attribute, for example: "person.firstName" or "customMessage" or "passdata.metaData.favoriteColor", or you can replace the variables in other text for example: "{{person.firstName}} {{person.lastName}}" or "Your favorite color is {{passdata.metaData.favoriteColor}}"

numberStyle?: "PKNumberStyleDecimal" | "PKNumberStylePercent" | "PKNumberStyleScientific" | "PKNumberStyleSpellOut"

The numberStyle of the field, this is used to determine the number style for the field. Current not used

textAlignment?: "PKTextAlignmentLeft" | "PKTextAlignmentCenter" | "PKTextAlignmentRight" | "PKTextAlignmentNatural"

The textAlignment of the field, this is used to determine the layout of the text

timeStyle?: "PKDateStyleNone" | "PKDateStyleShort" | "PKDateStyleMedium" | "PKDateStyleLong" | "PKDateStyleFull"

The timeStyle of the field, this is used to determine the type of display for a date. Not currently used