Class PaymentMethodTokenBuilder

java.lang.Object
com.commercetools.api.models.payment_method.PaymentMethodTokenBuilder
All Implemented Interfaces:
Builder<PaymentMethodToken>

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

     PaymentMethodToken paymentMethodToken = PaymentMethodToken.builder()
             .value("{value}")
             .build()
 
  • Constructor Details

    • PaymentMethodTokenBuilder

      public PaymentMethodTokenBuilder()
  • Method Details

    • value

      public PaymentMethodTokenBuilder value(String value)

      Tokenized representation of the Payment Method.

      It is displayed in the following instances:

      • in the payload of an API Extension for Payments and PaymentMethods
      • when querying Payments and PaymentMethods

      It is masked in the following instances:

      • in the payload of Payment and PaymentMethod messages
      • when querying MyPayments
      • in referenced Payments and PaymentMethods embedded through Reference Expansion
      Parameters:
      value - value to be set
      Returns:
      Builder
    • getValue

      public String getValue()

      Tokenized representation of the Payment Method.

      It is displayed in the following instances:

      • in the payload of an API Extension for Payments and PaymentMethods
      • when querying Payments and PaymentMethods

      It is masked in the following instances:

      • in the payload of Payment and PaymentMethod messages
      • when querying MyPayments
      • in referenced Payments and PaymentMethods embedded through Reference Expansion
      Returns:
      value
    • build

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

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

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

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