Class PaymentMethodInfoDraftBuilder
- All Implemented Interfaces:
Builder<PaymentMethodInfoDraft>
Example to create an instance using the builder pattern
PaymentMethodInfoDraft paymentMethodInfoDraft = PaymentMethodInfoDraft.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds PaymentMethodInfoDraft with checking for non-null required valuesbuilds PaymentMethodInfoDraft without checking for non-null required valuescustom
(CustomFieldsDraft custom) Custom fields for the PaymentMethodInfo.Custom fields for the PaymentMethodInfo.Custom fields for the PaymentMethodInfo.Account or instance of the payment interface when multiple accounts are used (per interface).Payment method to use—for example, a credit card or direct debit.getName()
Name of the Payment Method.Payment service that processes the Payment—for example, a PSP.getToken()
Tokenized representation of the Payment Method used by the payment interface.interfaceAccount
(String interfaceAccount) Account or instance of the payment interface when multiple accounts are used (per interface).Payment method to use—for example, a credit card or direct debit.name
(LocalizedString name) Name of the Payment Method.Name of the Payment Method.of()
factory method for an instance of PaymentMethodInfoDraftBuilderof
(PaymentMethodInfoDraft template) create builder for PaymentMethodInfoDraft instancepaymentInterface
(String paymentInterface) Payment service that processes the Payment—for example, a PSP.token
(PaymentMethodToken token) Tokenized representation of the Payment Method used by the payment interface.Tokenized representation of the Payment Method used by the payment interface.Custom fields for the PaymentMethodInfo.Name of the Payment Method.Tokenized representation of the Payment Method used by the payment interface.
-
Constructor Details
-
PaymentMethodInfoDraftBuilder
public PaymentMethodInfoDraftBuilder()
-
-
Method Details
-
paymentInterface
Payment service that processes the Payment—for example, a PSP. The combination of
paymentInterface
and theinterfaceId
of a Payment must be unique.The value cannot be modified after it is set.
- Parameters:
paymentInterface
- value to be set- Returns:
- Builder
-
method
Payment method to use—for example, a credit card or direct debit.
- Parameters:
method
- value to be set- Returns:
- Builder
-
name
public PaymentMethodInfoDraftBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Payment Method.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
public PaymentMethodInfoDraftBuilder withName(Function<LocalizedStringBuilder, LocalizedString> builder) Name of the Payment Method.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Name of the Payment Method.
- Parameters:
name
- value to be set- Returns:
- Builder
-
token
public PaymentMethodInfoDraftBuilder token(Function<PaymentMethodTokenBuilder, PaymentMethodTokenBuilder> builder) Tokenized representation of the Payment Method used by the payment interface.
- Parameters:
builder
- function to build the token value- Returns:
- Builder
-
withToken
public PaymentMethodInfoDraftBuilder withToken(Function<PaymentMethodTokenBuilder, PaymentMethodToken> builder) Tokenized representation of the Payment Method used by the payment interface.
- Parameters:
builder
- function to build the token value- Returns:
- Builder
-
token
Tokenized representation of the Payment Method used by the payment interface.
- Parameters:
token
- value to be set- Returns:
- Builder
-
interfaceAccount
Account or instance of the payment interface when multiple accounts are used (per interface).
- Parameters:
interfaceAccount
- value to be set- Returns:
- Builder
-
custom
public PaymentMethodInfoDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom fields for the PaymentMethodInfo.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public PaymentMethodInfoDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom fields for the PaymentMethodInfo.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom fields for the PaymentMethodInfo.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
getPaymentInterface
Payment service that processes the Payment—for example, a PSP. The combination of
paymentInterface
and theinterfaceId
of a Payment must be unique.The value cannot be modified after it is set.
- Returns:
- paymentInterface
-
getMethod
Payment method to use—for example, a credit card or direct debit.
- Returns:
- method
-
getName
Name of the Payment Method.
- Returns:
- name
-
getToken
Tokenized representation of the Payment Method used by the payment interface.
- Returns:
- token
-
getInterfaceAccount
Account or instance of the payment interface when multiple accounts are used (per interface).
- Returns:
- interfaceAccount
-
getCustom
Custom fields for the PaymentMethodInfo.
- Returns:
- custom
-
build
builds PaymentMethodInfoDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentMethodInfoDraft>
- Returns:
- PaymentMethodInfoDraft
-
buildUnchecked
builds PaymentMethodInfoDraft without checking for non-null required values- Returns:
- PaymentMethodInfoDraft
-
of
factory method for an instance of PaymentMethodInfoDraftBuilder- Returns:
- builder
-
of
create builder for PaymentMethodInfoDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-