Class PaymentDraftImpl

java.lang.Object
com.commercetools.api.models.payment.PaymentDraftImpl
All Implemented Interfaces:
CustomizableDraft<PaymentDraft>, PaymentDraft, WithKey, io.vrap.rmf.base.client.Draft<PaymentDraft>, io.vrap.rmf.base.client.ModelBase

public class PaymentDraftImpl extends Object implements PaymentDraft, io.vrap.rmf.base.client.ModelBase
PaymentDraft
  • Constructor Details

    • PaymentDraftImpl

      public PaymentDraftImpl()
      create empty instance
  • Method Details

    • getCustomer

      public CustomerResourceIdentifier getCustomer()

      Reference to a Customer associated with the Payment.

      Specified by:
      getCustomer in interface PaymentDraft
      Returns:
      customer
    • getAnonymousId

      public String getAnonymousId()

      Anonymous session associated with the Payment.

      Specified by:
      getAnonymousId in interface PaymentDraft
      Returns:
      anonymousId
    • getInterfaceId

      public String 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.

      Specified by:
      getInterfaceId in interface PaymentDraft
      Returns:
      interfaceId
    • getAmountPlanned

      public Money getAmountPlanned()

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

      Specified by:
      getAmountPlanned in interface PaymentDraft
      Returns:
      amountPlanned
    • getPaymentMethodInfo

      public PaymentMethodInfo getPaymentMethodInfo()

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

      Specified by:
      getPaymentMethodInfo in interface PaymentDraft
      Returns:
      paymentMethodInfo
    • getPaymentStatus

      public PaymentStatusDraft getPaymentStatus()

      Current status of the Payment.

      Specified by:
      getPaymentStatus in interface PaymentDraft
      Returns:
      paymentStatus
    • getTransactions

      public List<TransactionDraft> getTransactions()

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

      Specified by:
      getTransactions in interface PaymentDraft
      Returns:
      transactions
    • getInterfaceInteractions

      public List<CustomFieldsDraft> 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.

      Specified by:
      getInterfaceInteractions in interface PaymentDraft
      Returns:
      interfaceInteractions
    • getCustom

      public CustomFieldsDraft getCustom()

      Custom Fields for the Payment.

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

      public String getKey()

      User-defined unique identifier for the Payment.

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

      public void setCustomer(CustomerResourceIdentifier customer)
      Description copied from interface: PaymentDraft

      Reference to a Customer associated with the Payment.

      Specified by:
      setCustomer in interface PaymentDraft
      Parameters:
      customer - value to be set
    • setAnonymousId

      public void setAnonymousId(String anonymousId)
      Description copied from interface: PaymentDraft

      Anonymous session associated with the Payment.

      Specified by:
      setAnonymousId in interface PaymentDraft
      Parameters:
      anonymousId - value to be set
    • setInterfaceId

      public void setInterfaceId(String interfaceId)
      Description copied from interface: PaymentDraft

      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.

      Specified by:
      setInterfaceId in interface PaymentDraft
      Parameters:
      interfaceId - value to be set
    • setAmountPlanned

      public void setAmountPlanned(Money amountPlanned)
      Description copied from interface: PaymentDraft

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

      Specified by:
      setAmountPlanned in interface PaymentDraft
      Parameters:
      amountPlanned - value to be set
    • setPaymentMethodInfo

      public void setPaymentMethodInfo(PaymentMethodInfo paymentMethodInfo)
      Description copied from interface: PaymentDraft

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

      Specified by:
      setPaymentMethodInfo in interface PaymentDraft
      Parameters:
      paymentMethodInfo - value to be set
    • setPaymentStatus

      public void setPaymentStatus(PaymentStatusDraft paymentStatus)
      Description copied from interface: PaymentDraft

      Current status of the Payment.

      Specified by:
      setPaymentStatus in interface PaymentDraft
      Parameters:
      paymentStatus - value to be set
    • setTransactions

      public void setTransactions(TransactionDraft... transactions)
      Description copied from interface: PaymentDraft

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

      Specified by:
      setTransactions in interface PaymentDraft
      Parameters:
      transactions - values to be set
    • setTransactions

      public void setTransactions(List<TransactionDraft> transactions)
      Description copied from interface: PaymentDraft

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

      Specified by:
      setTransactions in interface PaymentDraft
      Parameters:
      transactions - values to be set
    • setInterfaceInteractions

      public void setInterfaceInteractions(CustomFieldsDraft... interfaceInteractions)
      Description copied from interface: PaymentDraft

      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.

      Specified by:
      setInterfaceInteractions in interface PaymentDraft
      Parameters:
      interfaceInteractions - values to be set
    • setInterfaceInteractions

      public void setInterfaceInteractions(List<CustomFieldsDraft> interfaceInteractions)
      Description copied from interface: PaymentDraft

      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.

      Specified by:
      setInterfaceInteractions in interface PaymentDraft
      Parameters:
      interfaceInteractions - values to be set
    • setCustom

      public void setCustom(CustomFieldsDraft custom)
      Description copied from interface: PaymentDraft

      Custom Fields for the Payment.

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

      public void setKey(String key)
      Description copied from interface: PaymentDraft

      User-defined unique identifier for the Payment.

      Specified by:
      setKey in interface PaymentDraft
      Parameters:
      key - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object