REST Resource: genericobject

Resource: GenericObject

Generic Object

JSON representation
{
  "genericType": enum (GenericType),
  "cardTitle": {
    object (LocalizedString)
  },
  "subheader": {
    object (LocalizedString)
  },
  "header": {
    object (LocalizedString)
  },
  "logo": {
    object (Image)
  },
  "hexBackgroundColor": string,
  "notifications": {
    object (Notifications)
  },
  "id": string,
  "classId": string,
  "barcode": {
    object (Barcode)
  },
  "heroImage": {
    object (Image)
  },
  "validTimeInterval": {
    object (TimeInterval)
  },
  "imageModulesData": [
    {
      object (ImageModuleData)
    }
  ],
  "textModulesData": [
    {
      object (TextModuleData)
    }
  ],
  "linksModuleData": {
    object (LinksModuleData)
  },
  "appLinkData": {
    object (AppLinkData)
  },
  "groupingInfo": {
    object (GroupingInfo)
  },
  "smartTapRedemptionValue": string,
  "rotatingBarcode": {
    object (RotatingBarcode)
  },
  "state": enum (State),
  "hasUsers": boolean,
  "passConstraints": {
    object (PassConstraints)
  },
  "wideLogo": {
    object (Image)
  },
  "saveRestrictions": {
    object (SaveRestrictions)
  }
}
Fields
genericType

enum (GenericType)

Specify which GenericType the card belongs to.

cardTitle

object (LocalizedString)

Required. The header of the pass. This is usually the Business name such as "XXX Gym", "AAA Insurance". This field is required and appears in the header row at the very top of the pass.

subheader

object (LocalizedString)

The title label of the pass, such as location where this pass can be used. Appears right above the title in the title row in the pass detail view.

header

object (LocalizedString)

Required. The title of the pass, such as "50% off coupon" or "Library card" or "Voucher". This field is required and appears in the title row of the pass detail view.

hexBackgroundColor

string

The background color for the card. If not set, the dominant color of the hero image is used, and if no hero image is set, the dominant color of the logo is used and if logo is not set, a color would be chosen by Google.

notifications

object (Notifications)

The notification settings that are enabled for this object.

id

string

Required. The unique identifier for an object. This ID must be unique across all objects from an issuer. This value needs to follow the format issuerID.identifier where issuerID is issued by Google and identifier is chosen by you. The unique identifier can only include alphanumeric characters, ., _, or -.

classId

string

Required. The class associated with this object. The class must be of the same type as this object, must already exist, and must be approved.

Class IDs should follow the format issuerID.identifier where issuerID is issued by Google and identifier is chosen by you.

barcode

object (Barcode)

The barcode type and value. If pass does not have a barcode, we can allow the issuer to set Barcode.alternate_text and display just that.

heroImage

object (Image)

Banner image displayed on the front of the card if present. The image will be displayed at 100% width.

validTimeInterval

object (TimeInterval)

The time period this object will be considered valid or usable. When the time period is passed, the object will be considered expired, which will affect the rendering on user's devices.

imageModulesData[]

object (ImageModuleData)

Image module data. Only one of the image from class and one from object level will be rendered when both set.

textModulesData[]

object (TextModuleData)

Text module data. If textModulesData is also defined on the class, both will be displayed. The maximum number of these fields displayed is 10 from class and 10 from object.

groupingInfo

object (GroupingInfo)

Information that controls how passes are grouped together.

smartTapRedemptionValue

string

The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields enableSmartTap and redemptionIssuers must also be set up correctly in order for the pass to support Smart Tap. Only ASCII characters are supported.

rotatingBarcode

object (RotatingBarcode)

The rotating barcode settings/details.

state

enum (State)

The state of the object. This field is used to determine how an object is displayed in the app. For example, an inactive object is moved to the "Expired passes" section. If this is not provided, the object would be considered ACTIVE.

hasUsers

boolean

Indicates if the object has users. This field is set by the platform.

passConstraints

object (PassConstraints)

Pass constraints for the object. Includes limiting NFC and screenshot behaviors.

saveRestrictions

object (SaveRestrictions)

Restrictions on the object that needs to be verified before the user tries to save the pass. Note that this restrictions will only be applied during save time. If the restrictions changed after a user saves the pass, the new restrictions will not be applied to an already saved pass.

GenericType

The type of the generic card.

Enums
GENERIC_TYPE_UNSPECIFIED Unspecified generic type.
GENERIC_SEASON_PASS Season pass
GENERIC_UTILITY_BILLS Utility bills
GENERIC_PARKING_PASS Parking pass
GENERIC_VOUCHER Voucher
GENERIC_GYM_MEMBERSHIP Gym membership cards
GENERIC_LIBRARY_MEMBERSHIP Library membership cards
GENERIC_RESERVATIONS Reservations
GENERIC_AUTO_INSURANCE Auto-insurance cards
GENERIC_HOME_INSURANCE Home-insurance cards
GENERIC_ENTRY_TICKET Entry tickets
GENERIC_RECEIPT Receipts
GENERIC_OTHER Other type

Notifications

Indicates if the object needs to have notification enabled. We support only one of ExpiryNotification/UpcomingNotification. expiryNotification takes precedence over upcomingNotification. In other words if expiryNotification is set, we ignore the upcomingNotification field.

JSON representation
{
  "expiryNotification": {
    object (ExpiryNotification)
  },
  "upcomingNotification": {
    object (UpcomingNotification)
  }
}
Fields
expiryNotification

object (ExpiryNotification)

A notification would be triggered at a specific time before the card expires.

upcomingNotification

object (UpcomingNotification)

A notification would be triggered at a specific time before the card becomes usable.

ExpiryNotification

Indicates that the issuer would like Google Wallet to send expiry notifications 2 days prior to the card expiration.

JSON representation
{
  "enableNotification": boolean
}
Fields
enableNotification

boolean

Indicates if the object needs to have expiry notification enabled.

UpcomingNotification

Indicates that the issuer would like Google Wallet to send an upcoming card validity notification 1 day before card becomes valid/usable.

JSON representation
{
  "enableNotification": boolean
}
Fields
enableNotification

boolean

Indicates if the object needs to have upcoming notification enabled.

Methods

addmessage

Adds a message to the generic object referenced by the given object ID.

get

Returns the generic object with the given object ID.

insert

Inserts a generic object with the given ID and properties.

list

Returns a list of all generic objects for a given issuer ID.

patch

Updates the generic object referenced by the given object ID.

update

Updates the generic object referenced by the given object ID.