Interface MyPaymentDraft

All Superinterfaces:
CustomizableDraft<MyPaymentDraft>, Draft<MyPaymentDraft>

public interface MyPaymentDraft extends CustomizableDraft<MyPaymentDraft>, Draft<MyPaymentDraft>
MyPaymentDraft
Example to create an instance using the builder pattern

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

    • getAmountPlanned

      @NotNull @Valid @NotNull @Valid 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

      @Valid @Valid PaymentMethodInfo getPaymentMethodInfo()

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

      Returns:
      paymentMethodInfo
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Payment.

      Specified by:
      getCustom in interface CustomizableDraft<MyPaymentDraft>
      Returns:
      custom
    • getTransaction

      @Valid @Valid MyTransactionDraft getTransaction()

      Financial transactions of the TransactionTypes Authorization or Charge.

      Returns:
      transaction
    • setAmountPlanned

      void setAmountPlanned(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
    • setPaymentMethodInfo

      void setPaymentMethodInfo(PaymentMethodInfo paymentMethodInfo)

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

      Parameters:
      paymentMethodInfo - value to be set
    • setCustom

      void setCustom(CustomFieldsDraft custom)

      Custom Fields for the Payment.

      Specified by:
      setCustom in interface CustomizableDraft<MyPaymentDraft>
      Parameters:
      custom - value to be set
    • setTransaction

      void setTransaction(MyTransactionDraft transaction)

      Financial transactions of the TransactionTypes Authorization or Charge.

      Parameters:
      transaction - value to be set
    • of

      static MyPaymentDraft of()
      factory method
      Returns:
      instance of MyPaymentDraft
    • of

      static MyPaymentDraft of(MyPaymentDraft template)
      factory method to create a shallow copy MyPaymentDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static MyPaymentDraft deepCopy(@Nullable MyPaymentDraft template)
      factory method to create a deep copy of MyPaymentDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static MyPaymentDraftBuilder builder()
      builder factory method for MyPaymentDraft
      Returns:
      builder
    • builder

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

      default <T> T withMyPaymentDraft(Function<MyPaymentDraft,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<MyPaymentDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference