WalletPasses (wallet_passes v0.5.0)

Copy Markdown View Source

Apple Wallet and Google Wallet pass generation, management, and remote updates.

This module provides convenience functions that orchestrate both platforms. For platform-specific control, use WalletPasses.Apple.Builder, WalletPasses.Google.Api, etc. directly.

Summary

Functions

Generates an Apple .pkpass binary for a pass.

Generates a "Save to Google Wallet" URL for a pass.

Sends Apple push notifications for a pass to trigger refresh on devices.

Updates a Google Wallet pass object on Google's servers.

Functions

build_apple_pass(pass_data, visual)

Generates an Apple .pkpass binary for a pass.

Creates or retrieves the Apple pass record, then builds the .pkpass bundle.

google_save_url(pass_data, visual, opts \\ [])

Generates a "Save to Google Wallet" URL for a pass.

Creates or retrieves the Google pass record, creates/updates the object on Google's servers, and returns the save URL.

Options

  • :class_id — Class ID suffix to use for the object (defaults to the pass type's standard suffix).
  • :class_config — Map of class configuration. When provided, ensures the class exists on Google's servers (idempotent — only created once per VM lifetime per class). The map's :id key defaults to the :class_id opt or to the pass type's standard suffix.
  • :origins — Passed through to Google.SaveUrl.

notify_apple_devices(serial_number)

Sends Apple push notifications for a pass to trigger refresh on devices.

update_google_pass(pass_data, visual, opts \\ [])

Updates a Google Wallet pass object on Google's servers.

Options

  • :class_id — Pass-through to Google.Api.update_object.
  • :class_config — Map of class configuration. When provided, ensures the class exists on Google's servers (idempotent).