Class TransactionImpl

java.lang.Object
com.commercetools.api.models.payment.TransactionImpl
All Implemented Interfaces:
Customizable<Transaction>, Transaction, io.vrap.rmf.base.client.ModelBase

public class TransactionImpl extends Object implements Transaction, io.vrap.rmf.base.client.ModelBase

Represents a financial transaction typically created as a result of a notification from the payment service.

  • Constructor Details

    • TransactionImpl

      public TransactionImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Transaction.

      Specified by:
      getId in interface Transaction
      Returns:
      id
    • getTimestamp

      public ZonedDateTime getTimestamp()

      Date and time (UTC) the Transaction took place.

      Specified by:
      getTimestamp in interface Transaction
      Returns:
      timestamp
    • getType

      public TransactionType getType()

      Type of the Transaction. For example, Authorization.

      Specified by:
      getType in interface Transaction
      Returns:
      type
    • getAmount

      public CentPrecisionMoney getAmount()

      Money value of the Transaction.

      Specified by:
      getAmount in interface Transaction
      Returns:
      amount
    • getInteractionId

      public String getInteractionId()

      Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

      Specified by:
      getInteractionId in interface Transaction
      Returns:
      interactionId
    • getState

      public TransactionState getState()

      State of the Transaction.

      Specified by:
      getState in interface Transaction
      Returns:
      state
    • getCustom

      public CustomFields getCustom()

      Custom Fields defined for the Transaction.

      Specified by:
      getCustom in interface Customizable<Transaction>
      Specified by:
      getCustom in interface Transaction
      Returns:
      custom
    • setId

      public void setId(String id)
      Description copied from interface: Transaction

      Unique identifier of the Transaction.

      Specified by:
      setId in interface Transaction
      Parameters:
      id - value to be set
    • setTimestamp

      public void setTimestamp(ZonedDateTime timestamp)
      Description copied from interface: Transaction

      Date and time (UTC) the Transaction took place.

      Specified by:
      setTimestamp in interface Transaction
      Parameters:
      timestamp - value to be set
    • setType

      public void setType(TransactionType type)
      Description copied from interface: Transaction

      Type of the Transaction. For example, Authorization.

      Specified by:
      setType in interface Transaction
      Parameters:
      type - value to be set
    • setAmount

      public void setAmount(CentPrecisionMoney amount)
      Description copied from interface: Transaction

      Money value of the Transaction.

      Specified by:
      setAmount in interface Transaction
      Parameters:
      amount - value to be set
    • setInteractionId

      public void setInteractionId(String interactionId)
      Description copied from interface: Transaction

      Identifier used by the interface that manages the Transaction (usually the PSP). If a matching interaction was logged in the interfaceInteractions array, the corresponding interaction can be found with this ID.

      Specified by:
      setInteractionId in interface Transaction
      Parameters:
      interactionId - value to be set
    • setState

      public void setState(TransactionState state)
      Description copied from interface: Transaction

      State of the Transaction.

      Specified by:
      setState in interface Transaction
      Parameters:
      state - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: Transaction

      Custom Fields defined for the Transaction.

      Specified by:
      setCustom in interface Customizable<Transaction>
      Specified by:
      setCustom in interface Transaction
      Parameters:
      custom - value to be set
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object