Class Refund

    • Constructor Detail

      • Refund

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

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

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

        public Refund​(Refund 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
      • getOrderRef

        public Reference getOrderRef()
        The order with which the refund is associated
      • getDevice

        public Reference getDevice()
        Device which processed the transaction for this refund, a 128-bit UUID, not a normal base-13 Clover ID.
      • getAmount

        public Long getAmount()
        Total amount refunded, including tax and tip
      • getTaxAmount

        public Long getTaxAmount()
        Tax amount refunded
      • getTipAmount

        public Long getTipAmount()
        Tip amount refunded
      • getCreatedTime

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

        public Long getClientCreatedTime()
        The time when the refund was recorded on the client
      • getDeletedTime

        public Long getDeletedTime()
        The time when the refund was deleted on the server
      • getGatewayProcessingTime

        public Long getGatewayProcessingTime()
        The time when the refund was processed by the gateway
      • getPayment

        public Reference getPayment()
        The payment with which the refund is associated
      • getEmployee

        public Reference getEmployee()
      • getOverrideMerchantTender

        public Tender getOverrideMerchantTender()
        The tender type associated with this payment, e.g. credit card, cash, etc.
      • getGermanInfo

        public GermanInfo getGermanInfo()
        German region-specific information
      • getAppTracking

        public AppTracking getAppTracking()
        Tracking information for the app that created this refund.
      • getVoided

        public Boolean getVoided()
      • getVoidReason

        public String getVoidReason()
      • getCardTransaction

        public CardTransaction getCardTransaction()
        Information about the card used for credit or debit card refunds
      • getTransactionInfo

        public TransactionInfo getTransactionInfo()
        Transaction information
      • getMerchant

        public Reference getMerchant()
      • getExternalReferenceId

        public String getExternalReferenceId()
        The external reference id if associated with the refund
      • getAuthCode

        public String getAuthCode()
        Auth code generated by the acquire
      • getStatus

        public RefundStatus getStatus()
        Status of the refund.It can be Fail/Success/Pending
      • getOceanGatewayInfo

        public OceanGatewayInfo getOceanGatewayInfo()
        Ocean Gateway info - for India region
      • getReason

        public String getReason()
        Reason why the refund was initiated
      • 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
      • isNotNullOrderRef

        public boolean isNotNullOrderRef()
        Checks whether the 'orderRef' field is set and is not null
      • isNotNullDevice

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

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

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

        public boolean isNotNullTipAmount()
        Checks whether the 'tipAmount' field is set and is not null
      • 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
      • isNotNullDeletedTime

        public boolean isNotNullDeletedTime()
        Checks whether the 'deletedTime' field is set and is not null
      • isNotNullGatewayProcessingTime

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

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

        public boolean isNotNullEmployee()
        Checks whether the 'employee' field is set and is not null
      • isNotNullLineItems

        public boolean isNotNullLineItems()
        Checks whether the 'lineItems' field is set and is not null
      • isNotEmptyLineItems

        public boolean isNotEmptyLineItems()
        Checks whether the 'lineItems' field is set and is not null and is not empty
      • isNotNullOverrideMerchantTender

        public boolean isNotNullOverrideMerchantTender()
        Checks whether the 'overrideMerchantTender' field is set and is not null
      • isNotNullTaxableAmountRates

        public boolean isNotNullTaxableAmountRates()
        Checks whether the 'taxableAmountRates' field is set and is not null
      • isNotEmptyTaxableAmountRates

        public boolean isNotEmptyTaxableAmountRates()
        Checks whether the 'taxableAmountRates' field is set and is not null and is not empty
      • isNotNullServiceChargeAmount

        public boolean isNotNullServiceChargeAmount()
        Checks whether the 'serviceChargeAmount' 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
      • isNotNullAttributes

        public boolean isNotNullAttributes()
        Checks whether the 'attributes' field is set and is not null
      • isNotEmptyAttributes

        public boolean isNotEmptyAttributes()
        Checks whether the 'attributes' field is set and is not null and is not empty
      • isNotNullGermanInfo

        public boolean isNotNullGermanInfo()
        Checks whether the 'germanInfo' field is set and is not null
      • isNotNullAppTracking

        public boolean isNotNullAppTracking()
        Checks whether the 'appTracking' field is set and is not null
      • isNotNullVoided

        public boolean isNotNullVoided()
        Checks whether the 'voided' field is set and is not null
      • isNotNullVoidReason

        public boolean isNotNullVoidReason()
        Checks whether the 'voidReason' field is set and is not null
      • isNotNullCardTransaction

        public boolean isNotNullCardTransaction()
        Checks whether the 'cardTransaction' field is set and is not null
      • isNotNullTransactionInfo

        public boolean isNotNullTransactionInfo()
        Checks whether the 'transactionInfo' field is set and is not null
      • isNotNullMerchant

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

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

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

        public boolean isNotNullStatus()
        Checks whether the 'status' field is set and is not null
      • isNotNullOceanGatewayInfo

        public boolean isNotNullOceanGatewayInfo()
        Checks whether the 'oceanGatewayInfo' field is set and is not null
      • isNotNullReason

        public boolean isNotNullReason()
        Checks whether the 'reason' 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
      • hasOrderRef

        public boolean hasOrderRef()
        Checks whether the 'orderRef' field has been set, however the value could be null
      • hasDevice

        public boolean hasDevice()
        Checks whether the 'device' 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
      • hasTaxAmount

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

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

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

        public boolean hasDeletedTime()
        Checks whether the 'deletedTime' field has been set, however the value could be null
      • hasGatewayProcessingTime

        public boolean hasGatewayProcessingTime()
        Checks whether the 'gatewayProcessingTime' 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
      • hasEmployee

        public boolean hasEmployee()
        Checks whether the 'employee' field has been set, however the value could be null
      • hasLineItems

        public boolean hasLineItems()
        Checks whether the 'lineItems' field has been set, however the value could be null
      • hasOverrideMerchantTender

        public boolean hasOverrideMerchantTender()
        Checks whether the 'overrideMerchantTender' field has been set, however the value could be null
      • hasTaxableAmountRates

        public boolean hasTaxableAmountRates()
        Checks whether the 'taxableAmountRates' field has been set, however the value could be null
      • hasServiceChargeAmount

        public boolean hasServiceChargeAmount()
        Checks whether the 'serviceChargeAmount' 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
      • hasAttributes

        public boolean hasAttributes()
        Checks whether the 'attributes' field has been set, however the value could be null
      • hasGermanInfo

        public boolean hasGermanInfo()
        Checks whether the 'germanInfo' field has been set, however the value could be null
      • hasAppTracking

        public boolean hasAppTracking()
        Checks whether the 'appTracking' field has been set, however the value could be null
      • hasVoided

        public boolean hasVoided()
        Checks whether the 'voided' field has been set, however the value could be null
      • hasVoidReason

        public boolean hasVoidReason()
        Checks whether the 'voidReason' field has been set, however the value could be null
      • hasCardTransaction

        public boolean hasCardTransaction()
        Checks whether the 'cardTransaction' field has been set, however the value could be null
      • hasTransactionInfo

        public boolean hasTransactionInfo()
        Checks whether the 'transactionInfo' field has been set, however the value could be null
      • hasMerchant

        public boolean hasMerchant()
        Checks whether the 'merchant' 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
      • hasAuthCode

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

        public boolean hasStatus()
        Checks whether the 'status' field has been set, however the value could be null
      • hasOceanGatewayInfo

        public boolean hasOceanGatewayInfo()
        Checks whether the 'oceanGatewayInfo' field has been set, however the value could be null
      • hasReason

        public boolean hasReason()
        Checks whether the 'reason' field has been set, however the value could be null
      • setId

        public Refund setId​(String id)
        Sets the field 'id'.
      • setOrderRef

        public Refund setOrderRef​(Reference orderRef)
        Sets the field 'orderRef'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setDevice

        public Refund setDevice​(Reference device)
        Sets the field 'device'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setAmount

        public Refund setAmount​(Long amount)
        Sets the field 'amount'.
      • setTaxAmount

        public Refund setTaxAmount​(Long taxAmount)
        Sets the field 'taxAmount'.
      • setTipAmount

        public Refund setTipAmount​(Long tipAmount)
        Sets the field 'tipAmount'.
      • setCreatedTime

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

        public Refund setClientCreatedTime​(Long clientCreatedTime)
        Sets the field 'clientCreatedTime'.
      • setDeletedTime

        public Refund setDeletedTime​(Long deletedTime)
        Sets the field 'deletedTime'.
      • setGatewayProcessingTime

        public Refund setGatewayProcessingTime​(Long gatewayProcessingTime)
        Sets the field 'gatewayProcessingTime'.
      • setPayment

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

        public Refund setEmployee​(Reference employee)
        Sets the field 'employee'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setLineItems

        public Refund setLineItems​(List<Reference> lineItems)
        Sets the field 'lineItems'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setOverrideMerchantTender

        public Refund setOverrideMerchantTender​(Tender overrideMerchantTender)
        Sets the field 'overrideMerchantTender'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setTaxableAmountRates

        public Refund setTaxableAmountRates​(List<TaxableAmountRate> taxableAmountRates)
        Sets the field 'taxableAmountRates'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setServiceChargeAmount

        public Refund setServiceChargeAmount​(ServiceChargeAmount serviceChargeAmount)
        Sets the field 'serviceChargeAmount'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setAdditionalCharges

        public Refund 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.
      • setAttributes

        public Refund setAttributes​(Map<String,​String> attributes)
        Sets the field 'attributes'.
      • setGermanInfo

        public Refund setGermanInfo​(GermanInfo germanInfo)
        Sets the field 'germanInfo'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setAppTracking

        public Refund setAppTracking​(AppTracking appTracking)
        Sets the field 'appTracking'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setVoided

        public Refund setVoided​(Boolean voided)
        Sets the field 'voided'.
      • setVoidReason

        public Refund setVoidReason​(String voidReason)
        Sets the field 'voidReason'.
      • setCardTransaction

        public Refund setCardTransaction​(CardTransaction cardTransaction)
        Sets the field 'cardTransaction'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setTransactionInfo

        public Refund setTransactionInfo​(TransactionInfo transactionInfo)
        Sets the field 'transactionInfo'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setMerchant

        public Refund setMerchant​(Reference merchant)
        Sets the field 'merchant'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setExternalReferenceId

        public Refund setExternalReferenceId​(String externalReferenceId)
        Sets the field 'externalReferenceId'.
      • setAuthCode

        public Refund setAuthCode​(String authCode)
        Sets the field 'authCode'.
      • setOceanGatewayInfo

        public Refund setOceanGatewayInfo​(OceanGatewayInfo oceanGatewayInfo)
        Sets the field 'oceanGatewayInfo'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setReason

        public Refund setReason​(String reason)
        Sets the field 'reason'.
      • clearId

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

        public void clearOrderRef()
        Clears the 'orderRef' field, the 'has' method for this field will now return false
      • clearDevice

        public void clearDevice()
        Clears the 'device' 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
      • clearTaxAmount

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

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

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

        public void clearDeletedTime()
        Clears the 'deletedTime' field, the 'has' method for this field will now return false
      • clearGatewayProcessingTime

        public void clearGatewayProcessingTime()
        Clears the 'gatewayProcessingTime' 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
      • clearEmployee

        public void clearEmployee()
        Clears the 'employee' field, the 'has' method for this field will now return false
      • clearLineItems

        public void clearLineItems()
        Clears the 'lineItems' field, the 'has' method for this field will now return false
      • clearOverrideMerchantTender

        public void clearOverrideMerchantTender()
        Clears the 'overrideMerchantTender' field, the 'has' method for this field will now return false
      • clearTaxableAmountRates

        public void clearTaxableAmountRates()
        Clears the 'taxableAmountRates' field, the 'has' method for this field will now return false
      • clearServiceChargeAmount

        public void clearServiceChargeAmount()
        Clears the 'serviceChargeAmount' 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
      • clearAttributes

        public void clearAttributes()
        Clears the 'attributes' field, the 'has' method for this field will now return false
      • clearGermanInfo

        public void clearGermanInfo()
        Clears the 'germanInfo' field, the 'has' method for this field will now return false
      • clearAppTracking

        public void clearAppTracking()
        Clears the 'appTracking' field, the 'has' method for this field will now return false
      • clearVoided

        public void clearVoided()
        Clears the 'voided' field, the 'has' method for this field will now return false
      • clearVoidReason

        public void clearVoidReason()
        Clears the 'voidReason' field, the 'has' method for this field will now return false
      • clearCardTransaction

        public void clearCardTransaction()
        Clears the 'cardTransaction' field, the 'has' method for this field will now return false
      • clearTransactionInfo

        public void clearTransactionInfo()
        Clears the 'transactionInfo' field, the 'has' method for this field will now return false
      • clearMerchant

        public void clearMerchant()
        Clears the 'merchant' 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
      • clearAuthCode

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

        public void clearStatus()
        Clears the 'status' field, the 'has' method for this field will now return false
      • clearOceanGatewayInfo

        public void clearOceanGatewayInfo()
        Clears the 'oceanGatewayInfo' field, the 'has' method for this field will now return false
      • clearReason

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

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