ActivePerksGiftCardBalance

data class ActivePerksGiftCardBalance(val balance: String?, val message: String?, val errorCode: Int, val isSuccess: Boolean)

Live balance of one gift card in the member's ActivePerks wallet.

A thrown AFException means the request itself failed (HTTP error, network, decode); this type is only returned for HTTP 200 responses, where the merchant still reports a per-operation errorCode. Read both: a 200 with a non-zero errorCode is a failed lookup, and balance is then null.

Constructors

Link copied to clipboard
constructor(balance: String?, message: String?, errorCode: Int, isSuccess: Boolean)

Properties

Link copied to clipboard

The merchant's own formatted balance string (for example "25.00"), or null when the lookup failed. Never a number - merchants format it themselves.

Link copied to clipboard

Per-operation code; 0 means the balance is real.

Link copied to clipboard

errorCode == 0.

Link copied to clipboard

Merchant or gateway message, or null.