Class Authorization

    • Constructor Detail

      • Authorization

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

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

        public Authorization​(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.
      • Authorization

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

      • getId

        public String getId()
        Unique identifier
      • getPayment

        public Payment getPayment()
        Payment that the auth was opened with
      • getTabName

        public String getTabName()
        Name of tab
      • getAmount

        public Long getAmount()
        Amount authorized
      • getCardType

        public CardType getCardType()
        Type of credit card used for authorization
      • getLast4

        public String getLast4()
        Last 4 digits of credit card used for authorization
      • getAuthcode

        public String getAuthcode()
        Authorization code
      • getToken

        public String getToken()
        Token used for the authorization
      • getType

        public Type getType()
      • getNote

        public String getNote()
      • getExternalReferenceId

        public String getExternalReferenceId()
        The external reference id if associated with the payment
      • getClosingPayment

        public Payment getClosingPayment()
        Payment that the auth was closed with
      • getCreatedTime

        public Long getCreatedTime()
        Time authorization was recorded on server
      • getAdditionalCharges

        public List<AdditionalChargeAmount> getAdditionalCharges()
        Additional charges associated with the authorization. For incremental auth, it is the additional charge on total auth amount.
      • getTransactionSequenceCounter

        public String getTransactionSequenceCounter()
        Counter maintained by the terminal that is incremented for each transaction.
      • getAcquirerTerminalId

        public String getAcquirerTerminalId()
        Acquirer Terminal ID of the terminal. For incremental auth to refer to the terminal which does the increment.
      • 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
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullPayment

        public boolean isNotNullPayment()
        Checks whether the 'payment' field is set and is not null
      • isNotNullTabName

        public boolean isNotNullTabName()
        Checks whether the 'tabName' field is set and is not null
      • isNotNullAmount

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

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

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

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

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

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

        public boolean isNotNullNote()
        Checks whether the 'note' field is set and is not null
      • isNotNullExternalReferenceId

        public boolean isNotNullExternalReferenceId()
        Checks whether the 'externalReferenceId' field is set and is not null
      • isNotNullClosingPayment

        public boolean isNotNullClosingPayment()
        Checks whether the 'closingPayment' field is set and is not null
      • isNotNullCreatedTime

        public boolean isNotNullCreatedTime()
        Checks whether the 'createdTime' field is set and is not null
      • isNotNullAdditionalCharges

        public boolean isNotNullAdditionalCharges()
        Checks whether the 'additionalCharges' field is set and is not null
      • isNotEmptyAdditionalCharges

        public boolean isNotEmptyAdditionalCharges()
        Checks whether the 'additionalCharges' field is set and is not null and is not empty
      • isNotNullTransactionSequenceCounter

        public boolean isNotNullTransactionSequenceCounter()
        Checks whether the 'transactionSequenceCounter' field is set and is not null
      • isNotNullAcquirerTerminalId

        public boolean isNotNullAcquirerTerminalId()
        Checks whether the 'acquirerTerminalId' field is set and is not null
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasPayment

        public boolean hasPayment()
        Checks whether the 'payment' field has been set, however the value could be null
      • hasTabName

        public boolean hasTabName()
        Checks whether the 'tabName' field has been set, however the value could be null
      • hasAmount

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

        public boolean hasCardType()
        Checks whether the 'cardType' 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
      • hasAuthcode

        public boolean hasAuthcode()
        Checks whether the 'authcode' 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
      • hasType

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

        public boolean hasNote()
        Checks whether the 'note' field has been set, however the value could be null
      • hasExternalReferenceId

        public boolean hasExternalReferenceId()
        Checks whether the 'externalReferenceId' field has been set, however the value could be null
      • hasClosingPayment

        public boolean hasClosingPayment()
        Checks whether the 'closingPayment' field has been set, however the value could be null
      • hasCreatedTime

        public boolean hasCreatedTime()
        Checks whether the 'createdTime' field has been set, however the value could be null
      • hasAdditionalCharges

        public boolean hasAdditionalCharges()
        Checks whether the 'additionalCharges' field has been set, however the value could be null
      • hasTransactionSequenceCounter

        public boolean hasTransactionSequenceCounter()
        Checks whether the 'transactionSequenceCounter' field has been set, however the value could be null
      • hasAcquirerTerminalId

        public boolean hasAcquirerTerminalId()
        Checks whether the 'acquirerTerminalId' field has been set, however the value could be null
      • setPayment

        public Authorization setPayment​(Payment payment)
        Sets the field 'payment'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setAmount

        public Authorization setAmount​(Long amount)
        Sets the field 'amount'.
      • setAuthcode

        public Authorization setAuthcode​(String authcode)
        Sets the field 'authcode'.
      • setExternalReferenceId

        public Authorization setExternalReferenceId​(String externalReferenceId)
        Sets the field 'externalReferenceId'.
      • setClosingPayment

        public Authorization setClosingPayment​(Payment closingPayment)
        Sets the field 'closingPayment'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setCreatedTime

        public Authorization setCreatedTime​(Long createdTime)
        Sets the field 'createdTime'.
      • setAdditionalCharges

        public Authorization setAdditionalCharges​(List<AdditionalChargeAmount> additionalCharges)
        Sets the field 'additionalCharges'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setTransactionSequenceCounter

        public Authorization setTransactionSequenceCounter​(String transactionSequenceCounter)
        Sets the field 'transactionSequenceCounter'.
      • setAcquirerTerminalId

        public Authorization setAcquirerTerminalId​(String acquirerTerminalId)
        Sets the field 'acquirerTerminalId'.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearPayment

        public void clearPayment()
        Clears the 'payment' field, the 'has' method for this field will now return false
      • clearTabName

        public void clearTabName()
        Clears the 'tabName' field, the 'has' method for this field will now return false
      • clearAmount

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

        public void clearCardType()
        Clears the 'cardType' 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
      • clearAuthcode

        public void clearAuthcode()
        Clears the 'authcode' 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
      • clearType

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

        public void clearNote()
        Clears the 'note' field, the 'has' method for this field will now return false
      • clearExternalReferenceId

        public void clearExternalReferenceId()
        Clears the 'externalReferenceId' field, the 'has' method for this field will now return false
      • clearClosingPayment

        public void clearClosingPayment()
        Clears the 'closingPayment' field, the 'has' method for this field will now return false
      • clearCreatedTime

        public void clearCreatedTime()
        Clears the 'createdTime' field, the 'has' method for this field will now return false
      • clearAdditionalCharges

        public void clearAdditionalCharges()
        Clears the 'additionalCharges' field, the 'has' method for this field will now return false
      • clearTransactionSequenceCounter

        public void clearTransactionSequenceCounter()
        Clears the 'transactionSequenceCounter' field, the 'has' method for this field will now return false
      • clearAcquirerTerminalId

        public void clearAcquirerTerminalId()
        Clears the 'acquirerTerminalId' 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 Authorization copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

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