Package google.walletobjects.v1.giftcard

Index

GiftCardClassService

AddMessage

rpc AddMessage(GiftCardClassAddMessageRequest) returns (GiftCardClassAddMessageResponse)

Adds a message to the gift card class referenced by the given class ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Get

rpc Get(GiftCardClassGetRequest) returns (GiftCardClass)

Returns the gift card class with the given class ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Insert

rpc Insert(GiftCardClassInsertRequest) returns (GiftCardClass)

Inserts an gift card class with the given ID and properties.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
List

rpc List(GiftCardClassListRequest) returns (GiftCardClassListResponse)

Returns a list of all gift card classes for a given issuer ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Patch

rpc Patch(GiftCardClassPatchRequest) returns (GiftCardClass)

Updates the gift card class referenced by the given class ID. This method supports patch semantics.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Update

rpc Update(GiftCardClassUpdateRequest) returns (GiftCardClass)

Updates the gift card class referenced by the given class ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer

GiftCardObjectService

AddMessage

rpc AddMessage(GiftCardObjectAddMessageRequest) returns (GiftCardObjectAddMessageResponse)

Adds a message to the gift card object referenced by the given object ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Get

rpc Get(GiftCardObjectGetRequest) returns (GiftCardObject)

Returns the gift card object with the given object ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Insert

rpc Insert(GiftCardObjectInsertRequest) returns (GiftCardObject)

Inserts an gift card object with the given ID and properties.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
List

rpc List(GiftCardObjectListRequest) returns (GiftCardObjectListResponse)

Returns a list of all gift card objects for a given issuer ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Patch

rpc Patch(GiftCardObjectPatchRequest) returns (GiftCardObject)

Updates the gift card object referenced by the given object ID. This method supports patch semantics.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer
Update

rpc Update(GiftCardObjectUpdateRequest) returns (GiftCardObject)

Updates the gift card object referenced by the given object ID.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/wallet_object.issuer

GiftCardClass

Fields
kind
(deprecated)

string

Identifies what kind of resource this is. Value: the fixed string "walletobjects#giftCardClass".

merchant_name

string

Merchant name, such as "Adam's Apparel". The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens.

pin_label

string

The label to display for the PIN, such as "4-digit PIN".

event_number_label

string

The label to display for event number, such as "Target Event #".

allow_barcode_redemption

bool

Determines whether the merchant supports gift card redemption using barcode. If true, app displays a barcode for the gift card on the Gift card details screen. If false, a barcode is not displayed.

localized_merchant_name

LocalizedString

Translated strings for the merchant_name. The app may display an ellipsis after the first 20 characters to ensure full string is displayed on smaller screens.

localized_pin_label

LocalizedString

Translated strings for the pin_label.

localized_event_number_label

LocalizedString

Translated strings for the event_number_label.

card_number_label

string

The label to display for the card number, such as "Card Number".

localized_card_number_label

LocalizedString

Translated strings for the card_number_label.

class_template_info

ClassTemplateInfo

Template information about how the class should be displayed. If unset, Google will fallback to a default set of fields to display.

id

string

Required. The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

version
(deprecated)

int64

Deprecated

issuer_name

string

Required. The issuer name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.

messages[]

Message

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.

allow_multiple_users_per_object
(deprecated)

bool

Deprecated. Use multipleDevicesAndHoldersAllowedStatus instead.

homepage_uri

Uri

The URI of your application's home page. Populating the URI in this field results in the exact same behavior as populating an URI in linksModuleData (when an object is rendered, a link to the homepage is shown in what would usually be thought of as the linksModuleData section of the object).

locations[]

LatLongPoint

The list of locations where the object can be used. The platform uses this information to trigger geolocated notifications to users. Note that locations in the object override locations in the class which override locations in the Google Places ID.

review_status

ReviewStatus

Required. The status of the class. This field can be set to draft or underReview using the insert, patch, or update API calls. Once the review state is changed from draft it may not be changed back to draft.

You should keep this field to draft when the class is under development. A draft class cannot be used to create any object.

You should set this field to underReview when you believe the class is ready for use. The platform will automatically set this field to approved and it can be immediately used to create or migrate objects.

When updating an already approved class you should keep setting this field to underReview.

review

Review

The review comments set by the platform when a class is marked approved or rejected.

info_module_data
(deprecated)

InfoModuleData

Deprecated. Use textModulesData instead.

image_modules_data[]

ImageModuleData

Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.

text_modules_data[]

TextModuleData

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

redemption_issuers[]

int64

Available only to Smart Tap enabled partners. Contact support for additional guidance.

country_code

string

Country code used to display the card's country (when the user is not in that country), as well as to display localized content when content is not available in the user's locale.

hero_image

Image

Optional banner image displayed on the front of the card. If none is present, nothing will be displayed. The image will display at 100% width.

word_mark
(deprecated)

Image

Deprecated.

enable_smart_tap

bool

Available only to Smart Tap enabled partners. Contact support for additional guidance.

hex_background_color

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. The format is #rrggbb where rrggbb is a hex RGB triplet, such as #ffcc00. You can also use the shorthand version of the RGB triplet which is #rgb, such as #fc0.

