Resource: GenericObject
Generic Object
JSON representation |
---|
{ "genericType": enum ( |
Fields | |
---|---|
genericType |
Specify which |
cardTitle |
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 |
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 |
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. |
logo |
The logo image of the pass. This image is displayed in the card detail view in upper left, and also on the list/thumbnail view. If the logo is not present, the first letter of |
hexBackgroundColor |
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 |
The notification settings that are enabled for this object. |
id |
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 |
classId |
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 |
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 |
Banner image displayed on the front of the card if present. The image will be displayed at 100% width. |
validTimeInterval |
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[] |
Image module data. Only one of the image from class and one from object level will be rendered when both set. |
textModulesData[] |
Text module data. If |
linksModuleData |
Links module data. If |
appLinkData |
Optional app or website link that will be displayed as a button on the front of the pass. If AppLinkData is provided for the corresponding class only object AppLinkData will be displayed. |
groupingInfo |
Information that controls how passes are grouped together. |
smartTapRedemptionValue |
The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields |
rotatingBarcode |
The rotating barcode settings/details. |
state |
The state of the object. This field is used to determine how an object is displayed in the app. For example, an |
hasUsers |
Indicates if the object has users. This field is set by the platform. |
passConstraints |
Pass constraints for the object. Includes limiting NFC and screenshot behaviors. |
wideLogo |
The wide logo of the pass. When provided, this will be used in place of the logo in the top left of the card view. |
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 ( |
Fields | |
---|---|
expiryNotification |
A notification would be triggered at a specific time before the card expires. |
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 |
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 |
Indicates if the object needs to have upcoming notification enabled. |
Methods |
|
---|---|
|
Adds a message to the generic object referenced by the given object ID. |
|
Returns the generic object with the given object ID. |
|
Inserts a generic object with the given ID and properties. |
|
Returns a list of all generic objects for a given issuer ID. |
|
Updates the generic object referenced by the given object ID. |
|
Updates the generic object referenced by the given object ID. |