Class MyPaymentDraftBuilder

java.lang.Object
com.commercetools.api.models.me.MyPaymentDraftBuilder
All Implemented Interfaces:
Builder<MyPaymentDraft>

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

     MyPaymentDraft myPaymentDraft = MyPaymentDraft.builder()
             .amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
             .build()
 
  • Constructor Details

    • MyPaymentDraftBuilder

      public MyPaymentDraftBuilder()
  • Method Details

    • amountPlanned

      public MyPaymentDraftBuilder amountPlanned(Function<MoneyBuilder,MoneyBuilder> builder)

      Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.

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

      public MyPaymentDraftBuilder withAmountPlanned(Function<MoneyBuilder,Money> builder)

      Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.

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

      public MyPaymentDraftBuilder amountPlanned(Money amountPlanned)

      Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.

      Parameters:
      amountPlanned - value to be set
      Returns:
      Builder
    • paymentMethodInfo

      Information regarding the payment interface (for example, a PSP), and the specific payment method used.

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

      Information regarding the payment interface (for example, a PSP), and the specific payment method used.

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

      public MyPaymentDraftBuilder paymentMethodInfo(@Nullable PaymentMethodInfo paymentMethodInfo)

      Information regarding the payment interface (for example, a PSP), and the specific payment method used.

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

      Custom Fields for the Payment.

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

      Custom Fields for the Payment.

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

      Custom Fields for the Payment.

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

      Financial transactions of the TransactionTypes Authorization or Charge.

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

      Financial transactions of the TransactionTypes Authorization or Charge.

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

      public MyPaymentDraftBuilder transaction(@Nullable MyTransactionDraft transaction)

      Financial transactions of the TransactionTypes Authorization or Charge.

      Parameters:
      transaction - value to be set
      Returns:
      Builder
    • getAmountPlanned

      public Money getAmountPlanned()

      Money value the Payment intends to receive from the customer. The value usually matches the Cart or Order gross total.

      Returns:
      amountPlanned
    • getPaymentMethodInfo

      @Nullable public PaymentMethodInfo getPaymentMethodInfo()

      Information regarding the payment interface (for example, a PSP), and the specific payment method used.

      Returns:
      paymentMethodInfo
    • getCustom

      @Nullable public CustomFieldsDraft getCustom()

      Custom Fields for the Payment.

      Returns:
      custom
    • getTransaction

      @Nullable public MyTransactionDraft getTransaction()

      Financial transactions of the TransactionTypes Authorization or Charge.

      Returns:
      transaction
    • build

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

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

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

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