Class CardTransaction

    • Constructor Detail

      • CardTransaction

        public CardTransaction()
        Constructs a new empty instance.
      • CardTransaction

        protected CardTransaction​(boolean noInit)
        Constructs a new empty instance.
      • CardTransaction

        public CardTransaction​(JSONObject jsonObject)
        Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • CardTransaction

        public CardTransaction​(CardTransaction src)
        Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
    • Method Detail

      • getCardType

        public CardType getCardType()
      • getFirst6

        public String getFirst6()
        The first four digits of the card number
      • getLast4

        public String getLast4()
        The last four digits of the card number
      • getAuthCode

        public String getAuthCode()
        Authorization code (if successful)
      • getReferenceId

        public String getReferenceId()
      • getTransactionNo

        public String getTransactionNo()
      • getState

        public CardTransactionState getState()
        A state inferred from transaction type and whether the gateway captured the transaction
      • getExtra

        public Map<String,​String> getExtra()
        Extra info to be stored as part of gateway/card transaction
      • getBegBalance

        public Long getBegBalance()
      • getEndBalance

        public Long getEndBalance()
      • getAvsResult

        public AVSResult getAvsResult()
      • getCardholderName

        public String getCardholderName()
      • getToken

        public String getToken()
      • getVaultedCard

        public VaultedCard getVaultedCard()
        Vaulted card which can be used for subsequent transactions
      • getGatewayTxState

        public GatewayTxState getGatewayTxState()
        The state as currently recorded. This differs from the legacy 'state' field. The legacy 'state' field is calculated from the 'type' field and whether the transaction was captured.
      • getCurrency

        public String getCurrency()
        Currency code
      • getCaptured

        public Boolean getCaptured()
      • getJSONObject

        public JSONObject getJSONObject()
        Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be reflected in this instance and vice-versa.
        Specified by:
        getJSONObject in interface JSONifiable
      • isNotNullCardType

        public boolean isNotNullCardType()
        Checks whether the 'cardType' field is set and is not null
      • isNotNullEntryType

        public boolean isNotNullEntryType()
        Checks whether the 'entryType' field is set and is not null
      • isNotNullFirst6

        public boolean isNotNullFirst6()
        Checks whether the 'first6' field is set and is not null
      • isNotNullLast4

        public boolean isNotNullLast4()
        Checks whether the 'last4' field is set and is not null
      • isNotNullType

        public boolean isNotNullType()
        Checks whether the 'type' field is set and is not null
      • isNotNullAuthCode

        public boolean isNotNullAuthCode()
        Checks whether the 'authCode' field is set and is not null
      • isNotNullReferenceId

        public boolean isNotNullReferenceId()
        Checks whether the 'referenceId' field is set and is not null
      • isNotNullTransactionNo

        public boolean isNotNullTransactionNo()
        Checks whether the 'transactionNo' field is set and is not null
      • isNotNullState

        public boolean isNotNullState()
        Checks whether the 'state' field is set and is not null
      • isNotNullExtra

        public boolean isNotNullExtra()
        Checks whether the 'extra' field is set and is not null
      • isNotEmptyExtra

        public boolean isNotEmptyExtra()
        Checks whether the 'extra' field is set and is not null and is not empty
      • isNotNullBegBalance

        public boolean isNotNullBegBalance()
        Checks whether the 'begBalance' field is set and is not null
      • isNotNullEndBalance

        public boolean isNotNullEndBalance()
        Checks whether the 'endBalance' field is set and is not null
      • isNotNullAvsResult

        public boolean isNotNullAvsResult()
        Checks whether the 'avsResult' field is set and is not null
      • isNotNullCardholderName

        public boolean isNotNullCardholderName()
        Checks whether the 'cardholderName' field is set and is not null
      • isNotNullToken

        public boolean isNotNullToken()
        Checks whether the 'token' field is set and is not null
      • isNotNullVaultedCard

        public boolean isNotNullVaultedCard()
        Checks whether the 'vaultedCard' field is set and is not null
      • isNotNullGatewayTxState

        public boolean isNotNullGatewayTxState()
        Checks whether the 'gatewayTxState' field is set and is not null
      • isNotNullCurrency

        public boolean isNotNullCurrency()
        Checks whether the 'currency' field is set and is not null
      • isNotNullCaptured

        public boolean isNotNullCaptured()
        Checks whether the 'captured' field is set and is not null
      • hasCardType

        public boolean hasCardType()
        Checks whether the 'cardType' field has been set, however the value could be null
      • hasEntryType

        public boolean hasEntryType()
        Checks whether the 'entryType' field has been set, however the value could be null
      • hasFirst6

        public boolean hasFirst6()
        Checks whether the 'first6' field has been set, however the value could be null
      • hasLast4

        public boolean hasLast4()
        Checks whether the 'last4' field has been set, however the value could be null
      • hasType

        public boolean hasType()
        Checks whether the 'type' field has been set, however the value could be null
      • hasAuthCode

        public boolean hasAuthCode()
        Checks whether the 'authCode' field has been set, however the value could be null
      • hasReferenceId

        public boolean hasReferenceId()
        Checks whether the 'referenceId' field has been set, however the value could be null
      • hasTransactionNo

        public boolean hasTransactionNo()
        Checks whether the 'transactionNo' field has been set, however the value could be null
      • hasState

        public boolean hasState()
        Checks whether the 'state' field has been set, however the value could be null
      • hasExtra

        public boolean hasExtra()
        Checks whether the 'extra' field has been set, however the value could be null
      • hasBegBalance

        public boolean hasBegBalance()
        Checks whether the 'begBalance' field has been set, however the value could be null
      • hasEndBalance

        public boolean hasEndBalance()
        Checks whether the 'endBalance' field has been set, however the value could be null
      • hasAvsResult

        public boolean hasAvsResult()
        Checks whether the 'avsResult' field has been set, however the value could be null
      • hasCardholderName

        public boolean hasCardholderName()
        Checks whether the 'cardholderName' field has been set, however the value could be null
      • hasToken

        public boolean hasToken()
        Checks whether the 'token' field has been set, however the value could be null
      • hasVaultedCard

        public boolean hasVaultedCard()
        Checks whether the 'vaultedCard' field has been set, however the value could be null
      • hasGatewayTxState

        public boolean hasGatewayTxState()
        Checks whether the 'gatewayTxState' field has been set, however the value could be null
      • hasCurrency

        public boolean hasCurrency()
        Checks whether the 'currency' field has been set, however the value could be null
      • hasCaptured

        public boolean hasCaptured()
        Checks whether the 'captured' field has been set, however the value could be null
      • setReferenceId

        public CardTransaction setReferenceId​(String referenceId)
        Sets the field 'referenceId'.
      • setTransactionNo

        public CardTransaction setTransactionNo​(String transactionNo)
        Sets the field 'transactionNo'.
      • setBegBalance

        public CardTransaction setBegBalance​(Long begBalance)
        Sets the field 'begBalance'.
      • setEndBalance

        public CardTransaction setEndBalance​(Long endBalance)
        Sets the field 'endBalance'.
      • setCardholderName

        public CardTransaction setCardholderName​(String cardholderName)
        Sets the field 'cardholderName'.
      • setVaultedCard

        public CardTransaction setVaultedCard​(VaultedCard vaultedCard)
        Sets the field 'vaultedCard'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearCardType

        public void clearCardType()
        Clears the 'cardType' field, the 'has' method for this field will now return false
      • clearEntryType

        public void clearEntryType()
        Clears the 'entryType' field, the 'has' method for this field will now return false
      • clearFirst6

        public void clearFirst6()
        Clears the 'first6' field, the 'has' method for this field will now return false
      • clearLast4

        public void clearLast4()
        Clears the 'last4' field, the 'has' method for this field will now return false
      • clearType

        public void clearType()
        Clears the 'type' field, the 'has' method for this field will now return false
      • clearAuthCode

        public void clearAuthCode()
        Clears the 'authCode' field, the 'has' method for this field will now return false
      • clearReferenceId

        public void clearReferenceId()
        Clears the 'referenceId' field, the 'has' method for this field will now return false
      • clearTransactionNo

        public void clearTransactionNo()
        Clears the 'transactionNo' field, the 'has' method for this field will now return false
      • clearState

        public void clearState()
        Clears the 'state' field, the 'has' method for this field will now return false
      • clearExtra

        public void clearExtra()
        Clears the 'extra' field, the 'has' method for this field will now return false
      • clearBegBalance

        public void clearBegBalance()
        Clears the 'begBalance' field, the 'has' method for this field will now return false
      • clearEndBalance

        public void clearEndBalance()
        Clears the 'endBalance' field, the 'has' method for this field will now return false
      • clearAvsResult

        public void clearAvsResult()
        Clears the 'avsResult' field, the 'has' method for this field will now return false
      • clearCardholderName

        public void clearCardholderName()
        Clears the 'cardholderName' field, the 'has' method for this field will now return false
      • clearToken

        public void clearToken()
        Clears the 'token' field, the 'has' method for this field will now return false
      • clearVaultedCard

        public void clearVaultedCard()
        Clears the 'vaultedCard' field, the 'has' method for this field will now return false
      • clearGatewayTxState

        public void clearGatewayTxState()
        Clears the 'gatewayTxState' field, the 'has' method for this field will now return false
      • clearCurrency

        public void clearCurrency()
        Clears the 'currency' field, the 'has' method for this field will now return false
      • clearCaptured

        public void clearCaptured()
        Clears the 'captured' field, the 'has' method for this field will now return false
      • containsChanges

        public boolean containsChanges()
        Returns true if this instance has any changes.
      • resetChangeLog

        public void resetChangeLog()
        Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
      • copyChanges

        public CardTransaction copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(CardTransaction src)
        Copy all the changed fields from the given source to this instance.