LoyaltyWalletObject.Builder | Doclava
public final class

LoyaltyWalletObject.Builder

extends Object
java.lang.Object
   ↳ com.google.android.gms.wallet.LoyaltyWalletObject.Builder

Class Overview

Builder to create a LoyaltyWalletObject.

Summary

Public Methods
LoyaltyWalletObject.Builder addImageModuleDataMainImageUri(UriData uri)
Adds an image module data image uri.
LoyaltyWalletObject.Builder addImageModuleDataMainImageUris(Collection<UriData> uris)
Adds a collection of image module data image uris.
LoyaltyWalletObject.Builder addInfoModuleDataLabeValueRow(LabelValueRow row)
Adds an info module data label value row.
LoyaltyWalletObject.Builder addInfoModuleDataLabelValueRows(Collection<LabelValueRow> rows)
Adds a collection of info module data label value rows.
LoyaltyWalletObject.Builder addLinksModuleDataUri(UriData uri)
Add a links module data.
LoyaltyWalletObject.Builder addLinksModuleDataUris(Collection<UriData> uris)
Adds a collection of links module data.
LoyaltyWalletObject.Builder addLocation(LatLng location)
Adds the location where the Wallet Object can be used.
LoyaltyWalletObject.Builder addLocations(Collection<LatLng> locations)
Adds the collection of locations where the Wallet Object can be used.
LoyaltyWalletObject.Builder addMessage(WalletObjectMessage message)
Adds a message to be associated with this object.
LoyaltyWalletObject.Builder addMessages(Collection<WalletObjectMessage> messages)
Adds a collection of messages to be associated with this object.
LoyaltyWalletObject.Builder addTextModuleData(TextModuleData data)
Adds a text module data.
LoyaltyWalletObject.Builder addTextModulesData(Collection<TextModuleData> data)
Adds a collection of text modules data.
LoyaltyWalletObject build()
LoyaltyWalletObject.Builder setAccountId(String accountId)
LoyaltyWalletObject.Builder setAccountName(String accountName)
LoyaltyWalletObject.Builder setBarcodeAlternateText(String barcodeAlternateText)
LoyaltyWalletObject.Builder setBarcodeLabel(String barcodeLabel)
Sets the barcode label describing the contents of the barcode, such as "OFFER CODE" or "MEMBER ID."
LoyaltyWalletObject.Builder setBarcodeType(String barcodeType)
Sets the type of the barcode.
LoyaltyWalletObject.Builder setBarcodeValue(String barcodeValue)
Sets the value encoded in the barcode.
LoyaltyWalletObject.Builder setClassId(String classId)
Sets the id of the class associated with this object.
LoyaltyWalletObject.Builder setId(String id)
LoyaltyWalletObject.Builder setInfoModuleDataHexBackgroundColor(String color)
Sets the background color for the Info Module.
LoyaltyWalletObject.Builder setInfoModuleDataHexFontColor(String color)
Sets the color for the font in this Info Module.
LoyaltyWalletObject.Builder setInfoModuleDataShowLastUpdateTime(boolean show)
Sets the flag which determines whether to display the last update time of the Wallet Object.
LoyaltyWalletObject.Builder setIssuerName(String issuerName)
Sets the issuer name of this loyalty program.
LoyaltyWalletObject.Builder setLoyaltyPoints(LoyaltyPoints loyaltyPoints)
Sets the loyalty reward points.
LoyaltyWalletObject.Builder setProgramName(String programName)
Sets the loyalty program name.
LoyaltyWalletObject.Builder setState(int state)
Sets loyalty wallet object state.
LoyaltyWalletObject.Builder setValidTimeInterval(TimeInterval interval)
Sets the time period this object will be active and can be used.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public LoyaltyWalletObject.Builder addImageModuleDataMainImageUri (UriData uri)

Adds an image module data image uri.

If image modules data is also defined on the class, the ones defined here on the object will be displayed first, followed by those defined on the class.

Parameters
uri UriData
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addImageModuleDataMainImageUris (Collection<UriData> uris)

Adds a collection of image module data image uris.

If image modules data is also defined on the class, the ones defined here on the object will be displayed first, followed by those defined on the class.

Parameters
uris Collection
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addInfoModuleDataLabeValueRow (LabelValueRow row)

Adds an info module data label value row.

If info module data is also defined on the class, the one defined here on the object will be displayed first, followed by the one defined on the class.

