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. The combination of paymentInterface and the interfaceId of a Payment is unique.

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

      public PaymentMethodInfoBuilder method(@Nullable String method)

      Payment method used—for example, a credit card or direct debit.

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

      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

      public PaymentMethodInfoBuilder name(@Nullable LocalizedString name)

      Name of the Payment Method.

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

      Tokenized representation of the Payment Method used by the payment interface.

      Parameters:
      builder - function to build the token value
      Returns:
      Builder
    • withToken

      Tokenized representation of the Payment Method used by the payment interface.

      Parameters:
      builder - function to build the token value
      Returns:
      Builder
    • token

      public PaymentMethodInfoBuilder token(@Nullable PaymentMethodToken token)

      Tokenized representation of the Payment Method used by the payment interface.

      Parameters:
      token - value to be set
      Returns:
      Builder
    • interfaceAccount

      public PaymentMethodInfoBuilder interfaceAccount(@Nullable String 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

      public PaymentMethodInfoBuilder custom(@Nullable CustomFields custom)

      Custom Fields of the PaymentMethodInfo.

      Parameters:
      custom - value to be set
      Returns:
      Builder
    • getPaymentInterface

      @Nullable public String getPaymentInterface()

      Payment service that processes the Payment—for example, a PSP. The combination of paymentInterface and the interfaceId of a Payment is unique.

      Returns:
      paymentInterface
    • getMethod

      @Nullable public String getMethod()

      Payment method used—for example, a credit card or direct debit.

      Returns:
      method
    • getName

      @Nullable public LocalizedString getName()

      Name of the Payment Method.

      Returns:
      name
    • getToken

      @Nullable public PaymentMethodToken getToken()

      Tokenized representation of the Payment Method used by the payment interface.

      Returns:
      token
    • getInterfaceAccount

      @Nullable public String getInterfaceAccount()

      Account or instance of the payment interface when multiple accounts are used (per interface).

      Returns:
      interfaceAccount
    • getCustom

      @Nullable public CustomFields getCustom()

      Custom Fields of the PaymentMethodInfo.

      Returns:
      custom
    • 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