Class PaymentRequest

    • Constructor Detail

      • PaymentRequest

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

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

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

        public PaymentRequest​(PaymentRequest 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
      • getOrderId

        public String getOrderId()
        Unique identifier of the order with which this payment is associated
      • getTimestamp

        public Long getTimestamp()
        Request timestamp
      • getTender

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

        public Long getAmount()
        Total amount paid
      • getTipAmount

        public Long getTipAmount()
        Amount paid in tips
      • getTaxAmount

        public Long getTaxAmount()
        Amount paid in tax (TBD: sales tax only?)
      • getCashBackAmount

        public Long getCashBackAmount()
      • getCashTendered

        public Long getCashTendered()
        Cash tendered
      • getEmployeeId

        public String getEmployeeId()
        Employee ID
      • getEmployeeName

        public String getEmployeeName()
        Employee name
      • getAuthorizationCode

        public String getAuthorizationCode()
        Used for voice authorization for credit cards
      • getExternalPaymentId

        public String getExternalPaymentId()
        External payment ID when using custom tender
      • getSinglePayToken

        public Boolean getSinglePayToken()
      • getLineItems

        public List<LineItemPayment> getLineItems()
        Payments that were made for this line item
      • 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
      • isNotNullOrderId

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

        public boolean isNotNullTimestamp()
        Checks whether the 'timestamp' field is set and is not null
      • isNotNullTender

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

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

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

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

        public boolean isNotNullCashBackAmount()
        Checks whether the 'cashBackAmount' field is set and is not null
      • isNotNullCashTendered

        public boolean isNotNullCashTendered()
        Checks whether the 'cashTendered' field is set and is not null
      • isNotNullEmployeeId

        public boolean isNotNullEmployeeId()
        Checks whether the 'employeeId' field is set and is not null
      • isNotNullEmployeeName

        public boolean isNotNullEmployeeName()
        Checks whether the 'employeeName' field is set and is not null
      • isNotNullAuthorizationCode

        public boolean isNotNullAuthorizationCode()
        Checks whether the 'authorizationCode' field is set and is not null
      • isNotNullExternalPaymentId

        public boolean isNotNullExternalPaymentId()
        Checks whether the 'externalPaymentId' field is set and is not null
      • isNotNullServiceChargeAmount

        public boolean isNotNullServiceChargeAmount()
        Checks whether the 'serviceChargeAmount' field is set and is not null
      • isNotNullSinglePayToken

        public boolean isNotNullSinglePayToken()
        Checks whether the 'singlePayToken' 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
      • 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
      • isNotNullCard

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

        public boolean hasOrderId()
        Checks whether the 'orderId' field has been set, however the value could be null
      • hasTimestamp

        public boolean hasTimestamp()
        Checks whether the 'timestamp' field has been set, however the value could be null
      • hasTender

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

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

        public boolean hasCashBackAmount()
        Checks whether the 'cashBackAmount' field has been set, however the value could be null
      • hasCashTendered

        public boolean hasCashTendered()
        Checks whether the 'cashTendered' field has been set, however the value could be null
      • hasEmployeeId

        public boolean hasEmployeeId()
        Checks whether the 'employeeId' field has been set, however the value could be null
      • hasEmployeeName

        public boolean hasEmployeeName()
        Checks whether the 'employeeName' field has been set, however the value could be null
      • hasAuthorizationCode

        public boolean hasAuthorizationCode()
        Checks whether the 'authorizationCode' field has been set, however the value could be null
      • hasExternalPaymentId

        public boolean hasExternalPaymentId()
        Checks whether the 'externalPaymentId' 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
      • hasSinglePayToken

        public boolean hasSinglePayToken()
        Checks whether the 'singlePayToken' 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
      • hasLineItems

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

        public boolean hasCard()
        Checks whether the 'card' field has been set, however the value could be null
      • setTimestamp

        public PaymentRequest setTimestamp​(Long timestamp)
        Sets the field 'timestamp'.
      • setTender

        public PaymentRequest setTender​(Tender tender)
        Sets the field 'tender'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setTipAmount

        public PaymentRequest setTipAmount​(Long tipAmount)
        Sets the field 'tipAmount'.
      • setTaxAmount

        public PaymentRequest setTaxAmount​(Long taxAmount)
        Sets the field 'taxAmount'.
      • setCashBackAmount

        public PaymentRequest setCashBackAmount​(Long cashBackAmount)
        Sets the field 'cashBackAmount'.
      • setCashTendered

        public PaymentRequest setCashTendered​(Long cashTendered)
        Sets the field 'cashTendered'.
      • setEmployeeId

        public PaymentRequest setEmployeeId​(String employeeId)
        Sets the field 'employeeId'.
      • setEmployeeName

        public PaymentRequest setEmployeeName​(String employeeName)
        Sets the field 'employeeName'.
      • setAuthorizationCode

        public PaymentRequest setAuthorizationCode​(String authorizationCode)
        Sets the field 'authorizationCode'.
      • setExternalPaymentId

        public PaymentRequest setExternalPaymentId​(String externalPaymentId)
        Sets the field 'externalPaymentId'.
      • setServiceChargeAmount

        public PaymentRequest 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.
      • setSinglePayToken

        public PaymentRequest setSinglePayToken​(Boolean singlePayToken)
        Sets the field 'singlePayToken'.
      • setTaxableAmountRates

        public PaymentRequest 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.
      • setLineItems

        public PaymentRequest setLineItems​(List<LineItemPayment> 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.
      • setCard

        public PaymentRequest setCard​(PaymentRequestCardDetails card)
        Sets the field 'card'. 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
      • clearOrderId

        public void clearOrderId()
        Clears the 'orderId' field, the 'has' method for this field will now return false
      • clearTimestamp

        public void clearTimestamp()
        Clears the 'timestamp' field, the 'has' method for this field will now return false
      • clearTender

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

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

        public void clearCashBackAmount()
        Clears the 'cashBackAmount' field, the 'has' method for this field will now return false
      • clearCashTendered

        public void clearCashTendered()
        Clears the 'cashTendered' field, the 'has' method for this field will now return false
      • clearEmployeeId

        public void clearEmployeeId()
        Clears the 'employeeId' field, the 'has' method for this field will now return false
      • clearEmployeeName

        public void clearEmployeeName()
        Clears the 'employeeName' field, the 'has' method for this field will now return false
      • clearAuthorizationCode

        public void clearAuthorizationCode()
        Clears the 'authorizationCode' field, the 'has' method for this field will now return false
      • clearExternalPaymentId

        public void clearExternalPaymentId()
        Clears the 'externalPaymentId' 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
      • clearSinglePayToken

        public void clearSinglePayToken()
        Clears the 'singlePayToken' 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
      • clearLineItems

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

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

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