Resource: GenericObject
Generic Object
JSON representation |
---|
{ "genericType": enum ( |
Fields | |
---|---|
generic |
Specify which |
card |
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 |
hex |
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 |
class |
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. |
hero |
Banner image displayed on the front of the card if present. The image will be displayed at 100% width. |
valid |
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. |
image |
Image module data. Only one of the image from class and one from object level will be rendered when both set. |
text |
Text module data. If |
links |
Links module data. If |
app |
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. |
grouping |
Information that controls how passes are grouped together. |
smart |
The value that will be transmitted to a Smart Tap certified terminal over NFC for this object. The class level fields |
rotating |
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 |
has |
Indicates if the object has users. This field is set by the platform. |
messages[] |
An array of messages displayed in the app. All users of this object will receive its associated messages. The maximum number of these fields is 10. |
pass |
Pass constraints for the object. Includes limiting NFC and screenshot behaviors. |
wide |
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. |
save |
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. |
value |
Optional value added module data. Maximum of ten on the object. |
linked |
linkedObjectIds are a list of other objects such as event ticket, loyalty, offer, generic, giftcard, transit and boarding pass that should be automatically attached to this generic object. If a user had saved this generic card, then these linkedObjectIds would be automatically pushed to the user's wallet (unless they turned off the setting to receive such linked passes). Make sure that objects present in linkedObjectIds are already inserted - if not, calls would fail. Once linked, the linked objects cannot be unlinked. You cannot link objects belonging to another issuer. There is a limit to the number of objects that can be linked to a single object. After the limit is reached, new linked objects in the call will be ignored silently. Object IDs should follow the format issuer ID.identifier where the former is issued by Google and the latter is chosen by you. |
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_LOYALTY_CARD |
Loyalty cards. Please note that it is advisable to use a dedicated Loyalty card pass type instead of this generic type. A dedicated loyalty card pass type offers more features and functionality than a generic pass type. |
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 | |
---|---|
expiry |
A notification would be triggered at a specific time before the card expires. |
upcoming |
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 | |
---|---|
enable |
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 | |
---|---|
enable |
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. |