public static class CheckoutPreference.Builder
extends java.lang.Object
Constructor and Description |
---|
Builder(Site site,
OpenPayer payer,
java.util.List<Item> items)
Deprecated.
|
Builder(Site site,
java.lang.String payerEmail,
java.util.List<Item> items)
Builder for custom CheckoutPreference construction.
|
Modifier and Type | Method and Description |
---|---|
CheckoutPreference.Builder |
addExcludedPaymentMethod(java.lang.String paymentMethodId)
Add exclusion payment method id
If you exclude it, it's not going appear as a payment method available on checkout
|
CheckoutPreference.Builder |
addExcludedPaymentMethods(java.util.Collection<java.lang.String> paymentMethodIds)
Add exclusion list by payment method id
If you exclude it, it's not going appear as a payment method available on checkout
|
CheckoutPreference.Builder |
addExcludedPaymentType(java.lang.String paymentTypeId)
Add exclusion by payment type
If you exclude it, it's not going appear as a payment method available on checkout
|
CheckoutPreference.Builder |
addExcludedPaymentTypes(java.util.Collection<java.lang.String> paymentTypeIds)
Add exclusion list by payment type
If you exclude it, it's not going appear as a payment method available on checkout
|
CheckoutPreference |
build()
It creates the checkout preference.
|
CheckoutPreference.Builder |
setActiveFrom(java.util.Date date)
Date that indicates from when the preference is active.
|
CheckoutPreference.Builder |
setBinaryMode(boolean isBinaryMode)
If enableBinaryMode is called, processed payment can only be APPROVED or REJECTED.
|
CheckoutPreference.Builder |
setConceptAmount(java.math.BigDecimal conceptAmount)
internal usage
|
CheckoutPreference.Builder |
setConceptId(java.lang.String conceptId)
internal usage
|
CheckoutPreference.Builder |
setDefaultInstallments(java.lang.Integer defaultInstallments)
When default installments is not null
then this value will be forced as installment selected if it matches
with one provided by the Installments service.
|
CheckoutPreference.Builder |
setDifferentialPricing(DifferentialPricing differentialPricing)
Differential pricing configuration for this preference.
|
CheckoutPreference.Builder |
setExpirationDate(java.util.Date date)
Date that indicates when this preference expires.
|
CheckoutPreference.Builder |
setMarketplaceFee(java.math.BigDecimal marketplaceFee)
internal usage
|
CheckoutPreference.Builder |
setMaxInstallments(java.lang.Integer maxInstallments)
This value limits the amount of installments to be shown by the user.
|
CheckoutPreference.Builder |
setOperationType(java.lang.String operationType)
internal usage
|
CheckoutPreference.Builder |
setShippingCost(java.math.BigDecimal shippingCost)
internal usage
|
public Builder(@NonNull Site site, @NonNull java.lang.String payerEmail, @NonNull java.util.List<Item> items)
site
- preference site Sites.getById(String)
payerEmail
- payer emailitems
- items to pay@Deprecated public Builder(@NonNull Site site, @NonNull OpenPayer payer, @NonNull java.util.List<Item> items)
site
- preference site Sites.getById(String)
payer
- payeritems
- items to paypublic CheckoutPreference.Builder addExcludedPaymentMethod(@NonNull java.lang.String paymentMethodId)
paymentMethodId
- exclusion idPaymentMethods
public CheckoutPreference.Builder addExcludedPaymentMethods(@NonNull java.util.Collection<java.lang.String> paymentMethodIds)
paymentMethodIds
- exclusion listPaymentMethods
public CheckoutPreference.Builder addExcludedPaymentType(@NonNull java.lang.String paymentTypeId)
paymentTypeId
- exclusion typePaymentTypes
public CheckoutPreference.Builder addExcludedPaymentTypes(@NonNull java.util.Collection<java.lang.String> paymentTypeIds)
paymentTypeIds
- exclusion listPaymentTypes
public CheckoutPreference.Builder setBinaryMode(boolean isBinaryMode)
Non compatible with PaymentProcessor.
Non compatible with off payments methods
public CheckoutPreference.Builder setMaxInstallments(@Nullable java.lang.Integer maxInstallments)
maxInstallments
- max installments to be shownpublic CheckoutPreference.Builder setDefaultInstallments(@Nullable java.lang.Integer defaultInstallments)
defaultInstallments
- number of the value to be forcedpublic CheckoutPreference.Builder setExpirationDate(@Nullable java.util.Date date)
date
- creation date.public CheckoutPreference.Builder setActiveFrom(@Nullable java.util.Date date)
date
- creation date.public CheckoutPreference.Builder setDifferentialPricing(@Nullable DifferentialPricing differentialPricing)
differentialPricing
- differential pricing objectpublic CheckoutPreference.Builder setMarketplaceFee(java.math.BigDecimal marketplaceFee)
marketplaceFee
- amount feepublic CheckoutPreference.Builder setShippingCost(java.math.BigDecimal shippingCost)
shippingCost
- amount feepublic CheckoutPreference.Builder setOperationType(java.lang.String operationType)
operationType
- this operation can be ...public CheckoutPreference.Builder setConceptAmount(java.math.BigDecimal conceptAmount)
conceptAmount
- amountpublic CheckoutPreference.Builder setConceptId(java.lang.String conceptId)
conceptId
- identifierpublic CheckoutPreference build()