WalletAvailability

Why a device-wallet button may or may not be drawn.

Deliberately four states and not a Boolean. A Boolean collapses three completely different situations — the merchant id was never provisioned, the hardware/OS cannot do wallets at all, and the user simply has no card in their wallet yet — into one "false" that the UI can only answer by hiding the button silently. Each of these wants a different response: a build-time error, nothing at all, and an "add a card" affordance respectively.

NOT_CONFIGURED is the state that exists because of the placeholder contract: while a __PROVISION_*__ sentinel is still in place the seam reports it, so the app refuses to draw a working-looking button that would fail at the exact moment money is on the line.

Entries

Link copied to clipboard

Wallet is usable right now: configured, supported, and at least one card is provisioned.

Link copied to clipboard

Device and config are fine, but the user has no card in the wallet. Offer "add a card".

Link copied to clipboard

This device/OS cannot present the wallet at all. Show nothing — there is no user action.

Link copied to clipboard

A provisioning value is still a sentinel. A developer error, never a user-facing state.

Companion properties

Link copied to clipboard

Returns an immutable kotlin.enums.EnumEntries list containing the constants of this enum type, in the order they're declared.

Companion functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.

Properties

Link copied to clipboard
expect val name: String
Link copied to clipboard
expect val ordinal: Int