Explanations#
Google Wallet API#
The Google Wallet API is not self explanatory.
The Python API client follows the models and data-structure defined by Google.
Overall Google defines Wallet Classes which are templates for Wallet Objects, while latter are the actual passes, referencing it’s Wallet Class.
There are different types of Wallet Classes and Wallet Objects, while each type is always a pair of Wallet Class and Wallet Object, i.e.
RetailClass
andRetailObject
. Those are the top-level models. Additional, there are supporting top-level objects likeIssuer
,Permissions
, and more.Each Wallet Class or Wallet Object has a set of fields which are defined by Google and can not be changed.
Each fields type is either a simple value or another data-type with its own fields.
In this client package all data-structure defined by Google are represented by Pydantic models.
The models are defined in the edutap.wallet_google.models
module and are documented in the Reference.
All top-level models are registered in the edutap.wallet_google.registry
module.
In further code, the models are referenced by their registered name, which is the name of the class (in CamelCase).
The API functions are defined in the edutap.wallet_google.api
module.
They follow a CRUD API, while there is no delete at Google Wallet, but a disable.
Additional a message can be sent to a Wallet Class or Wallet Object.
Also, a download link can be created.
All are documented in the Reference section.
Most API function do take a name of a model as first parameter. The name is the registered name. Depending on the registered name used, a function might not be able to execute. This is checked by the API function based on the registry record of the model, where the capabilities are stored. The constraints are coming from the Google API and are mirrored here.
Contributing#
The sources are in a Git version control system with its main branches at GitHub.
We’d be happy to see many issues, forks, and pull-requests to make this package even better.
Please report any issues at our issue tracker.
License#
The code is under European Union Public Licence v1.2 (EUPL). The EUPL is an OpenSource Initiative (OSI) approved Free and OpenSource license.