Struct wallet_pass::template::Template [−][src]
pub struct Template {Show 31 fields
pub app_launch_url: Option<String>,
pub associated_store_identifiers: Option<Vec<f64>>,
pub authentication_token: Option<String>,
pub background_color: Option<String>,
pub barcode: Option<Barcode>,
pub barcodes: Option<Vec<Barcode>>,
pub beacons: Option<Vec<Beacon>>,
pub boarding_pass: Option<BoardingPass>,
pub coupon: Option<Details>,
pub description: String,
pub event_ticket: Option<Details>,
pub expiration_date: Option<String>,
pub foreground_color: Option<String>,
pub format_version: Option<Value>,
pub generic: Option<Details>,
pub grouping_identifier: Option<String>,
pub label_color: Option<String>,
pub locations: Option<Vec<Location>>,
pub logo_text: Option<String>,
pub max_distance: Option<f64>,
pub nfc: Option<Nfc>,
pub organization_name: String,
pub pass_type_identifier: String,
pub relevant_date: Option<String>,
pub serial_number: String,
pub store_card: Option<Details>,
pub suppress_strip_shine: Option<bool>,
pub team_identifier: Option<String>,
pub user_info: Option<HashMap<String, Option<Value>>>,
pub voided: Option<bool>,
pub web_service_url: Option<String>,
}Expand description
Apple Wallet pass with localizations, NFC and web service push updates support.
Fields
app_launch_url: Option<String>A URL to be passed to the associated app when launching it. The app receives this URL in the application:didFinishLaunchingWithOptions: and application:openURL:options: methods of its app delegate.
associated_store_identifiers: Option<Vec<f64>>A list of iTunes Store item identifiers for the associated apps. Only one item in the list is used—the first item identifier for an app compatible with the current device. If the app is not installed, the link opens the App Store and shows the app. If the app is already installed, the link launches the app.
authentication_token: Option<String>The authentication token to use with the web service.
background_color: Option<String>Background color of the pass, specified as an CSS-style RGB triple.
barcode: Option<Barcode>Information specific to the pass’s barcode. Deprecated in iOS 9.0 and later; use barcodes instead.
barcodes: Option<Vec<Barcode>>Information specific to the pass’s barcode. The system uses the first valid barcode dictionary in the array. Additional dictionaries can be added as fallbacks. Available only in iOS 9.0 and later.
beacons: Option<Vec<Beacon>>Beacons marking locations where the pass is relevant. Available in iOS 7.0.
boarding_pass: Option<BoardingPass>Information specific to a boarding pass.
coupon: Option<Details>Information specific to a coupon.
description: StringBrief description of the pass, used by the iOS accessibility technologies. Don’t try to include all of the data on the pass in its description, just include enough detail to distinguish passes of the same type. Localizable.
event_ticket: Option<Details>Information specific to an event ticket.
expiration_date: Option<String>Date and time when the pass expires. Available in iOS 7.0.
foreground_color: Option<String>Foreground color of the pass, specified as a CSS-style RGB triple
format_version: Option<Value>Version of the file format.
generic: Option<Details>Information specific to a generic pass.
grouping_identifier: Option<String>Identifier used to group related passes. If a grouping identifier is specified, passes with the same style, pass type identifier, and grouping identifier are displayed as a group. Otherwise, passes are grouped automatically. Use this to group passes that are tightly related, such as the boarding passes for different connections of the same trip. Available in iOS 7.0.
label_color: Option<String>olor of the label text, specified as a CSS-style RGB triple. If omitted, the label color is determined automatically.
locations: Option<Vec<Location>>Locations where the pass is relevant. For example, the location of your store.
logo_text: Option<String>Text displayed next to the logo on the pass. Localizable.
max_distance: Option<f64>Maximum distance in meters from a relevant latitude and longitude that the pass is relevant. This number is compared to the pass’s default distance and the smaller value is used. Available in iOS 7.0.
nfc: Option<Nfc>Information used for Value Added Service Protocol transactions. Available in iOS 9.0.
organization_name: StringDisplay name of the organization that originated and signed the pass. Localizable.
pass_type_identifier: StringPass type identifier, as issued by Apple. The value must correspond with your signing certificate.
relevant_date: Option<String>Date and time when the pass becomes relevant. For example, the start time of a movie. Recommended for event tickets and boarding passes.
serial_number: StringSerial number that uniquely identifies the pass. No two passes with the same pass type identifier may have the same serial number.
store_card: Option<Details>Information specific to a store card.
suppress_strip_shine: Option<bool>If true, the strip image is displayed without a shine effect. The default value prior to iOS 7.0 is false. In iOS 7.0, a shine effect is never applied, and this key is deprecated.
team_identifier: Option<String>Team identifier of the organization that originated and signed the pass, as issued by Apple.
user_info: Option<HashMap<String, Option<Value>>>Custom information for companion apps. This data is not displayed to the user. For example, a pass for a cafe could include information about the user’s favorite drink and sandwich in a machine-readable form for the companion app to read, making it easy to place an order for “the usual” from the app. Available in iOS 7.0.
voided: Option<bool>Indicates that the pass is void—for example, a one time use coupon that has been redeemed. Available in iOS 7.0.
web_service_url: Option<String>The URL of a web service that conforms to the API described in PassKit Web Service Reference. The web service must use the HTTPS protocol; the leading https:// is included in the value of this key. On devices configured for development, there is UI in Settings to allow HTTP web services.
Implementations
Create a new Instance
A URL to be passed to the associated app when launching it. The app receives this URL in the application:didFinishLaunchingWithOptions: and application:openURL:options: methods of its app delegate.
A list of iTunes Store item identifiers for the associated apps. Only one item in the list is used—the first item identifier for an app compatible with the current device. If the app is not installed, the link opens the App Store and shows the app. If the app is already installed, the link launches the app.
A list of iTunes Store item identifiers for the associated apps. Only one item in the list is used—the first item identifier for an app compatible with the current device. If the app is not installed, the link opens the App Store and shows the app. If the app is already installed, the link launches the app.
The authentication token to use with the web service.
Background color of the pass, specified as an CSS-style RGB triple.
Information specific to the pass’s barcode. Deprecated in iOS 9.0 and later; use barcodes instead.
Information specific to the pass’s barcode. The system uses the first valid barcode dictionary in the array. Additional dictionaries can be added as fallbacks. Available only in iOS 9.0 and later.
Information specific to the pass’s barcode. The system uses the first valid barcode dictionary in the array. Additional dictionaries can be added as fallbacks. Available only in iOS 9.0 and later.
Beacons marking locations where the pass is relevant. Available in iOS 7.0.
Beacons marking locations where the pass is relevant. Available in iOS 7.0.
Information specific to a boarding pass.
Brief description of the pass, used by the iOS accessibility technologies. Don’t try to include all of the data on the pass in its description, just include enough detail to distinguish passes of the same type. Localizable.
Information specific to an event ticket.
Date and time when the pass expires. Available in iOS 7.0.
Foreground color of the pass, specified as a CSS-style RGB triple
Version of the file format.
Identifier used to group related passes. If a grouping identifier is specified, passes with the same style, pass type identifier, and grouping identifier are displayed as a group. Otherwise, passes are grouped automatically. Use this to group passes that are tightly related, such as the boarding passes for different connections of the same trip. Available in iOS 7.0.
olor of the label text, specified as a CSS-style RGB triple. If omitted, the label color is determined automatically.
Locations where the pass is relevant. For example, the location of your store.
Locations where the pass is relevant. For example, the location of your store.
Text displayed next to the logo on the pass. Localizable.
Maximum distance in meters from a relevant latitude and longitude that the pass is relevant. This number is compared to the pass’s default distance and the smaller value is used. Available in iOS 7.0.
Information used for Value Added Service Protocol transactions. Available in iOS 9.0.
Display name of the organization that originated and signed the pass. Localizable.
Pass type identifier, as issued by Apple. The value must correspond with your signing certificate.
Date and time when the pass becomes relevant. For example, the start time of a movie. Recommended for event tickets and boarding passes.
Serial number that uniquely identifies the pass. No two passes with the same pass type identifier may have the same serial number.
Information specific to a store card.
If true, the strip image is displayed without a shine effect. The default value prior to iOS 7.0 is false. In iOS 7.0, a shine effect is never applied, and this key is deprecated.
Team identifier of the organization that originated and signed the pass, as issued by Apple.
Custom information for companion apps. This data is not displayed to the user. For example, a pass for a cafe could include information about the user’s favorite drink and sandwich in a machine-readable form for the companion app to read, making it easy to place an order for “the usual” from the app. Available in iOS 7.0.
Custom information for companion apps. This data is not displayed to the user. For example, a pass for a cafe could include information about the user’s favorite drink and sandwich in a machine-readable form for the companion app to read, making it easy to place an order for “the usual” from the app. Available in iOS 7.0.
Indicates that the pass is void—for example, a one time use coupon that has been redeemed. Available in iOS 7.0.
The URL of a web service that conforms to the API described in PassKit Web Service Reference. The web service must use the HTTPS protocol; the leading https:// is included in the value of this key. On devices configured for development, there is UI in Settings to allow HTTP web services.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Template
impl UnwindSafe for Template
Blanket Implementations
Mutably borrows from an owned value. Read more