Package com.adyen.model.management
Class ReceiptOptions
- java.lang.Object
-
- com.adyen.model.management.ReceiptOptions
-
public class ReceiptOptions extends Object
ReceiptOptions
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_LOGOstatic StringJSON_PROPERTY_PROMPT_BEFORE_PRINTINGstatic StringJSON_PROPERTY_QR_CODE_DATA
-
Constructor Summary
Constructors Constructor Description ReceiptOptions()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Return true if this ReceiptOptions object is equal to o.static ReceiptOptionsfromJson(String jsonString)Create an instance of ReceiptOptions given an JSON stringStringgetLogo()The receipt logo converted to a Base64-encoded string.BooleangetPromptBeforePrinting()Indicates whether a screen appears asking if you want to print the shopper receipt.StringgetQrCodeData()Data to print on the receipt as a QR code.inthashCode()ReceiptOptionslogo(String logo)The receipt logo converted to a Base64-encoded string.ReceiptOptionspromptBeforePrinting(Boolean promptBeforePrinting)Indicates whether a screen appears asking if you want to print the shopper receipt.ReceiptOptionsqrCodeData(String qrCodeData)Data to print on the receipt as a QR code.voidsetLogo(String logo)The receipt logo converted to a Base64-encoded string.voidsetPromptBeforePrinting(Boolean promptBeforePrinting)Indicates whether a screen appears asking if you want to print the shopper receipt.voidsetQrCodeData(String qrCodeData)Data to print on the receipt as a QR code.StringtoJson()Convert an instance of ReceiptOptions to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_LOGO
public static final String JSON_PROPERTY_LOGO
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PROMPT_BEFORE_PRINTING
public static final String JSON_PROPERTY_PROMPT_BEFORE_PRINTING
- See Also:
- Constant Field Values
-
JSON_PROPERTY_QR_CODE_DATA
public static final String JSON_PROPERTY_QR_CODE_DATA
- See Also:
- Constant Field Values
-
-
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-- Returns:
- the current
ReceiptOptionsinstance, 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
-
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-
-
promptBeforePrinting
public ReceiptOptions promptBeforePrinting(Boolean promptBeforePrinting)
Indicates whether a screen appears asking if you want to print the shopper receipt.- Parameters:
promptBeforePrinting-- Returns:
- the current
ReceiptOptionsinstance, allowing for method chaining
-
getPromptBeforePrinting
public Boolean getPromptBeforePrinting()
Indicates whether a screen appears asking if you want to print the shopper receipt.- Returns:
- promptBeforePrinting
-
setPromptBeforePrinting
public void setPromptBeforePrinting(Boolean promptBeforePrinting)
Indicates whether a screen appears asking if you want to print the shopper receipt.- Parameters:
promptBeforePrinting-
-
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-- Returns:
- the current
ReceiptOptionsinstance, 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
-
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-
-
equals
public boolean equals(Object o)
Return true if this ReceiptOptions object is equal to o.
-
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
-
-