Interface PaymentDraft

All Superinterfaces:
CustomizableDraft<PaymentDraft>, io.vrap.rmf.base.client.Draft<PaymentDraft>, WithKey
All Known Implementing Classes:
PaymentDraftImpl

public interface PaymentDraft extends CustomizableDraft<PaymentDraft>, WithKey, io.vrap.rmf.base.client.Draft<PaymentDraft>
PaymentDraft
Example to create an instance using the builder pattern

     PaymentDraft paymentDraft = PaymentDraft.builder()
             .amountPlanned(amountPlannedBuilder -> amountPlannedBuilder)
             .build()
 
  • Method Details

    • getCustomer

      Reference to a Customer associated with the Payment.

      Returns:
      customer
    • getAnonymousId

      Anonymous session associated with the Payment.

      Returns:
      anonymousId
    • getExternalId

      Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Returns:
      externalId
    • getInterfaceId

      Identifier used by the payment service that processes the Payment (for example, a PSP). The combination of interfaceId and the paymentInterface field on PaymentMethodInfo must be unique. Once set, it cannot be changed.

      Returns:
      interfaceId
    • getAmountPlanned

      @NotNull @Valid @NotNull @Valid Money getAmountPlanned()

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

      Returns:
      amountPlanned
    • getAmountAuthorized

      @Valid @Valid Money getAmountAuthorized()

      Deprecated because the value can be calculated from the total amounts saved in the Transactions.

      Returns:
      amountAuthorized
    • getAuthorizedUntil

      Deprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.

      Returns:
      authorizedUntil
    • getAmountPaid

      @Valid @Valid Money getAmountPaid()

      Deprecated because the value can be calculated from the total amounts saved in the Transactions.

      Returns:
      amountPaid
    • getAmountRefunded

      @Valid @Valid Money getAmountRefunded()

      Deprecated because the value can be calculated from the total amounts saved in the Transactions.

      Returns:
      amountRefunded
    • getPaymentMethodInfo

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

      Returns:
      paymentMethodInfo
    • getPaymentStatus

      Current status of the Payment.

      Returns:
      paymentStatus
    • getTransactions

      Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

      Returns:
      transactions
    • getInterfaceInteractions

      Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

      Returns:
      interfaceInteractions
    • getCustom

      @Valid @Valid CustomFieldsDraft getCustom()

      Custom Fields for the Payment.

      Specified by:
      getCustom in interface CustomizableDraft<PaymentDraft>
      Returns:
      custom
    • getKey

      User-defined unique identifier for the Payment.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • setCustomer

      Reference to a Customer associated with the Payment.

      Parameters:
      customer - value to be set
    • setAnonymousId

      void setAnonymousId(String anonymousId)

      Anonymous session associated with the Payment.

      Parameters:
      anonymousId - value to be set
    • setExternalId

      void setExternalId(String externalId)

      Additional identifier for external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Parameters:
      externalId - value to be set
    • setInterfaceId

      void setInterfaceId(String interfaceId)

      Identifier used by the payment service that processes the Payment (for example, a PSP). The combination of interfaceId and the paymentInterface field on PaymentMethodInfo must be unique. Once set, it cannot be changed.

      Parameters:
      interfaceId - value to be set
    • setAmountPlanned

      void setAmountPlanned(Money amountPlanned)

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

      Parameters:
      amountPlanned - value to be set
    • setAmountAuthorized

      void setAmountAuthorized(Money amountAuthorized)

      Deprecated because the value can be calculated from the total amounts saved in the Transactions.

      Parameters:
      amountAuthorized - value to be set
    • setAuthorizedUntil

      void setAuthorizedUntil(String authorizedUntil)

      Deprecated because this field is of little practical value, as it is either not reliably known, or the authorization time is fixed for a PSP.

      Parameters:
      authorizedUntil - value to be set
    • setAmountPaid

      void setAmountPaid(Money amountPaid)

      Deprecated because the value can be calculated from the total amounts saved in the Transactions.

      Parameters:
      amountPaid - value to be set
    • setAmountRefunded

      void setAmountRefunded(Money amountRefunded)

      Deprecated because the value can be calculated from the total amounts saved in the Transactions.

      Parameters:
      amountRefunded - 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
    • setPaymentStatus

      void setPaymentStatus(PaymentStatusDraft paymentStatus)

      Current status of the Payment.

      Parameters:
      paymentStatus - value to be set
    • setTransactions

      void setTransactions(TransactionDraft... transactions)

      Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

      Parameters:
      transactions - values to be set
    • setTransactions

      void setTransactions(List<TransactionDraft> transactions)

      Financial transactions of the Payment. Each Transaction has a TransactionType and a TransactionState.

      Parameters:
      transactions - values to be set
    • setInterfaceInteractions

      void setInterfaceInteractions(CustomFieldsDraft... interfaceInteractions)

      Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

      Parameters:
      interfaceInteractions - values to be set
    • setInterfaceInteractions

      void setInterfaceInteractions(List<CustomFieldsDraft> interfaceInteractions)

      Represents information exchange with the payment service, for example, a PSP. An interaction may be a request sent, or a response or notification received from the payment service.

      Parameters:
      interfaceInteractions - values to be set
    • setCustom

      Custom Fields for the Payment.

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

      void setKey(String key)

      User-defined unique identifier for the Payment.

      Parameters:
      key - value to be set
    • of

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

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

      factory method to create a deep copy of PaymentDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for PaymentDraft
      Returns:
      builder
    • builder

      create builder for PaymentDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withPaymentDraft

      default <T> T withPaymentDraft(Function<PaymentDraft,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<PaymentDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference