public static final class PaymentConfiguration.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(PaymentProcessor paymentProcessor) |
Modifier and Type | Method and Description |
---|---|
PaymentConfiguration.Builder |
addChargeRules(java.util.Collection<ChargeRule> charges)
Add extra charges that will apply to total amount.
|
PaymentConfiguration.Builder |
addPaymentMethodPlugin(PaymentMethodPlugin paymentMethodPlugin)
Add your own payment method option to pay.
|
PaymentConfiguration |
build() |
PaymentConfiguration.Builder |
setDiscountConfiguration(DiscountConfiguration discountConfiguration)
DiscountConfiguration is an object that represents
the discount to be applied or error information to present to the user. |
public Builder(@NonNull PaymentProcessor paymentProcessor)
paymentProcessor
- your custom payment processor.public PaymentConfiguration.Builder addPaymentMethodPlugin(@NonNull PaymentMethodPlugin paymentMethodPlugin)
paymentMethodPlugin
- your payment method plugin.public PaymentConfiguration.Builder addChargeRules(@NonNull java.util.Collection<ChargeRule> charges)
charges
- the list of charges that could apply.public PaymentConfiguration.Builder setDiscountConfiguration(@NonNull DiscountConfiguration discountConfiguration)
DiscountConfiguration
is an object that represents
the discount to be applied or error information to present to the user.
it's mandatory to handle your discounts by hand if you set a payment processor.
discountConfiguration
- your custom discount configuration@NonNull public PaymentConfiguration build()