Reference#

API Functions#

Most tasks are done by import and using the sole api module:

from edutap.wallet_google import api

To tell the API functions what kind of item to deal with, the first parameter is the registered name of the model (except for save_link). Models can be the different top-level wallet-classes or -objects, but also issuers, permissions and such (see section models below).

create(data)

Creates a Google Wallet items.

read(name, resource_id)

Reads a Google Wallet Class or Object.

update(data, *[, partial])

Updates a Google Wallet Class or Object.

message(name, resource_id, message)

Sends a message to a Google Wallet Class or Object.

listing(name, *[, resource_id, issuer_id, ...])

Lists wallet related resources.

save_link(models, *[, origins])

Creates a link to save a Google Wallet Object to the wallet on the device.

Models#

Base Models#

General Base Models

edutap.wallet_google.models.bases

Model

Base Model for all Google Wallet Models.

WithIdModel

Model for Google Wallet models with an identifier.

CamelCaseAliasEnum(value[, names, module, ...])

Add an value alias in camelcase to the enum, given the value in snake-case.

Pass Models#

Pass Base Models and Helpers

edutap.wallet_google.models.passes.bases

Reference

References an existing wallet object.

ClassModel

BaseModel for all Google Wallet Class Models.

ObjectModel

Base model for all Google Wallet Object models.

StyleableMixin()

Mixin for Google Wallet Classes/Objects that can be styled.

CommonLogosMixin()

Mixin for Google Wallet Classes/Objects with a common logo.

Generic

edutap.wallet_google.models.passes.generic

GenericClass

The GenericClass is the implicitly the base class for all other Wallet Class models.

GenericObject

The GenericObject is a specific object and does not act as the base for other wallet objects!

Retail

edutap.wallet_google.models.passes.retail

Ticket and Transit

edutap.wallet_google.models.passes.tickets_and_transit

Miscellaneous Models#

edutap.wallet_google.models.misc

AddMessageRequest

Issuer

JWT

Data Type Models#

This are models for “Data Types” as Google names them, the sub schemas for nested objects.

data-types: Barcode

edutap.wallet_google.models.datatypes.barcode

data-types: Class Template Info

edutap.wallet_google.models.datatypes.class_template_info

FieldReference

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#fieldreference

FieldSelector

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#fieldselector

TemplateItem

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#templateitem

BarcodeSectionDetail

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#barcodesectiondetail

CardBarcodeSectionDetails

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#cardbarcodesectiondetails

CardRowOneItem

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#cardrowoneitem

CardRowTwoItems

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#cardrowtwoitems

CardRowThreeItems

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#cardrowthreeitems

CardRowTemplateInfo

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#cardrowtemplateinfo

CardTemplateOverride

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#cardtemplateoverride

DetailsItemInfo

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#detailsiteminfo

DetailsTemplateOverride

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#detailstemplateoverride

FirstRowOption

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#firstrowoption

ListTemplateOverride

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#listtemplateoverride

ClassTemplateInfo

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo

data-types: Data

edutap.wallet_google.models.datatypes.data

data-types: Datetime

edutap.wallet_google.models.datatypes.datetime

data-types: Enumerations

edutap.wallet_google.models.datatypes.enums

Action(value[, names, module, qualname, ...])

see: https://developers.google.com/wallet/generic/rest/v1/smarttap#action

AnimationType(value[, names, module, ...])

see: https://developers.google.com/wallet/generic/rest/v1/SecurityAnimation#animationtype

BarcodeRenderEncoding(value[, names, ...])

see: https://developers.google.com/wallet/generic/rest/v1/BarcodeRenderEncoding

BarcodeType(value[, names, module, ...])

see: https://developers.google.com/wallet/generic/rest/v1/BarcodeType