Parameters
row LabelValueRow
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addInfoModuleDataLabelValueRows (Collection<LabelValueRow> rows)

Adds a collection of info module data label value rows.

If info module data is also defined on the class, the one defined here on the object will be displayed first, followed by the one defined on the class.

Parameters
rows Collection
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addLinksModuleDataUri (UriData uri)

Add a links module data.

If links module data is also defined on the class, the one defined here on the object will be displayed first, followed by those defined on the class.

Parameters
uri UriData
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addLinksModuleDataUris (Collection<UriData> uris)

Adds a collection of links module data.

If links module data is also defined on the class, the one defined here on the object will be displayed first, followed by those defined on the class.

Parameters
uris Collection
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addLocation (LatLng location)

Adds the location where the Wallet Object can be used.

The Wallet Object 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.

Parameters
location LatLng
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addLocations (Collection<LatLng> locations)

Adds the collection of locations where the Wallet Object can be used.

The Wallet Object 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.

Parameters
locations Collection
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addMessage (WalletObjectMessage message)

Adds a message to be associated with this object. All users of this Wallet Object will receive its associated messages.

Parameters
message WalletObjectMessage
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addMessages (Collection<WalletObjectMessage> messages)

Adds a collection of messages to be associated with this object. All users of this Wallet Object will receive its associated messages.

Parameters
messages Collection
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addTextModuleData (TextModuleData data)

Adds a text module data.

If text module data is also defined on the class, the ones defined here on the object will be displayed first, followed by those defined on the class.

Parameters
data TextModuleData
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder addTextModulesData (Collection<TextModuleData> data)

Adds a collection of text modules data.

If text module data is also defined on the class, the ones defined here on the object will be displayed first, followed by those defined on the class.

Parameters
data Collection
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject build ()

public LoyaltyWalletObject.Builder setAccountId (String accountId)

Parameters
accountId String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setAccountName (String accountName)

Parameters
accountName String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setBarcodeAlternateText (String barcodeAlternateText)

Parameters
barcodeAlternateText String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setBarcodeLabel (String barcodeLabel)

Sets the barcode label describing the contents of the barcode, such as "OFFER CODE" or "MEMBER ID."

Parameters
barcodeLabel String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setBarcodeType (String barcodeType)

Sets the type of the barcode.

Acceptable values are:

  • "aztec"
  • "codabar"
  • "code128"
  • "code39"
  • "dataMatrix"
  • "ean13"
  • "ean8"
  • "itf14"
  • "pdf417"
  • "pdf417Compact"
  • "qrCode"
  • "textOnly"
  • "unknownFormat"
  • "upcA"
  • "upcE"

public LoyaltyWalletObject.Builder setBarcodeValue (String barcodeValue)

Sets the value encoded in the barcode.

Parameters
barcodeValue String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setClassId (String classId)

Sets the id of the class associated with this object.

Parameters
classId String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setId (String id)

Parameters
id String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setInfoModuleDataHexBackgroundColor (String color)

Sets the background color for the Info Module.

The format is #hhhhhh where h is a hex digit.

Parameters
color String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setInfoModuleDataHexFontColor (String color)

Sets the color for the font in this Info Module.

The format is #hhhhhh where h is a hex digit.

Parameters
color String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setInfoModuleDataShowLastUpdateTime (boolean show)

Sets the flag which determines whether to display the last update time of the Wallet Object.

Parameters
show boolean
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setIssuerName (String issuerName)

Sets the issuer name of this loyalty program.

This field is required and should match issuer name specified for the corresponding loyalty class of the loyalty object being created. It will be displayed to the user in the accepting loyalty program confirmation screen.

Parameters
issuerName String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setLoyaltyPoints (LoyaltyPoints loyaltyPoints)

Sets the loyalty reward points.

Parameters
loyaltyPoints LoyaltyPoints
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setProgramName (String programName)

Sets the loyalty program name.

This field is required and should match program name specified for the corresponding loyalty class of the loyalty object being created. It will be displayed to the user in the accepting loyalty program confirmation screen.

Parameters
programName String
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setState (int state)

Sets loyalty wallet object state.

Supported states are defined by WalletObjectsConstants.State

Parameters
state int
Returns
LoyaltyWalletObject.Builder

public LoyaltyWalletObject.Builder setValidTimeInterval (TimeInterval interval)

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

Parameters
interval TimeInterval
Returns
LoyaltyWalletObject.Builder