Class RecurringPaymentAllocationBuilder
- All Implemented Interfaces:
Builder<RecurringPaymentAllocation>
Example to create an instance using the builder pattern
RecurringPaymentAllocation recurringPaymentAllocation = RecurringPaymentAllocation.builder()
.id("{id}")
.paymentMethod(paymentMethodBuilder -> paymentMethodBuilder)
.allocation(allocationBuilder -> allocationBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocation(Allocation allocation) Share of the Order total charged to thepaymentMethod.allocation(Function<AllocationBuilder, Builder<? extends Allocation>> builder) Share of the Order total charged to thepaymentMethod.build()builds RecurringPaymentAllocation with checking for non-null required valuesbuilds RecurringPaymentAllocation without checking for non-null required valuesShare of the Order total charged to thepaymentMethod.getId()Unique identifier of the RecurringPaymentAllocation within the RecurringPaymentConfiguration.Payment Method charged for this share of the Order total.Unique identifier of the RecurringPaymentAllocation within the RecurringPaymentConfiguration.of()factory method for an instance of RecurringPaymentAllocationBuilderof(RecurringPaymentAllocation template) create builder for RecurringPaymentAllocation instancepaymentMethod(PaymentMethodReference paymentMethod) Payment Method charged for this share of the Order total.Payment Method charged for this share of the Order total.Payment Method charged for this share of the Order total.
-
Constructor Details
-
RecurringPaymentAllocationBuilder
public RecurringPaymentAllocationBuilder()
-
-
Method Details
-
id
Unique identifier of the RecurringPaymentAllocation within the RecurringPaymentConfiguration. Use it to remove the allocation with the Remove RecurringPaymentAllocation update action.
- Parameters:
id- value to be set- Returns:
- Builder
-
paymentMethod
public RecurringPaymentAllocationBuilder paymentMethod(Function<PaymentMethodReferenceBuilder, PaymentMethodReferenceBuilder> builder) Payment Method charged for this share of the Order total.
- Parameters:
builder- function to build the paymentMethod value- Returns:
- Builder
-
withPaymentMethod
public RecurringPaymentAllocationBuilder withPaymentMethod(Function<PaymentMethodReferenceBuilder, PaymentMethodReference> builder) Payment Method charged for this share of the Order total.
- Parameters:
builder- function to build the paymentMethod value- Returns:
- Builder
-
paymentMethod
Payment Method charged for this share of the Order total.
- Parameters:
paymentMethod- value to be set- Returns:
- Builder
-
allocation
Share of the Order total charged to the
paymentMethod.- Parameters:
allocation- value to be set- Returns:
- Builder
-
allocation
public RecurringPaymentAllocationBuilder allocation(Function<AllocationBuilder, Builder<? extends Allocation>> builder) Share of the Order total charged to the
paymentMethod.- Parameters:
builder- function to build the allocation value- Returns:
- Builder
-
getId
Unique identifier of the RecurringPaymentAllocation within the RecurringPaymentConfiguration. Use it to remove the allocation with the Remove RecurringPaymentAllocation update action.
- Returns:
- id
-
getPaymentMethod
Payment Method charged for this share of the Order total.
- Returns:
- paymentMethod
-
getAllocation
Share of the Order total charged to the
paymentMethod.- Returns:
- allocation
-
build
builds RecurringPaymentAllocation with checking for non-null required values- Specified by:
buildin interfaceBuilder<RecurringPaymentAllocation>- Returns:
- RecurringPaymentAllocation
-
buildUnchecked
builds RecurringPaymentAllocation without checking for non-null required values- Returns:
- RecurringPaymentAllocation
-
of
factory method for an instance of RecurringPaymentAllocationBuilder- Returns:
- builder
-
of
create builder for RecurringPaymentAllocation instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-