Class RecurringPaymentConfigurationBuilder
- All Implemented Interfaces:
Builder<RecurringPaymentConfiguration>
Example to create an instance using the builder pattern
RecurringPaymentConfiguration recurringPaymentConfiguration = RecurringPaymentConfiguration.builder()
.paymentStrategy(PaymentStrategy.CHECKOUT)
.plusPaymentAllocations(paymentAllocationsBuilder -> paymentAllocationsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocation> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.build()builds RecurringPaymentConfiguration with checking for non-null required valuesbuilds RecurringPaymentConfiguration without checking for non-null required valuesPayment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.Determines how payment is collected for the Orders generated by the Recurring Order.of()factory method for an instance of RecurringPaymentConfigurationBuilderof(RecurringPaymentConfiguration template) create builder for RecurringPaymentConfiguration instancepaymentAllocations(RecurringPaymentAllocation... paymentAllocations) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.paymentAllocations(List<RecurringPaymentAllocation> paymentAllocations) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.paymentStrategy(PaymentStrategy paymentStrategy) Determines how payment is collected for the Orders generated by the Recurring Order.plusPaymentAllocations(RecurringPaymentAllocation... paymentAllocations) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.plusPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocationBuilder> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.setPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocation> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.withPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocationBuilder> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
-
Constructor Details
-
RecurringPaymentConfigurationBuilder
public RecurringPaymentConfigurationBuilder()
-
-
Method Details
-
paymentStrategy
Determines how payment is collected for the Orders generated by the Recurring Order.
- Parameters:
paymentStrategy- value to be set- Returns:
- Builder
-
paymentAllocations
public RecurringPaymentConfigurationBuilder paymentAllocations(RecurringPaymentAllocation... paymentAllocations) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
paymentAllocations- value to be set- Returns:
- Builder
-
paymentAllocations
public RecurringPaymentConfigurationBuilder paymentAllocations(List<RecurringPaymentAllocation> paymentAllocations) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
paymentAllocations- value to be set- Returns:
- Builder
-
plusPaymentAllocations
public RecurringPaymentConfigurationBuilder plusPaymentAllocations(RecurringPaymentAllocation... paymentAllocations) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
paymentAllocations- value to be set- Returns:
- Builder
-
plusPaymentAllocations
public RecurringPaymentConfigurationBuilder plusPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocationBuilder> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
builder- function to build the paymentAllocations value- Returns:
- Builder
-
withPaymentAllocations
public RecurringPaymentConfigurationBuilder withPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocationBuilder> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
builder- function to build the paymentAllocations value- Returns:
- Builder
-
addPaymentAllocations
public RecurringPaymentConfigurationBuilder addPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocation> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
builder- function to build the paymentAllocations value- Returns:
- Builder
-
setPaymentAllocations
public RecurringPaymentConfigurationBuilder setPaymentAllocations(Function<RecurringPaymentAllocationBuilder, RecurringPaymentAllocation> builder) Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Parameters:
builder- function to build the paymentAllocations value- Returns:
- Builder
-
getPaymentStrategy
Determines how payment is collected for the Orders generated by the Recurring Order.
- Returns:
- paymentStrategy
-
getPaymentAllocations
Payment Methods charged for the Orders generated by the RecurringOrder, and the share of the Order total charged to each of them.
- Returns:
- paymentAllocations
-
build
builds RecurringPaymentConfiguration with checking for non-null required values- Specified by:
buildin interfaceBuilder<RecurringPaymentConfiguration>- Returns:
- RecurringPaymentConfiguration
-
buildUnchecked
builds RecurringPaymentConfiguration without checking for non-null required values- Returns:
- RecurringPaymentConfiguration
-
of
factory method for an instance of RecurringPaymentConfigurationBuilder- Returns:
- builder
-
of
create builder for RecurringPaymentConfiguration instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-