# Class WalletPassEntry

java.lang.Object
com.codename1.payment.WalletPassEntry

public class WalletPassEntry extends Object

A card entry published to the Apple Wallet issuer-provisioning extension through `WalletExtension`. Each entry describes one card the user can add to Apple Wallet from inside the Wallet app.

The `identifier` must match the card's primary account identifier known to the issuer backend; Wallet uses it to filter out cards that are already provisioned on the device, and it is echoed back to the issuer endpoint when the user adds the card.

The card art must be a PNG without personally identifiable information (Apple requirement: square corners, no PII such as the full card number).

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WalletPassEntry()`
  Creates a blank entry; populate it with the fluent setters.
  `WalletPassEntry(String identifier, String title, byte[] artPng)`
  Creates an entry with the required fields.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `WalletPassEntry`
  `artPng(byte[] artPng)`
  Sets the PNG bytes of the card art, e.g.
  `WalletPassEntry`
  `cardholderName(String cardholderName)`
  Sets the cardholder name shown during provisioning.
  `byte[]`
  `getArtPng()`
  Returns the PNG bytes of the card art.
  `String`
  `getCardholderName()`
  Returns the cardholder name.
  `String`
  `getIdentifier()`
  Returns the card's primary account identifier.
  `String`
  `getLocalizedDescription()`
  Returns the description shown during provisioning.
  `String`
  `getPaymentNetwork()`
  Returns the payment network.
  `String`
  `getPrimaryAccountSuffix()`
  Returns the last digits of the card number.
  `String`
  `getTitle()`
  Returns the user visible card title.
  `WalletPassEntry`
  `identifier(String identifier)`
  Sets the card's primary account identifier.
  `WalletPassEntry`
  `localizedDescription(String localizedDescription)`
  Sets the description shown during provisioning, e.g.
  `WalletPassEntry`
  `paymentNetwork(String paymentNetwork)`
  Sets the payment network, e.g.
  `WalletPassEntry`
  `primaryAccountSuffix(String primaryAccountSuffix)`
  Sets the last digits of the card number shown during provisioning, e.g.
  `WalletPassEntry`
  `title(String title)`
  Sets the user visible card title shown in Wallet.

  ### Methods inherited from class Object

  `clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### WalletPassEntry

    public WalletPassEntry()
    Creates a blank entry; populate it with the fluent setters.

  - ### WalletPassEntry

    public WalletPassEntry(String identifier, String title, byte[] artPng)

    Creates an entry with the required fields.

    ###### Parameters

    - `identifier`: the card's primary account identifier

    - `title`: user visible card title shown in Wallet

    - `artPng`: PNG bytes of the card art, e.g. `EncodedImage.getImageData()`

- ## Method Details

  - ### identifier

    public WalletPassEntry identifier(String identifier)
    Sets the card's primary account identifier. Required.

  - ### title

    public WalletPassEntry title(String title)
    Sets the user visible card title shown in Wallet. Required.

  - ### cardholderName

    public WalletPassEntry cardholderName(String cardholderName)
    Sets the cardholder name shown during provisioning.

  - ### primaryAccountSuffix

    public WalletPassEntry primaryAccountSuffix(String primaryAccountSuffix)
    Sets the last digits of the card number shown during provisioning, e.g. `"1234"`.

  - ### paymentNetwork

    public WalletPassEntry paymentNetwork(String paymentNetwork)
    Sets the payment network, e.g. `"Visa"` or `"MasterCard"`. Must match one of Apple's `PKPaymentNetwork` constant values.

  - ### localizedDescription

    public WalletPassEntry localizedDescription(String localizedDescription)
    Sets the description shown during provisioning, e.g. `"My Bank Debit Card"`.

  - ### artPng

    public WalletPassEntry artPng(byte[] artPng)
    Sets the PNG bytes of the card art, e.g. `EncodedImage.getImageData()`. Required; entries without art are not shown by Wallet.

  - ### getIdentifier

    public String getIdentifier()
    Returns the card's primary account identifier.

  - ### getTitle

    public String getTitle()
    Returns the user visible card title.

  - ### getCardholderName

    public String getCardholderName()
    Returns the cardholder name.

  - ### getPrimaryAccountSuffix

    public String getPrimaryAccountSuffix()
    Returns the last digits of the card number.

  - ### getPaymentNetwork

    public String getPaymentNetwork()
    Returns the payment network.

  - ### getLocalizedDescription

    public String getLocalizedDescription()
    Returns the description shown during provisioning.

  - ### getArtPng

    public byte[] getArtPng()
    Returns the PNG bytes of the card art.