目录

CLASS info
public final class PassObject
Core class for constructing a JWT, which is used to create the JWT data source of loyalty cards, gift cards, and coupons. The cards and coupons are added to HUAWEI Wallet and presented as passes.

Nested Class Summary

TypeNameDesc
classPassObject.BuilderAssigns a value by using the builder method.

Public Method Summary

Return typeMethod name
static Builder

getBuilder()

Instantiates PassObject.Builder.

String

getPassTypeIdentifier()

Obtains the type of a pass.

String

getCurrencyCode()

Obtains the currency code of a pass.

ArrayList<AppendField>

getUrlList()

Obtains the URL list of a pass.

String

getPassStyleIdentifier()

Obtains the style of a pass.

String

getOrganizationPassId()

Obtains the ID of a pass.

PassStatus

getStatus()

Obtains the status of a pass.

ArrayList<RelatedPassInfo>

getRelatedPassIds()

Obtains the list of coupons linked with a pass.

ArrayList<Location>

getLocations()

Obtains the list of locations. A maximum of five locations are supported.

BarCode

getBarCode()

Obtains the barcode or QR code.

ArrayList<CommonField>

getCommonField()

Obtains the list of CommonField objects.

ArrayList<AppendField>

getAppendFields()

Obtains the list of AppendFields objects.

ArrayList<AppendField>

getMessageList()

Obtains the message list.

ArrayList<AppendField>

getImageList()

Obtains the list of recommended images.

ArrayList<AppendField>

getTextList()

Obtains the list of text information.

String

toJson()

Serves as the core of PassObject to generate a JSON string and convert it into the JWT data source.

Public Method

Method
public String getPassTypeIdentifier()
Obtains the type of a pass, which is indicated by passTypeIdentifier. This field is mandatory.

Return

Typedesc
StringPass type.
Method
public String getCurrencyCode ()
Obtains the currency code of a pass

Return

Typedesc
StringCurrency code
Method
public ArrayList<AppendField> getUrlList()
Obtains URL list of a pass

Return

Typedesc
ArrayList<AppendField>URL list
Method
public String getPassStyleIdentifier()
Obtains the style of a pass, which can be a loyalty card, gift card, or coupon. This field is mandatory.

Return

Typedesc
StringPass style.
Method
public String getOrganizationPassId()
Obtains the ID of a pass. This field is mandatory.

Return

Typedesc
StringPass ID.
Method
public String getSerialNumber()
Obtains the serial number (SN) of a pass, which uniquely identifies the pass on the server. This field is mandatory and can be the same as the pass ID.

Return

Typedesc
StringPass SN.
Method
public PassStatus getStatus()
Obtains the status of a pass.

Return

Typedesc
PassStatusPass status.
Method
public ArrayList<RelatedPassInfo> getRelatedPassIds()
Obtains the list of coupons linked with a pass.

Return

Typedesc
ArrayList<RelatedPassInfo>List of coupons linked with a pass.
Method
public ArrayList<Location> getLocationList()
Obtains geofence locations.

Return

Typedesc
ArrayList<Location>Geofence locations.
Method
public BarCode getBarCode()
Obtains the barcode or QR code.

Return

Typedesc
BarCodeBarcode or QR code.
Method
public ArrayList<CommonField> getCommonField()
Obtains the list of CommonField objects for constructing a pass.

Return

Typedesc
ArrayList<CommonField>List of CommonField objects.
Method
public ArrayListgetAppendFields()
Obtains the list of AppendField objects for constructing a pass.

Return

Typedesc
ArrayList<AppendField>List of AppendField objects.
Method
public ArrayList<AppendField> getMessageList()
Obtains the list of message objects for constructing a pass.

Return

Typedesc
ArrayList<AppendField>Message list.
Method
public ArrayListget<AppendField> ImageList()
Obtains the list of images for ad rotation.

Return

Typedesc
ArrayList<AppendField>Image list.
Method
public ArrayList<AppendField> getTextList()
Obtains the list of text information.

Return

Typedesc
ArrayList<AppendField>Text list.
Method
public String toJson()
Serves as the core of PassObject to generate a JSON string and convert it into the JWT data source.

Return

Typedesc
StringCharacter strings converted from PassObject as the JWT data source.
Method
public static PassObject.Builder getBuilder()
Instantiates PassObject.Builder.

Return

Typedesc
PassObject.BuilderPassObject object that is constructed by using the builder method.