Class MyPaymentDraftBuilder
- All Implemented Interfaces:
Builder<MyPaymentDraft>
Example to create an instance using the builder pattern
MyPaymentDraft myPaymentDraft = MyPaymentDraft.builder()
.amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionamountPlanned
(Money amountPlanned) Money value the Payment intends to receive from the customer.amountPlanned
(Function<MoneyBuilder, MoneyBuilder> builder) Money value the Payment intends to receive from the customer.build()
builds MyPaymentDraft with checking for non-null required valuesbuilds MyPaymentDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom Fields for the Payment.Custom Fields for the Payment.Money value the Payment intends to receive from the customer.Custom Fields for the Payment.Information regarding the payment interface (for example, a PSP), and the specific payment method used.Financial transactions of the TransactionTypesAuthorization
orCharge
.static MyPaymentDraftBuilder
of()
factory method for an instance of MyPaymentDraftBuilderstatic MyPaymentDraftBuilder
of
(MyPaymentDraft template) create builder for MyPaymentDraft instancepaymentMethodInfo
(PaymentMethodInfo paymentMethodInfo) Information regarding the payment interface (for example, a PSP), and the specific payment method used.Information regarding the payment interface (for example, a PSP), and the specific payment method used.transaction
(MyTransactionDraft transaction) Financial transactions of the TransactionTypesAuthorization
orCharge
.Financial transactions of the TransactionTypesAuthorization
orCharge
.withAmountPlanned
(Function<MoneyBuilder, Money> builder) Money value the Payment intends to receive from the customer.Custom Fields for the Payment.Information regarding the payment interface (for example, a PSP), and the specific payment method used.Financial transactions of the TransactionTypesAuthorization
orCharge
.
-
Constructor Details
-
MyPaymentDraftBuilder
public MyPaymentDraftBuilder()
-
-
Method Details
-
amountPlanned
Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.
- Parameters:
builder
- function to build the amountPlanned value- Returns:
- Builder
-
withAmountPlanned
Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.
- Parameters:
builder
- function to build the amountPlanned value- Returns:
- Builder
-
amountPlanned
Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.
- Parameters:
amountPlanned
- value to be set- Returns:
- Builder
-
paymentMethodInfo
public MyPaymentDraftBuilder paymentMethodInfo(Function<PaymentMethodInfoBuilder, PaymentMethodInfoBuilder> builder) Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
builder
- function to build the paymentMethodInfo value- Returns:
- Builder
-
withPaymentMethodInfo
public MyPaymentDraftBuilder withPaymentMethodInfo(Function<PaymentMethodInfoBuilder, PaymentMethodInfo> builder) Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
builder
- function to build the paymentMethodInfo value- Returns:
- Builder
-
paymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Parameters:
paymentMethodInfo
- value to be set- Returns:
- Builder
-
custom
public MyPaymentDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Payment.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public MyPaymentDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Payment.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Payment.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
transaction
public MyPaymentDraftBuilder transaction(Function<MyTransactionDraftBuilder, MyTransactionDraftBuilder> builder) Financial transactions of the TransactionTypes
Authorization
orCharge
.- Parameters:
builder
- function to build the transaction value- Returns:
- Builder
-
withTransaction
public MyPaymentDraftBuilder withTransaction(Function<MyTransactionDraftBuilder, MyTransactionDraft> builder) Financial transactions of the TransactionTypes
Authorization
orCharge
.- Parameters:
builder
- function to build the transaction value- Returns:
- Builder
-
transaction
Financial transactions of the TransactionTypes
Authorization
orCharge
.- Parameters:
transaction
- value to be set- Returns:
- Builder
-
getAmountPlanned
Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.
- Returns:
- amountPlanned
-
getPaymentMethodInfo
Information regarding the payment interface (for example, a PSP), and the specific payment method used.
- Returns:
- paymentMethodInfo
-
getCustom
Custom Fields for the Payment.
- Returns:
- custom
-
getTransaction
Financial transactions of the TransactionTypes
Authorization
orCharge
.- Returns:
- transaction
-
build
builds MyPaymentDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyPaymentDraft>
- Returns:
- MyPaymentDraft
-
buildUnchecked
builds MyPaymentDraft without checking for non-null required values- Returns:
- MyPaymentDraft
-
of
factory method for an instance of MyPaymentDraftBuilder- Returns:
- builder
-
of
create builder for MyPaymentDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-