Class PaymentMethodInfoBuilder

java.lang.Object
com.commercetools.api.models.payment.PaymentMethodInfoBuilder
All Implemented Interfaces:
Builder<PaymentMethodInfo>

public class PaymentMethodInfoBuilder extends Object implements Builder<PaymentMethodInfo>
PaymentMethodInfoBuilder
Example to create an instance using the builder pattern

     PaymentMethodInfo paymentMethodInfo = PaymentMethodInfo.builder()
             .build()
 
  • Constructor Details

    • PaymentMethodInfoBuilder

      public PaymentMethodInfoBuilder()
  • Method Details

    • paymentInterface

      public PaymentMethodInfoBuilder paymentInterface(@Nullable String paymentInterface)

      Payment service that processes the Payment (for example, a PSP). Once set, it cannot be changed. The combination of paymentInterface and the interfaceId of a Payment must be unique.

      Parameters:
      paymentInterface - value to be set
      Returns:
      Builder
    • method

      public PaymentMethodInfoBuilder method(@Nullable String method)

      Payment method used, for example, credit card, or cash advance.

      Parameters:
      method - value to be set
      Returns:
      Builder
    • name

      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

      @Nullable public String getPaymentInterface()

      Payment service that processes the Payment (for example, a PSP). Once set, it cannot be changed. The combination of paymentInterface and the interfaceId of a Payment must be unique.

      Returns:
      paymentInterface
    • getMethod

      @Nullable public String getMethod()

      Payment method used, for example, credit card, or cash advance.

      Returns:
      method
    • getName

      @Nullable public LocalizedString getName()

      Localizable name of the payment method.

      Returns:
      name
    • build

      public PaymentMethodInfo build()
      builds PaymentMethodInfo with checking for non-null required values
      Specified by:
      build in interface Builder<PaymentMethodInfo>
      Returns:
      PaymentMethodInfo
    • buildUnchecked

      public PaymentMethodInfo buildUnchecked()
      builds PaymentMethodInfo without checking for non-null required values
      Returns:
      PaymentMethodInfo
    • of

      public static PaymentMethodInfoBuilder of()
      factory method for an instance of PaymentMethodInfoBuilder
      Returns:
      builder
    • of

      public static PaymentMethodInfoBuilder of(PaymentMethodInfo template)
      create builder for PaymentMethodInfo instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder