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(name, data)

Creates a Google Wallet items.

read(name, resource_id)

Reads a Google Wallet Class or Object.

update(name, data, *[, partial])

Updates a Google Wallet Class or Object.

disable(name, resource_id)

Disables 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(resources, *[, origins])

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

Models#

Top Level Models#

Generic

edutap.wallet_google.models.generic

GenericClass

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

GenericObject

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

Retail

edutap.wallet_google.models.retail

GiftCardClass

see: https://developers.google.com/wallet/retail/gift-cards/rest/v1/giftcardclass

GiftCardObject

see: https://developers.google.com/wallet/retail/gift-cards/rest/v1/giftcardobject

LoyaltyClass

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

LoyaltyObject

data-type, see: https://developers.google.com/wallet/retail/loyalty-cards/rest/v1/loyaltyobject

OfferClass

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

OfferObject

see: https://developers.google.com/wallet/retail/offers/rest/v1/offerobject

Ticket and Transit

edutap.wallet_google.models.tickets_and_transit

EventTicketClass

EventTicketObject

see: https://developers.google.com/wallet/tickets/events/rest/v1/eventticketobject

Issuer

edutap.wallet_google.models.issuer

Issuer

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

Permissions

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

SmartTap

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

JWT

edutap.wallet_google.models.jwt

JwtResource

see: https://developers.google.com/wallet/tickets/events/rest/v1/jwt

JwtResponse

see: https://developers.google.com/wallet/tickets/events/rest/v1/jwt/insert

Resources

see: https://developers.google.com/wallet/tickets/events/rest/v1/jwt/insert#resources

Data-Types#

Retail

edutap.wallet_google.models.retail

LoyaltyPointsBalance

data-type, see: https://developers.google.com/wallet/retail/loyalty-cards/rest/v1/loyaltyobject#LoyaltyPointsBalance

LoyaltyPoints

data-type, see: https://developers.google.com/wallet/retail/loyalty-cards/rest/v1/loyaltyobject#LoyaltyPoints

Ticket and Transit

edutap.wallet_google.models.tickets_and_transit

EventSeat

EventReservationInfo

Primitives

edutap.wallet_google.models.primitives

Uri

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

ImageUri

see: https://developers.google.com/wallet/generic/rest/v1/Image#imageuri

Image

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

PassConstraints

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

SecurityAnimation

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

GroupingInfo

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

Pagination

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

CallbackOptions

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

Primitives: Enumerations

edutap.wallet_google.models.primitives.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:

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

Primitives: Barcode

edutap.wallet_google.models.primitives.barcode

Barcode

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

TotpParameters

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

TotpDetails

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

RotatingBarcode

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

Primitives: Class Template Info

edutap.wallet_google.models.primitives.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

Primitives: Data

edutap.wallet_google.models.primitives.data

TextModuleData

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

LabelValue

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

LabelValueRow

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

LinksModuleData

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

ImageModuleData

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

InfoModuleData

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

AppTarget

see: https://developers.google.com/wallet/generic/rest/v1/AppLinkData#apptargets

AppLinkInfo

see: https://developers.google.com/wallet/generic/rest/v1/AppLinkData#applinkinfo

AppLinkData

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

Primitives: Datetime

edutap.wallet_google.models.primitives.datetime

DateTime

see: https://developers.google.com/wallet/tickets/events/rest/v1/DateTime

EventDateTime

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

TimeInterval

see: https://developers.google.com/wallet/tickets/events/rest/v1/TimeInterval

Primitives: Localized String

edutap.wallet_google.models.primitives.localized_string

TranslatedString

see: https://developers.google.com/wallet/generic/rest/v1/LocalizedString#translatedstring

LocalizedString

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

Primitives: Location

edutap.wallet_google.models.primitives.location

LatLongPoint

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

EventVenue

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

Primitives: Money

edutap.wallet_google.models.primitives.money

Money

see: https://developers.google.com/wallet/tickets/events/rest/v1/Money

Primitives: Notification

edutap.wallet_google.models.primitives.notification

ExpiryNotification

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

UpcomingNotification

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

Notifications

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

Message

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

AddMessageRequest

see: https://developers.google.com/wallet/tickets/events/rest/v1/AddMessageRequest

Primitives: Retail

edutap.wallet_google.models.primitives.retail

DiscoverableProgramMerchantSignupInfo

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

DiscoverableProgramMerchantSigninInfo

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

DiscoverableProgram

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

Primitives: Reviews

edutap.wallet_google.models.primitives.review

Review

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

Primitives: Smarttap

edutap.wallet_google.models.primitives.smarttap

Permission

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

AuthenticationKey

see: https://developers.google.com/wallet/tickets/events/rest/v1/issuer#authenticationkey

SignUpInfo

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

IssuerToUserInfo

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

IssuerContactInfo

see: https://developers.google.com/wallet/generic/rest/v1/issuer#issuercontactinfo

SmartTapMerchantData

see: https://developers.google.com/wallet/generic/rest/v1/issuer#smarttapmerchantdata

Other#

Base Model Classes

edutap.wallet_google.modelbase

GoogleWalletModel

Base model for all Google Wallet models.

GoogleWalletWithIdModel

Base model for Google Wallet models with an identifier.

GoogleWalletClassModel

Base model for all Google Wallet Class models.

GoogleWalletObjectModel

Base model for all Google Wallet Object models.

GoogleWalletObjectReference

Model for all Google Wallet Object references.

Model Registry

edutap.wallet_google.registry

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

Registers a Pydantic model based on GoogleWalletModel in a registry.

lookup_model(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(name)

Returns the metadata of the model with the given name.

raise_when_operation_not_allowed(name, operation)

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

RegistryMetadataDict

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.