@Immutable @LevelUpApi(contract=INTERNAL) public final class PaymentPreferencesV3 extends PaymentPreferences
This class may be used to encode and parse version 3 payment preferences. In version 3, payment preferences are represented as an 8 character code which consists of four sections, each of which is encoded in base 36. A typical payment preferences code:
030002LU
Each section has a specific length prescribed to it. When necessary, leading zeros may be added
to a section to ensure that it conforms to this length. The following is a description of each
section, using 030002LU as an example:
Percentage tip values are assigned to base 36 values ranging from 000 through 0ZZ. This range can represent percentage values from 0% through 1295%.
US cent tip values are assigned to base 36 values ranging from 100 through ZZZ. This range can represent US cent values from $0.00 through $453.59.
COLOR_UNKNOWN, mPaymentPreferences| Modifier | Constructor and Description |
|---|---|
protected |
PaymentPreferencesV3(String paymentPreferences) |
| Modifier and Type | Method and Description |
|---|---|
protected int |
getColor()
Subclasses must implement this to return the color index parsed or
PaymentPreferences.COLOR_UNKNOWN. |
getColorPreferenceprotected PaymentPreferencesV3(String paymentPreferences)
paymentPreferences - the preference string.protected int getColor()
PaymentPreferencesPaymentPreferences.COLOR_UNKNOWN.getColor in class PaymentPreferencesPaymentPreferences.COLOR_UNKNOWN if none could be parsed.