localized_issuer_name

LocalizedString

Translated strings for the issuer_name. Recommended maximum length is 20 characters to ensure full string is displayed on smaller screens.

multiple_devices_and_holders_allowed_status

MultipleDevicesAndHoldersAllowedStatus

Identifies whether multiple users and devices will save the same object referencing this class.

callback_options

CallbackOptions

Callback options to be used to call the issuer back for every save/delete of an object for this class by the end-user. All objects of this class are eligible for the callback.

GiftCardClassAddMessageRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

add_message_request

AddMessageRequest

Body of the request.

GiftCardClassAddMessageResponse

Fields
resource

GiftCardClass

The updated GiftCardClass resource.

GiftCardClassGetRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

GiftCardClassInsertRequest

Fields
resource

GiftCardClass

Body of the request.

GiftCardClassListRequest

Fields
issuer_id

int64

The ID of the issuer authorized to list classes.

token

string

Used to get the next set of results if maxResults is specified, but more than maxResults classes are available in a list. For example, if you have a list of 200 classes and you call list with maxResults set to 20, list will return the first 20 classes and a token. Call list again with maxResults set to 20 and the token to get the next 20 classes.

max_results

int32

Identifies the max number of results returned by a list. All results are returned if maxResults isn't defined.

GiftCardClassListResponse

Fields
resources[]

GiftCardClass

Resources corresponding to the list request.

pagination

Pagination

Pagination of the response.

GiftCardClassPatchRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

GiftCardClass

Body of the request.

GiftCardClassUpdateRequest

Fields
resource_id

string

The unique identifier for a class. This ID must be unique across all classes from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

GiftCardClass

Body of the request.

GiftCardObject

Fields
kind
(deprecated)

string

Identifies what kind of resource this is. Value: the fixed string "walletobjects#giftCardObject".

class_reference

GiftCardClass

A copy of the inherited fields of the parent class. These fields are retrieved during a GET.

card_number

string

Required. The card's number.

pin

string

The card's PIN.

balance

Money

The card's monetary balance.

balance_update_time

DateTime

The date and time when the balance was last updated.

Offset is required.

If balance is updated and this property is not provided, system will default to the current time.

event_number

string

The card's event number, an optional field used by some gift cards.

id

string

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

class_id

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 issuer ID.identifier where the former is issued by Google and latter is chosen by you.

version
(deprecated)

int64

Deprecated

state

State

Required. 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.

barcode

Barcode

The barcode type and value.

messages[]

Message

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.

valid_time_interval

TimeInterval

The time period this object will be active and object can be used. An object's state will be changed to expired when this time period has passed.

locations[]

LatLongPoint

The list of locations where the object can be used. The platform uses this information to trigger geolocated notifications to users. Note that locations in the object override locations in the class which override locations in the Google Places ID.

has_users

bool

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

smart_tap_redemption_value

string

Available only to Smart Tap enabled partners. Contact support for additional guidance.

has_linked_device

bool

Whether this object is currently linked to a single device. This field is set by the platform when a user saves the object, linking it to their device. Intended for use by select partners. Contact support for additional information.

disable_expiration_notification

bool

Indicates if notifications should explicitly be suppressed. If this field is set to true, regardless of the messages field, expiration notifications to the user will be suppressed. By default, this field is set to false.

Currently, this can only be set for offers.

info_module_data

InfoModuleData

Deprecated. Use textModulesData instead.

image_modules_data[]

ImageModuleData

Image module data. The maximum number of these fields displayed is 1 from object level and 1 for class object level.

text_modules_data[]

TextModuleData

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

hero_image

Image

Optional banner image displayed on the front of the card. If none is present, hero image of the class, if present, will be displayed. If hero image of the class is also not present, nothing will be displayed.

GiftCardObjectAddMessageRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

add_message_request

AddMessageRequest

Body of the request.

GiftCardObjectAddMessageResponse

Fields
resource

GiftCardObject

The updated GiftCardObject resource.

GiftCardObjectGetRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

GiftCardObjectInsertRequest

Fields
resource

GiftCardObject

Body of the request.

GiftCardObjectListRequest

Fields
class_id

string

The ID of the class whose objects will be listed.

token

string

Used to get the next set of results if maxResults is specified, but more than maxResults objects are available in a list. For example, if you have a list of 200 objects and you call list with maxResults set to 20, list will return the first 20 objects and a token. Call list again with maxResults set to 20 and the token to get the next 20 objects.

max_results

int32

Identifies the max number of results returned by a list. All results are returned if maxResults isn't defined.

GiftCardObjectListResponse

Fields
resources[]

GiftCardObject

Resources corresponding to the list request.

pagination

Pagination

Pagination of the response.

GiftCardObjectPatchRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

GiftCardObject

Body of the request.

GiftCardObjectUpdateRequest

Fields
resource_id

string

The unique identifier for an object. This ID must be unique across all objects from an issuer. This value should follow the format issuer ID.identifier where the former is issued by Google and latter is chosen by you. Your unique identifier should only include alphanumeric characters, '.', '_', or '-'.

resource

GiftCardObject

Body of the request.