GiftCardWalletObject.Builder

public final class GiftCardWalletObject.Builder extends Object

Builder for GiftCardWalletObject.

Public Method Summary

GiftCardWalletObject.Builder
addImageModuleDataMainImageUri(UriData uri)
Adds an image module data image uri.
GiftCardWalletObject.Builder
addImageModuleDataMainImageUris(Collection<UriData> uris)
Adds a collection of image module data image uris.
GiftCardWalletObject.Builder
addInfoModuleDataLabelValueRow(LabelValueRow row)
Adds an info module data label value row.
GiftCardWalletObject.Builder
addInfoModuleDataLabelValueRows(Collection<LabelValueRow> rows)
Adds a collection of info module data label value rows.
GiftCardWalletObject.Builder
addLinksModuleDataUri(UriData uri)
Add a links module data.
GiftCardWalletObject.Builder
addLinksModuleDataUris(Collection<UriData> uris)
Adds a collection of links module data.
GiftCardWalletObject.Builder
addLocation(LatLng location)
Adds the location where the Wallet Object can be used.
GiftCardWalletObject.Builder
addLocations(Collection<LatLng> locations)
Adds the collection of locations where the Wallet Object can be used.
GiftCardWalletObject.Builder
addMessage(WalletObjectMessage message)
Adds a message to be associated with this object.
GiftCardWalletObject.Builder
addMessages(Collection<WalletObjectMessage> messages)
Adds a collection of messages to be associated with this object.
GiftCardWalletObject.Builder
addTextModuleData(TextModuleData data)
Adds a text module data.
GiftCardWalletObject.Builder
addTextModulesData(Collection<TextModuleData> data)
Adds a collection of text modules data.
GiftCardWalletObject
GiftCardWalletObject.Builder
setBalanceCurrencyCode(String currencyCode)
Set the currency code for the current value of the gift card.
GiftCardWalletObject.Builder
setBalanceMicros(long valueMicros)
Sets the amount in the card balance, value represents micros.
GiftCardWalletObject.Builder
setBalanceUpdateTime(long balanceUpdateTimeStamp)
Sets a value indicating when was this card last updated, value represents milliseconds in UNIX epoch.
GiftCardWalletObject.Builder
setBarcodeAlternateText(String barcodeAlternateText)
GiftCardWalletObject.Builder
setBarcodeLabel(String barcodeLabel)
This method is deprecated. This value is unused by the platform and will be removed in the future.
GiftCardWalletObject.Builder
setBarcodeType(String barcodeType)
Sets the type of the barcode.
GiftCardWalletObject.Builder
setBarcodeValue(String barcodeValue)
Sets the value encoded in the barcode.
GiftCardWalletObject.Builder
setCardIdentifier(String cardIdentifier)
This method is deprecated. This value is unused by the platform and will be removed in the future.
GiftCardWalletObject.Builder
setCardNumber(String cardNumber)
Sets the number identifying this card.
GiftCardWalletObject.Builder
setClassId(String classId)
Sets the id of the class associated with this object.
GiftCardWalletObject.Builder
setEventNumber(String eventNumber)
The card's event number, an optional field used by some gift cards.
GiftCardWalletObject.Builder
GiftCardWalletObject.Builder
setInfoModuleDataHexBackgroundColor(String color)
This method is deprecated. This value is unused by the platform and will be removed in the future.
GiftCardWalletObject.Builder
setInfoModuleDataHexFontColor(String color)
This method is deprecated. This value is unused by the platform and will be removed in the future.
GiftCardWalletObject.Builder
setInfoModuleDataShowLastUpdateTime(boolean show)
Sets the flag which determines whether to display the last update time of the Wallet Object.
GiftCardWalletObject.Builder
setIssuerName(String issuerName)
Sets the issuer name of this gift card object.
GiftCardWalletObject.Builder
setPin(String pin)
Sets the card PIN.
GiftCardWalletObject.Builder
setState(int state)
Sets gift card object state.
GiftCardWalletObject.Builder
setTitle(String title)
Sets the gift card title.
GiftCardWalletObject.Builder
setValidTimeInterval(TimeInterval interval)
Sets the time period this object will be active and can be used.

Inherited Method Summary

Public Methods

public GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject build ()

public GiftCardWalletObject.Builder setBalanceCurrencyCode (String currencyCode)

Set the currency code for the current value of the gift card.

Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.Builder setBalanceMicros (long valueMicros)

Sets the amount in the card balance, value represents micros.

Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.Builder setBalanceUpdateTime (long balanceUpdateTimeStamp)

Sets a value indicating when was this card last updated, value represents milliseconds in UNIX epoch.

Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.Builder setBarcodeAlternateText (String barcodeAlternateText)

public GiftCardWalletObject.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 "GIFT CARD CODE" or "MEMBER ID."

public GiftCardWalletObject.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 GiftCardWalletObject.Builder setBarcodeValue (String barcodeValue)

Sets the value encoded in the barcode.

public GiftCardWalletObject.Builder setCardIdentifier (String cardIdentifier)

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

Sets the vendor assigned gift card identifier.

Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.Builder setCardNumber (String cardNumber)

Sets the number identifying this card.

Parameters
cardNumber The card number, this field is required.
Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.Builder setClassId (String classId)

Sets the id of the class associated with this object.

public GiftCardWalletObject.Builder setEventNumber (String eventNumber)

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

Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.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 GiftCardWalletObject.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 GiftCardWalletObject.Builder setInfoModuleDataShowLastUpdateTime (boolean show)

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

public GiftCardWalletObject.Builder setIssuerName (String issuerName)

Sets the issuer name of this gift card object.

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

public GiftCardWalletObject.Builder setPin (String pin)

Sets the card PIN.

Returns
  • A reference to the object invoking the method to enable a fluent interface.

public GiftCardWalletObject.Builder setState (int state)

Sets gift card object state.

Supported states are defined by WalletObjectsConstants.State

public GiftCardWalletObject.Builder setTitle (String title)

Sets the gift card title.

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

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