Class PaymentMethodInfoBuilder
- All Implemented Interfaces:
Builder<PaymentMethodInfo>
Example to create an instance using the builder pattern
PaymentMethodInfo paymentMethodInfo = PaymentMethodInfo.builder()
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds PaymentMethodInfo with checking for non-null required valuesbuilds PaymentMethodInfo without checking for non-null required valuescustom
(CustomFields custom) Custom Fields of the PaymentMethodInfo.custom
(Function<CustomFieldsBuilder, CustomFieldsBuilder> builder) Custom Fields of the PaymentMethodInfo.Custom Fields of the PaymentMethodInfo.Account or instance of the payment interface when multiple accounts are used (per interface).Payment method used—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 used—for example, a credit card or direct debit.name
(LocalizedString name) Name of the Payment Method.Name of the Payment Method.static PaymentMethodInfoBuilder
of()
factory method for an instance of PaymentMethodInfoBuilderstatic PaymentMethodInfoBuilder
of
(PaymentMethodInfo template) create builder for PaymentMethodInfo 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.withCustom
(Function<CustomFieldsBuilder, CustomFields> builder) Custom Fields of the PaymentMethodInfo.Name of the Payment Method.Tokenized representation of the Payment Method used by the payment interface.
-
Constructor Details
-
PaymentMethodInfoBuilder
public PaymentMethodInfoBuilder()
-
-
Method Details
-
paymentInterface
Payment service that processes the Payment—for example, a PSP. The combination of
paymentInterface
and theinterfaceId
of a Payment is unique.- Parameters:
paymentInterface
- value to be set- Returns:
- Builder
-
method
Payment method used—for example, a credit card or direct debit.
- Parameters:
method
- value to be set- Returns:
- Builder
-
name
public PaymentMethodInfoBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Name of the Payment Method.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
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 PaymentMethodInfoBuilder 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 PaymentMethodInfoBuilder 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
Custom Fields of the PaymentMethodInfo.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Custom Fields of the PaymentMethodInfo.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields of 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 is unique.- Returns:
- paymentInterface
-
getMethod
Payment method used—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 of the PaymentMethodInfo.
- Returns:
- custom
-
build
builds PaymentMethodInfo with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentMethodInfo>
- Returns:
- PaymentMethodInfo
-
buildUnchecked
builds PaymentMethodInfo without checking for non-null required values- Returns:
- PaymentMethodInfo
-
of
factory method for an instance of PaymentMethodInfoBuilder- Returns:
- builder
-
of
create builder for PaymentMethodInfo instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-