Class TaxableAmountRate

    • Constructor Detail

      • TaxableAmountRate

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

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

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

        public TaxableAmountRate​(TaxableAmountRate 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()
        Tax rate id.
      • getName

        public String getName()
        Tax rate name. This field is optional.
      • getTaxableAmount

        public Long getTaxableAmount()
        The sub-total of line items that the tax was based on. For VAT, this amount includes tax. For all others, this amount does not include tax.
      • getRate

        public Long getRate()
        The tax rate. 100% = 1e7.
      • getIsVat

        public Boolean getIsVat()
        Whether the taxable amount includes tax.
      • getTaxAmount

        public Long getTaxAmount()
        The amount of tax collected. In cases where there are multiple payments for an order then it may be necessary to add an extra cent of tax to the last payment.
      • getTransactionRef

        public Reference getTransactionRef()
        The refund with which the tax rate is associated
      • 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
      • isNotNullName

        public boolean isNotNullName()
        Checks whether the 'name' field is set and is not null
      • isNotNullTaxableAmount

        public boolean isNotNullTaxableAmount()
        Checks whether the 'taxableAmount' field is set and is not null
      • isNotNullRate

        public boolean isNotNullRate()
        Checks whether the 'rate' field is set and is not null
      • isNotNullIsVat

        public boolean isNotNullIsVat()
        Checks whether the 'isVat' field is set and is not null
      • isNotNullTaxAmount

        public boolean isNotNullTaxAmount()
        Checks whether the 'taxAmount' field is set and is not null
      • isNotNullTransactionRef

        public boolean isNotNullTransactionRef()
        Checks whether the 'transactionRef' 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
      • hasName

        public boolean hasName()
        Checks whether the 'name' field has been set, however the value could be null
      • hasTaxableAmount

        public boolean hasTaxableAmount()
        Checks whether the 'taxableAmount' field has been set, however the value could be null
      • hasRate

        public boolean hasRate()
        Checks whether the 'rate' field has been set, however the value could be null
      • hasIsVat

        public boolean hasIsVat()
        Checks whether the 'isVat' field has been set, however the value could be null
      • hasTaxAmount

        public boolean hasTaxAmount()
        Checks whether the 'taxAmount' field has been set, however the value could be null
      • hasTransactionRef

        public boolean hasTransactionRef()
        Checks whether the 'transactionRef' field has been set, however the value could be null
      • setTaxableAmount

        public TaxableAmountRate setTaxableAmount​(Long taxableAmount)
        Sets the field 'taxableAmount'.
      • setTransactionRef

        public TaxableAmountRate setTransactionRef​(Reference transactionRef)
        Sets the field 'transactionRef'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • clearId

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

        public void clearName()
        Clears the 'name' field, the 'has' method for this field will now return false
      • clearTaxableAmount

        public void clearTaxableAmount()
        Clears the 'taxableAmount' field, the 'has' method for this field will now return false
      • clearRate

        public void clearRate()
        Clears the 'rate' field, the 'has' method for this field will now return false
      • clearIsVat

        public void clearIsVat()
        Clears the 'isVat' field, the 'has' method for this field will now return false
      • clearTaxAmount

        public void clearTaxAmount()
        Clears the 'taxAmount' field, the 'has' method for this field will now return false
      • clearTransactionRef

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

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