ConfirmationCodeLabel(value[, names, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#confirmationcodelabel

DateFormat(value[, names, module, qualname, ...])

DoorsOpenLabel(value[, names, module, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#doorsopenlabel

GateLabel(value[, names, module, qualname, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#gatelabel

GenericType(value[, names, module, ...])

see: https://developers.google.com/wallet/generic/rest/v1/genericobject#generictype

MessageType(value[, names, module, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/Message#messagetype

MultipleDevicesAndHoldersAllowedStatus(value)

see: https://developers.google.com/wallet/generic/rest/v1/MultipleDevicesAndHoldersAllowedStatus

NfcConstraint(value[, names, module, ...])

see: https://developers.google.com/wallet/reference/rest/v1/PassConstraints#NfcConstraint

PredefinedItem(value[, names, module, ...])

see: https://developers.google.com/wallet/retail/offers/rest/v1/ClassTemplateInfo#predefineditem

RedemptionChannel(value[, names, module, ...])

see: https://developers.google.com/wallet/retail/offers/rest/v1/offerclass#OfferClass.RedemptionChannel

ReviewStatus(value[, names, module, ...])

see: https://developers.google.com/wallet/retail/loyalty-cards/rest/v1/ReviewStatus

Role(value[, names, module, qualname, type, ...])

see: https://developers.google.com/wallet/generic/rest/v1/permissions#role

RowLabel(value[, names, module, qualname, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#rowlabel

ScreenshotEligibility(value[, names, ...])

see: https://developers.google.com/wallet/generic/rest/v1/PassConstraints#screenshoteligibility

SeatLabel(value[, names, module, qualname, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#seatlabel

SectionLabel(value[, names, module, ...])

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketclass#sectionlabel

SharedDataType(value[, names, module, ...])

see: https://developers.google.com/wallet/retail/loyalty-cards/rest/v1/loyaltyclass#shareddatatype

State(value[, names, module, qualname, ...])

see: https://developers.google.com/wallet/generic/rest/v1/State

RetailState(value[, names, module, ...])

see: https://developers.google.com/wallet/retail/loyalty-cards/rest/v1/loyaltyclass#state

TotpAlgorithm(value[, names, module, ...])

see: https://developers.google.com/wallet/generic/rest/v1/RotatingBarcode#totpalgorithm

TransitOption(value[, names, module, ...])

see: https://developers.google.com/wallet/generic/rest/v1/ClassTemplateInfo#transitoption

ViewUnlockRequirement(value[, names, ...])

see: https://developers.google.com/wallet/generic/rest/v1/ViewUnlockRequirement

data-types: Event

edutap.wallet_google.models.datatypes.event

data-types: General

edutap.wallet_google.models.datatypes.general

data-types: Localized String

edutap.wallet_google.models.datatypes.localized_string

data-types: Location

edutap.wallet_google.models.datatypes.location

data-types: Loyalty

edutap.wallet_google.models.datatypes.loyalty

data-types: Message

edutap.wallet_google.models.datatypes.message

data-types: Money

edutap.wallet_google.models.datatypes.money

data-types: Notification

edutap.wallet_google.models.datatypes.notification

data-types: Retail

edutap.wallet_google.models.datatypes.retail

data-types: Reviews

edutap.wallet_google.models.datatypes.review

data-types: Smarttap

edutap.wallet_google.models.datatypes.smarttap

Modules#

Model Registry

edutap.wallet_google.registry

register_model(name, url_part, *[, plural, ...])

Registers a Pydantic model based on Model in a registry.

lookup_model_by_name(name)

Returns the model with the given name.

lookup_model_by_plural_name(plural_name)

Returns the model with the given plural name.

lookup_metadata_by_name(name)

Returns the metadata of the model with the given name.

lookup_metadata_by_model_instance(model)

Returns the registry metadata by a given instance of a model

lookup_metadata_by_model_type(model_type)

Returns the registry metadata by a given model type

raise_when_operation_not_allowed(name, operation)

Verifies that the given operation is allowed for the given registered name.

RegistryMetadataDict

TypedDict for the metadata of a registered model.

Session

edutap.wallet_google.session

SessionManager()

Manages the session to the Google Wallet API and provides helper methods.

HTTPRecorder([pool_connections, ...])

Record the HTTP requests and responses to a file.