目录

CLASS info
public final class PassObject.Builder
Assigns the PassObject value by using the builder method.

Public Method Summary

Return typeMethod name
PassObject.Builder

setPassTypeIdentifier(String passTypeIdentifier)

Sets the type of a pass.

PassObject.Builder

setCurrencyCode(String currencyCode)

Sets the currency code of a pass

PassObject.Builder

addUrlList(Collection<AppendField> urlList)

Sets the URL list of a pass

PassObject.Builder

setPassStyleIdentifier(String passStyleIdentifier)

Sets the style of a pass

PassObject.Builder

setOrganizationPassId(String organizationPassId)

Sets the unique identifier (such as number) of a pass, which is specified by the issuer. 

This field is mandatory.

PassObject.Builder

setSerialNumber(String serialNumber)

Sets the SN of a pass.

PassObject.Builder

setStatus(PassStatus status)

Sets the status of a pass.

PassObject.Builder

addRelatedPassIds(Collection<RelatedPassInfo> relatedPassInfos)

Adds a list of coupon IDs related to the loyalty card.

PassObject.BuilderaddLocationList(Collection<Location> locationList)
PassObject.BuildersetBarCode(BarCode barCode)
PassObject.Builder

addCommonFields(Collection<CommonField> commonFields)

Adds the CommonField information.

PassObject.Builder

addAppendFields(Collection<AppendField> appendFieldList)

Adds the AppendField information.

PassObject.Builder

addMessageList(Collection<AppendField> messageList)

Adds the message list.

PassObject.Builder

addImageList(Collection<AppendField> imageList)

Adds the list of images for ad rotation.

PassObject.Builder

addTextList(Collection<AppendField> textList)

Adds the list of text information.

PassObject

build()

Obtains the PassObject instance after value assignment.

Public Method

Method
public PassObject.Builder setPassTypeIdentifier(String passTypeIdentifier)
Sets the type of a pass, which is indicated by passTypeIdentifier. This field is mandatory and available for loyalty cards, gift cards, and coupons. Register passTypeIdentifier by referring to the Development Guide.

Parameters

Typedesc
StringPass type.
Method


public PassObject.Builder setCurrencyCode(String currencyCode)

Sets the currency code of a pass. This field is optional and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
StringCurrency code.
Method


public PassObject.Builder addUrlList (Collection<AppendField> urlList)

Sets the URL list of a pass. This field is optional and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
Collection<AppendField>List of URLs
Method


public PassObject.Builder setPassStyleIdentifier(String passStyleIdentifier)

Sets the style of a pass. This field is mandatory and available for loyalty cards, gift cards, and coupons. Register passStyleIdentifier by referring to the Development Guide.

Parameters

Typedesc
StringPass style.
Method


public PassObject.Builder setOrganizationPassId(String organizationPassId)

Sets the unique identifier (such as number) of a pass, which is specified by the issuer. This field is mandatory and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
StringPass ID.
Method


public PassObject.Builder setSerialNumber(String serialNumber)

Sets the SN of a pass, which uniquely identifies the pass on the server. The value can be the same as that of organizationPassId. This field is mandatory and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
StringPass SN.
Method


public Builder setStatus(PassStatus status)

Sets the status of a pass. For details, please refer to PassStatus. This field is mandatory and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
PassStatusPass status.
Method


public PassObject.Builder addRelatedPassIds(Collection<RelatedPassInfo> relatedPassInfos)

Sets the IDs of coupons linked with a loyalty card. This field is optional and available only for loyalty cards.

Parameters

Typedesc
Collection<RelatedPassInfo>IDs of coupons linked with the loyalty card.
Method


public PassObject.Builder addLocationList(Collection<Location> locationList)

Sets the location of a pass. It is recommended that at most five locations be set. This field is optional and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
Collection<Location>Location of a pass.
Method


public PassObject.Builder setBarCode(BarCode barCode)

Sets the barcode or QR code of a pass. This field is optional and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
BarCodeBarcode or QR code of a pass.
Method


public PassObject.Builder addCommonFields(Collection<CommonField>commonFields)

Adds the CommonField information.Example: 

   CommonField logoField = CommonField.getBuilder() 

                       .setKey(WalletPassConstant. PASS_COMMON_FIELD_KEY_LOGO)

                        .setLabel(“Logo on the card”)

                        .setValue(“https://xxx.jpg“)

                       .build();

ArrayList commonFields = new ArrayList();

commonFields.add(logoField);

For details about the CommonField of different passes, please refer to the Development Guide.

Parameters

Typedesc
Collection<CommonField>List of CommonField objects.
Method


public PassObject.Builder addAppendFields(Collection< AppendField > AppendFields)

Adds the AppendField information.Example:  

  AppendField logoField = AppendField.getBuilder() 

                       .setKey(WalletPassConstant. PASS_APPEND_FIELD_KEY_MAINPAGE) 

                       .setLabel(“key of the main page value in append fields “)  

                      .setValue(“https://xxx.com“) 

                       .build();

ArrayList AppendFields = new ArrayList();AppendFields.add(logoField);

For details about the AppendField of different passes, please refer to the Development Guide.

Parameters

Typedesc
Collection< AppendField >List of AppendField objects.
Method


public Builder addMessageList(Collection<AppendField> messageList)

Sets the message list of a pass.This field is optional and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
Collection<AppendField>Message list of a pass.
Method


public PassObject.Builder addImageList(Collection<AppendField> imageList)

Sets the list of pass images for ad rotation.This field is optional and available for loyalty cards, gift cards, and coupons.


Parameters

Typedesc
Collection<AppendField>List of pass images for ad rotation.
Method


public PassObject.Builder addTextList(Collection<AppendField> textList)

Sets the text information of a pass.This field is optional and available for loyalty cards, gift cards, and coupons.

Parameters

Typedesc
Collection<AppendField>Text information of a pass.
Method


public PassObject build()

Gets the PassObject instance after value assignment.

Return

Typedesc
PassObjectPassObject instance.