Class CreditRequest

    • Constructor Detail

      • CreditRequest

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

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

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

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

      • getOrderId

        public String getOrderId()
        Unique identifier of the order with which this payment is associated
      • 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
      • isNotNullOrderId

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

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

        public boolean isNotNullPaymentCard()
        Checks whether the 'paymentCard' field is set and is not null
      • hasOrderId

        public boolean hasOrderId()
        Checks whether the 'orderId' 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
      • hasPaymentCard

        public boolean hasPaymentCard()
        Checks whether the 'paymentCard' field has been set, however the value could be null
      • setCredit

        public CreditRequest 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.
      • setPaymentCard

        public CreditRequest setPaymentCard​(PaymentRequestCardDetails paymentCard)
        Sets the field 'paymentCard'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearOrderId

        public void clearOrderId()
        Clears the 'orderId' 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
      • clearPaymentCard

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

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