Class ReceiptOptions


  • public class ReceiptOptions
    extends Object
    ReceiptOptions
    • Constructor Detail

      • ReceiptOptions

        public ReceiptOptions()
    • Method Detail

      • logo

        public ReceiptOptions logo​(String logo)
        The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.
        Parameters:
        logo - The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.
        Returns:
        the current ReceiptOptions instance, allowing for method chaining
      • getLogo

        public String getLogo()
        The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.
        Returns:
        logo The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.
      • setLogo

        public void setLogo​(String logo)
        The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.
        Parameters:
        logo - The receipt logo converted to a Base64-encoded string. The image must be a .bmp file of < 256 KB, dimensions 240 (H) x 384 (W) px.
      • promptBeforePrinting

        public ReceiptOptions promptBeforePrinting​(Boolean promptBeforePrinting)
        Indicates whether a screen appears asking if you want to print the shopper receipt.
        Parameters:
        promptBeforePrinting - Indicates whether a screen appears asking if you want to print the shopper receipt.
        Returns:
        the current ReceiptOptions instance, allowing for method chaining
      • getPromptBeforePrinting

        public Boolean getPromptBeforePrinting()
        Indicates whether a screen appears asking if you want to print the shopper receipt.
        Returns:
        promptBeforePrinting Indicates whether a screen appears asking if you want to print the shopper receipt.
      • setPromptBeforePrinting

        public void setPromptBeforePrinting​(Boolean promptBeforePrinting)
        Indicates whether a screen appears asking if you want to print the shopper receipt.
        Parameters:
        promptBeforePrinting - Indicates whether a screen appears asking if you want to print the shopper receipt.
      • qrCodeData

        public ReceiptOptions qrCodeData​(String qrCodeData)
        Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.
        Parameters:
        qrCodeData - Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.
        Returns:
        the current ReceiptOptions instance, allowing for method chaining
      • getQrCodeData

        public String getQrCodeData()
        Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.
        Returns:
        qrCodeData Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.
      • setQrCodeData

        public void setQrCodeData​(String qrCodeData)
        Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.
        Parameters:
        qrCodeData - Data to print on the receipt as a QR code. This can include static text and the following variables: - `${merchantreference}`: the merchant reference of the transaction. - `${pspreference}`: the PSP reference of the transaction. For example, **http://www.example.com/order/${pspreference}/${merchantreference}**.
      • includeNullValues

        public ReceiptOptions 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 ReceiptOptions 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 ReceiptOptions fromJson​(String jsonString)
                                       throws com.fasterxml.jackson.core.JsonProcessingException
        Create an instance of ReceiptOptions given an JSON string
        Parameters:
        jsonString - JSON string
        Returns:
        An instance of ReceiptOptions
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException - if the JSON string is invalid with respect to ReceiptOptions
      • toJson

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