public static final class TipSettings.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
TipSettings |
build()
Creates a new immutable
TipSettings object, copying the attributes from this builder. |
TipSettings.Builder |
showCustomTipField(boolean showCustomTipField)
Indicates whether custom tip amounts are allowed during the checkout flow.
|
TipSettings.Builder |
showSeparateTipScreen(boolean showSeparateTipScreen)
Indicates whether tip options should be presented on their own screen before presenting
the
signature screen during credit card transactions.
|
TipSettings.Builder |
tipPercentages(int... tipPercentages)
A list of tip percentages that should be presented during the checkout flow.
|
TipSettings.Builder |
tipPercentages(java.util.List<java.lang.Integer> tipPercentages) |
@NonNull public TipSettings.Builder showCustomTipField(boolean showCustomTipField)
Indicates whether custom tip amounts are allowed during the checkout flow.
Defaults to disabled.
showCustomTipField
- true to allow custom tip amounts, false otherwise.@NonNull public TipSettings.Builder showSeparateTipScreen(boolean showSeparateTipScreen)
Indicates whether tip options should be presented on their own screen before presenting the signature screen during credit card transactions.
Defaults to true.
showSeparateTipScreen
- true to show tip options on a separate screen, false otherwise.@NonNull public TipSettings.Builder tipPercentages(@NonNull int... tipPercentages)
A list of tip percentages that should be presented during the checkout flow. Specified as up to 3 positive integers from 1 to 100 (inclusive).
Defaults to [15, 20, 25], which corresponds to tip percentages of 15%, 20%, and 25%.
tipPercentages
- Custom tip percentages.@NonNull public TipSettings.Builder tipPercentages(@NonNull java.util.List<java.lang.Integer> tipPercentages)
tipPercentages(int...)
@NonNull public TipSettings build()
TipSettings
object, copying the attributes from this builder.