OfferWalletObject.Builder

public final class OfferWalletObject.Builder extends Object

Builder to create a OfferWalletObject.

Public Method Summary

OfferWalletObject.Builder
addImageModuleDataMainImageUri(UriData uri)
Adds an image module data image uri.
OfferWalletObject.Builder
addImageModuleDataMainImageUris(Collection<UriData> uris)
Adds a collection of image module data image uris.
OfferWalletObject.Builder
addInfoModuleDataLabelValueRow(LabelValueRow row)
Adds an info module data label value row.
OfferWalletObject.Builder
addInfoModuleDataLabelValueRows(Collection<LabelValueRow> rows)
Adds a collection of info module data label value rows.
OfferWalletObject.Builder
addLinksModuleDataUri(UriData uri)
Add a links module data.
OfferWalletObject.Builder
addLinksModuleDataUris(Collection<UriData> uris)
Adds a collection of links module data.
OfferWalletObject.Builder
addLocation(LatLng location)
Adds the location where the Wallet Object can be used.
OfferWalletObject.Builder
addLocations(Collection<LatLng> locations)
Adds the collection of locations where the Wallet Object can be used.
OfferWalletObject.Builder
addMessage(WalletObjectMessage message)
Adds a message to be associated with this object.
OfferWalletObject.Builder
addMessages(Collection<WalletObjectMessage> messages)
Adds a collection of messages to be associated with this object.
OfferWalletObject.Builder
addTextModuleData(TextModuleData data)
Adds a text module data.
OfferWalletObject.Builder
addTextModulesData(Collection<TextModuleData> data)
Adds a collection of text modules data.
OfferWalletObject
OfferWalletObject.Builder
setBarcodeAlternateText(String barcodeAlternateText)
OfferWalletObject.Builder
setBarcodeLabel(String barcodeLabel)
This method is deprecated. This value is unused by the platform and will be removed in the future.
OfferWalletObject.Builder
setBarcodeType(String barcodeType)
Sets the type of the barcode.
OfferWalletObject.Builder
setBarcodeValue(String barcodeValue)
Sets the value encoded in the barcode.
OfferWalletObject.Builder
setClassId(String classId)
Sets the id of the class associated with this object.
OfferWalletObject.Builder
OfferWalletObject.Builder
setInfoModuleDataHexBackgroundColor(String color)
This method is deprecated. This value is unused by the platform and will be removed in the future.
OfferWalletObject.Builder
setInfoModuleDataHexFontColor(String color)
This method is deprecated. This value is unused by the platform and will be removed in the future.
OfferWalletObject.Builder
setInfoModuleDataShowLastUpdateTime(boolean show)
Sets the flag which determines whether to display the last update time of the Wallet Object.
OfferWalletObject.Builder
setIssuerName(String issuerName)
Sets the issuer name of this offer object.
OfferWalletObject.Builder
setRedemptionCode(String redemptionCode)
Sets the redemption code of the offer wallet object.
OfferWalletObject.Builder
setState(int state)
Sets offer object state.
OfferWalletObject.Builder
setTitle(String title)
Sets the offer title.
OfferWalletObject.Builder
setValidTimeInterval(TimeInterval interval)
Sets the time period this object will be active and can be used.

Inherited Method Summary

Public Methods

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject.Builder addInfoModuleDataLabelValueRow (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.

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject.Builder addMessage (WalletObjectMessage message)

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

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject.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.

public OfferWalletObject build ()

public OfferWalletObject.Builder setBarcodeAlternateText (String barcodeAlternateText)

public OfferWalletObject.Builder setBarcodeLabel (String barcodeLabel)

This method is deprecated.
This value is unused by the platform and will be removed in the future.

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

public OfferWalletObject.Builder setBarcodeType (String barcodeType)

Sets the type of the barcode.

Acceptable values are:

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

public OfferWalletObject.Builder setBarcodeValue (String barcodeValue)

Sets the value encoded in the barcode.

public OfferWalletObject.Builder setClassId (String classId)

Sets the id of the class associated with this object.

public OfferWalletObject.Builder setId (String id)

public OfferWalletObject.Builder setInfoModuleDataHexBackgroundColor (String color)

This method is deprecated.
This value is unused by the platform and will be removed in the future.

Sets the background color for the Info Module.

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

public OfferWalletObject.Builder setInfoModuleDataHexFontColor (String color)

This method is deprecated.
This value is unused by the platform and will be removed in the future.

Sets the color for the font in this Info Module.

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

public OfferWalletObject.Builder setInfoModuleDataShowLastUpdateTime (boolean show)

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

public OfferWalletObject.Builder setIssuerName (String issuerName)

Sets the issuer name of this offer object.

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

public OfferWalletObject.Builder setRedemptionCode (String redemptionCode)

Sets the redemption code of the offer wallet object.

Parameters
redemptionCode The redemption code of the offer wallet object.

public OfferWalletObject.Builder setState (int state)

Sets offer object state.

Supported states are defined by WalletObjectsConstants.State

public OfferWalletObject.Builder setTitle (String title)

Sets the offer title.

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

public OfferWalletObject.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.