Class PaymentMethodInfoBuilder
java.lang.Object
com.commercetools.api.models.payment.PaymentMethodInfoBuilder
- All Implemented Interfaces:
Builder<PaymentMethodInfo>
PaymentMethodInfoBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PaymentMethodInfo paymentMethodInfo = PaymentMethodInfo.builder()
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
builds PaymentMethodInfo with checking for non-null required valuesbuilds PaymentMethodInfo without checking for non-null required valuesPayment method used, for example, credit card, or cash advance.getName()
Localizable name of the payment method.Payment service that processes the Payment (for example, a PSP).Payment method used, for example, credit card, or cash advance.name
(LocalizedString name) Localizable name of the payment method.Localizable 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).Localizable name of the payment method.
-
Constructor Details
-
PaymentMethodInfoBuilder
public PaymentMethodInfoBuilder()
-
-
Method Details
-
paymentInterface
Payment service that processes the Payment (for example, a PSP). Once set, it cannot be changed. The combination of
paymentInterface
and theinterfaceId
of a Payment must be unique.- Parameters:
paymentInterface
- value to be set- Returns:
- Builder
-
method
Payment method used, for example, credit card, or cash advance.
- Parameters:
method
- value to be set- Returns:
- Builder
-
name
public PaymentMethodInfoBuilder name(Function<LocalizedStringBuilder, LocalizedStringBuilder> builder) Localizable name of the payment method.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
withName
Localizable name of the payment method.
- Parameters:
builder
- function to build the name value- Returns:
- Builder
-
name
Localizable name of the payment method.
- Parameters:
name
- value to be set- Returns:
- Builder
-
getPaymentInterface
Payment service that processes the Payment (for example, a PSP). Once set, it cannot be changed. The combination of
paymentInterface
and theinterfaceId
of a Payment must be unique.- Returns:
- paymentInterface
-
getMethod
Payment method used, for example, credit card, or cash advance.
- Returns:
- method
-
getName
Localizable name of the payment method.
- Returns:
- name
-
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
-