Class Transaction

    • Constructor Detail

      • Transaction

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

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

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

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

      • getCreatedTime

        public Long getCreatedTime()
        The time when the transaction was recorded on the server
      • getClientCreatedTime

        public Long getClientCreatedTime()
        The time when the transaction was recorded on the client
      • getPayment

        public Payment getPayment()
      • getRefund

        public Refund getRefund()
      • getCredit

        public Credit getCredit()
      • 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
      • isNotNullCreatedTime

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

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

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

        public boolean isNotNullRefund()
        Checks whether the 'refund' field is set and is not null
      • isNotNullCredit

        public boolean isNotNullCredit()
        Checks whether the 'credit' field is set and is not null
      • isNotNullCreditRefund

        public boolean isNotNullCreditRefund()
        Checks whether the 'creditRefund' field is set and is not null
      • hasCreatedTime

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

        public boolean hasClientCreatedTime()
        Checks whether the 'clientCreatedTime' 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
      • hasRefund

        public boolean hasRefund()
        Checks whether the 'refund' field has been set, however the value could be null
      • hasCredit

        public boolean hasCredit()
        Checks whether the 'credit' field has been set, however the value could be null
      • hasCreditRefund

        public boolean hasCreditRefund()
        Checks whether the 'creditRefund' field has been set, however the value could be null
      • setCreatedTime

        public Transaction setCreatedTime​(Long createdTime)
        Sets the field 'createdTime'.
      • setClientCreatedTime

        public Transaction setClientCreatedTime​(Long clientCreatedTime)
        Sets the field 'clientCreatedTime'.
      • setPayment

        public Transaction 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.
      • setRefund

        public Transaction setRefund​(Refund refund)
        Sets the field 'refund'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setCredit

        public Transaction setCredit​(Credit credit)
        Sets the field 'credit'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setCreditRefund

        public Transaction setCreditRefund​(CreditRefund creditRefund)
        Sets the field 'creditRefund'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearCreatedTime

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

        public void clearClientCreatedTime()
        Clears the 'clientCreatedTime' 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
      • clearRefund

        public void clearRefund()
        Clears the 'refund' field, the 'has' method for this field will now return false
      • clearCredit

        public void clearCredit()
        Clears the 'credit' field, the 'has' method for this field will now return false
      • clearCreditRefund

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

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