Class CartAddRecurringPaymentAllocationActionBuilder
java.lang.Object
com.commercetools.api.models.cart.CartAddRecurringPaymentAllocationActionBuilder
- All Implemented Interfaces:
Builder<CartAddRecurringPaymentAllocationAction>
public class CartAddRecurringPaymentAllocationActionBuilder
extends Object
implements Builder<CartAddRecurringPaymentAllocationAction>
CartAddRecurringPaymentAllocationActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartAddRecurringPaymentAllocationAction cartAddRecurringPaymentAllocationAction = CartAddRecurringPaymentAllocationAction.builder()
.id("{id}")
.paymentMethod(paymentMethodBuilder -> paymentMethodBuilder)
.allocation(allocationBuilder -> allocationBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionallocation(AllocationDraft allocation) Share of the Order total charged to thepaymentMethod.allocation(Function<AllocationDraftBuilder, Builder<? extends AllocationDraft>> builder) Share of the Order total charged to thepaymentMethod.build()builds CartAddRecurringPaymentAllocationAction with checking for non-null required valuesbuilds CartAddRecurringPaymentAllocationAction without checking for non-null required valuesShare of the Order total charged to thepaymentMethod.getId()Unique identifier of the new RecurringPaymentAllocation within the RecurringPaymentConfiguration.Payment Method charged for this share of the Order total.Unique identifier of the new RecurringPaymentAllocation within the RecurringPaymentConfiguration.of()factory method for an instance of CartAddRecurringPaymentAllocationActionBuilderof(CartAddRecurringPaymentAllocationAction template) create builder for CartAddRecurringPaymentAllocationAction 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
-
CartAddRecurringPaymentAllocationActionBuilder
public CartAddRecurringPaymentAllocationActionBuilder()
-
-
Method Details
-
id
Unique identifier of the new RecurringPaymentAllocation within the RecurringPaymentConfiguration.
- Parameters:
id- value to be set- Returns:
- Builder
-
paymentMethod
public CartAddRecurringPaymentAllocationActionBuilder 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 CartAddRecurringPaymentAllocationActionBuilder 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
public CartAddRecurringPaymentAllocationActionBuilder paymentMethod(PaymentMethodReference 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 CartAddRecurringPaymentAllocationActionBuilder allocation(Function<AllocationDraftBuilder, Builder<? extends AllocationDraft>> 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 new RecurringPaymentAllocation within the RecurringPaymentConfiguration.
- 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 CartAddRecurringPaymentAllocationAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<CartAddRecurringPaymentAllocationAction>- Returns:
- CartAddRecurringPaymentAllocationAction
-
buildUnchecked
builds CartAddRecurringPaymentAllocationAction without checking for non-null required values- Returns:
- CartAddRecurringPaymentAllocationAction
-
of
factory method for an instance of CartAddRecurringPaymentAllocationActionBuilder- Returns:
- builder
-
of
public static CartAddRecurringPaymentAllocationActionBuilder of(CartAddRecurringPaymentAllocationAction template) create builder for CartAddRecurringPaymentAllocationAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-