Class PaymentAllocationDraftBuilder
java.lang.Object
com.commercetools.api.models.cart.PaymentAllocationDraftBuilder
- All Implemented Interfaces:
Builder<PaymentAllocationDraft>
public class PaymentAllocationDraftBuilder
extends Object
implements Builder<PaymentAllocationDraft>
PaymentAllocationDraftBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PaymentAllocationDraft paymentAllocationDraft = PaymentAllocationDraft.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 PaymentAllocationDraft with checking for non-null required valuesbuilds PaymentAllocationDraft without checking for non-null required valuesShare of the Order total charged to thepaymentMethod.getId()Unique identifier of the resulting RecurringPaymentAllocation within the RecurringPaymentConfiguration.Payment Method charged for this share of the Order total.Unique identifier of the resulting RecurringPaymentAllocation within the RecurringPaymentConfiguration.of()factory method for an instance of PaymentAllocationDraftBuilderof(PaymentAllocationDraft template) create builder for PaymentAllocationDraft 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
-
PaymentAllocationDraftBuilder
public PaymentAllocationDraftBuilder()
-
-
Method Details
-
id
Unique identifier of the resulting RecurringPaymentAllocation within the RecurringPaymentConfiguration.
- Parameters:
id- value to be set- Returns:
- Builder
-
paymentMethod
public PaymentAllocationDraftBuilder 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 PaymentAllocationDraftBuilder 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 PaymentAllocationDraftBuilder 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 resulting 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 PaymentAllocationDraft with checking for non-null required values- Specified by:
buildin interfaceBuilder<PaymentAllocationDraft>- Returns:
- PaymentAllocationDraft
-
buildUnchecked
builds PaymentAllocationDraft without checking for non-null required values- Returns:
- PaymentAllocationDraft
-
of
factory method for an instance of PaymentAllocationDraftBuilder- Returns:
- builder
-
of
create builder for PaymentAllocationDraft instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-