Class PaymentRequest


  • public class PaymentRequest
    extends Object
    Request sent to terminal to initiate payment. It conveys Information related to the Payment transaction to process. Content of the `PaymentRequest` message.
    • Constructor Detail

      • PaymentRequest

        public PaymentRequest()
    • Method Detail

      • saleData

        public PaymentRequest saleData​(SaleData saleData)
        saleData
        Parameters:
        saleData -
        Returns:
        the current PaymentRequest instance, allowing for method chaining
      • getSaleData

        public SaleData getSaleData()
        Get saleData
        Returns:
        saleData
      • setSaleData

        public void setSaleData​(SaleData saleData)
        saleData
        Parameters:
        saleData -
      • paymentTransaction

        public PaymentRequest paymentTransaction​(PaymentTransaction paymentTransaction)
        paymentTransaction
        Parameters:
        paymentTransaction -
        Returns:
        the current PaymentRequest instance, allowing for method chaining
      • getPaymentTransaction

        public PaymentTransaction getPaymentTransaction()
        Get paymentTransaction
        Returns:
        paymentTransaction
      • setPaymentTransaction

        public void setPaymentTransaction​(PaymentTransaction paymentTransaction)
        paymentTransaction
        Parameters:
        paymentTransaction -
      • paymentData

        public PaymentRequest paymentData​(PaymentData paymentData)
        paymentData
        Parameters:
        paymentData -
        Returns:
        the current PaymentRequest instance, allowing for method chaining
      • getPaymentData

        public PaymentData getPaymentData()
        Get paymentData
        Returns:
        paymentData
      • setPaymentData

        public void setPaymentData​(PaymentData paymentData)
        paymentData
        Parameters:
        paymentData -
      • loyaltyData

        public PaymentRequest loyaltyData​(List<LoyaltyData> loyaltyData)
        Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
        Parameters:
        loyaltyData - Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
        Returns:
        the current PaymentRequest instance, allowing for method chaining
      • getLoyaltyData

        public List<LoyaltyData> getLoyaltyData()
        Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
        Returns:
        loyaltyData Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
      • setLoyaltyData

        public void setLoyaltyData​(List<LoyaltyData> loyaltyData)
        Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
        Parameters:
        loyaltyData - Data related to a Loyalty program or account. Loyalty cards used with the payment transaction and read by the Sale System.
      • includeNullValues

        public PaymentRequest includeNullValues​(boolean includeNullValues)
        Configures whether null values are explicitly serialized in the JSON payload. Default is false.
      • isIncludeNullValues

        public boolean isIncludeNullValues()
        Returns whether null values are explicitly serialized in the JSON payload.
      • setIncludeNullValues

        public void setIncludeNullValues​(boolean includeNullValues)
        Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
      • equals

        public boolean equals​(Object o)
        Return true if this PaymentRequest object is equal to o.
        Overrides:
        equals in class Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getExplicitNulls

        public Map<String,​Object> getExplicitNulls()
        Returns a map of properties to be merged into the JSON payload as explicit null values.
      • fromJson

        public static PaymentRequest fromJson​(String jsonString)
                                       throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of PaymentRequest given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of PaymentRequest
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to PaymentRequest
      • toJson

        public String toJson()
                      throws com.fasterxml.jackson.core.JsonProcessingException
        Convert an instance of PaymentRequest to an JSON string
        Returns:
        JSON string
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException