edutap.wallet_google.api.save_link#
- edutap.wallet_google.api.save_link(resources: dict[str, list[Any]], *, origins: list[str] = []) str #
Creates a link to save a Google Wallet Object to the wallet on the device.
Besides the capability to save an object to the wallet, it is also able create classes on-the-fly.
- Parameters:
resources – Dictionary of resources to save. Each dictionary key is the registered plural name of a model. Usually, this is the name with a lower first character and as plural. The value is either a simple python data structure using built-ins, or a Pydantic model instance matching the registered name’s model. If a resource is an Object, it can be an GoolgeWalletObjectReference instance too.
origins – List of domains to approve for JWT saving functionality. The Google Wallet API button will not render when the origins field is not defined. You could potentially get an “Load denied by X-Frame-Options” or “Refused to display” messages in the browser console when the origins field is not defined.
- Returns:
Link with JWT to save the resources to the wallet.