Package com.adyen.model.tapi
Class OutputContent
- java.lang.Object
-
- com.adyen.model.tapi.OutputContent
-
public class OutputContent extends Object
Content to display or print. This is a sequence of elements if they have different formats.
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_OUTPUT_BARCODEstatic StringJSON_PROPERTY_OUTPUT_FORMATstatic StringJSON_PROPERTY_OUTPUT_TEXTstatic StringJSON_PROPERTY_OUTPUT_X_H_T_M_Lstatic StringJSON_PROPERTY_PREDEFINED_CONTENT
-
Constructor Summary
Constructors Constructor Description OutputContent()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputContentaddOutputTextItem(OutputText outputTextItem)booleanequals(Object o)Return true if this OutputContent object is equal to o.static OutputContentfromJson(String jsonString)Create an instance of OutputContent given an JSON stringMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.OutputBarcodegetOutputBarcode()Get outputBarcodeOutputFormatgetOutputFormat()Get outputFormatList<OutputText>getOutputText()Content of text message to display or print.byte[]getOutputXHTML()XHTML document body containing the message to display or print.PredefinedContentgetPredefinedContent()Get predefinedContentinthashCode()OutputContentincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.OutputContentoutputBarcode(OutputBarcode outputBarcode)outputBarcodeOutputContentoutputFormat(OutputFormat outputFormat)outputFormatOutputContentoutputText(List<OutputText> outputText)Content of text message to display or print.OutputContentoutputXHTML(byte[] outputXHTML)XHTML document body containing the message to display or print.OutputContentpredefinedContent(PredefinedContent predefinedContent)predefinedContentvoidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetOutputBarcode(OutputBarcode outputBarcode)outputBarcodevoidsetOutputFormat(OutputFormat outputFormat)outputFormatvoidsetOutputText(List<OutputText> outputText)Content of text message to display or print.voidsetOutputXHTML(byte[] outputXHTML)XHTML document body containing the message to display or print.voidsetPredefinedContent(PredefinedContent predefinedContent)predefinedContentStringtoJson()Convert an instance of OutputContent to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_OUTPUT_FORMAT
public static final String JSON_PROPERTY_OUTPUT_FORMAT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PREDEFINED_CONTENT
public static final String JSON_PROPERTY_PREDEFINED_CONTENT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_OUTPUT_TEXT
public static final String JSON_PROPERTY_OUTPUT_TEXT
- See Also:
- Constant Field Values
-
JSON_PROPERTY_OUTPUT_X_H_T_M_L
public static final String JSON_PROPERTY_OUTPUT_X_H_T_M_L
- See Also:
- Constant Field Values
-
JSON_PROPERTY_OUTPUT_BARCODE
public static final String JSON_PROPERTY_OUTPUT_BARCODE
- See Also:
- Constant Field Values
-
-
Method Detail
-
outputFormat
public OutputContent outputFormat(OutputFormat outputFormat)
outputFormat- Parameters:
outputFormat-- Returns:
- the current
OutputContentinstance, allowing for method chaining
-
getOutputFormat
public OutputFormat getOutputFormat()
Get outputFormat- Returns:
- outputFormat
-
setOutputFormat
public void setOutputFormat(OutputFormat outputFormat)
outputFormat- Parameters:
outputFormat-
-
predefinedContent
public OutputContent predefinedContent(PredefinedContent predefinedContent)
predefinedContent- Parameters:
predefinedContent-- Returns:
- the current
OutputContentinstance, allowing for method chaining
-
getPredefinedContent
public PredefinedContent getPredefinedContent()
Get predefinedContent- Returns:
- predefinedContent
-
setPredefinedContent
public void setPredefinedContent(PredefinedContent predefinedContent)
predefinedContent- Parameters:
predefinedContent-
-
outputText
public OutputContent outputText(List<OutputText> outputText)
Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.- Parameters:
outputText- Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.- Returns:
- the current
OutputContentinstance, allowing for method chaining
-
addOutputTextItem
public OutputContent addOutputTextItem(OutputText outputTextItem)
-
getOutputText
public List<OutputText> getOutputText()
Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.- Returns:
- outputText Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
-
setOutputText
public void setOutputText(List<OutputText> outputText)
Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.- Parameters:
outputText- Content of text message to display or print. Mandatory, if `OutputFormat` is Text, not allowed otherwise. One instance of `OutputText` per shared format.
-
outputXHTML
public OutputContent outputXHTML(byte[] outputXHTML)
XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.- Parameters:
outputXHTML- XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.- Returns:
- the current
OutputContentinstance, allowing for method chaining
-
getOutputXHTML
public byte[] getOutputXHTML()
XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.- Returns:
- outputXHTML XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
-
setOutputXHTML
public void setOutputXHTML(byte[] outputXHTML)
XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.- Parameters:
outputXHTML- XHTML document body containing the message to display or print. Mandatory if `OutputFormat` is XHTML, not allowed otherwise.
-
outputBarcode
public OutputContent outputBarcode(OutputBarcode outputBarcode)
outputBarcode- Parameters:
outputBarcode-- Returns:
- the current
OutputContentinstance, allowing for method chaining
-
getOutputBarcode
public OutputBarcode getOutputBarcode()
Get outputBarcode- Returns:
- outputBarcode
-
setOutputBarcode
public void setOutputBarcode(OutputBarcode outputBarcode)
outputBarcode- Parameters:
outputBarcode-
-
includeNullValues
public OutputContent 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 OutputContent object is equal to o.
-
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 OutputContent fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of OutputContent given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of OutputContent
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to OutputContent
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of OutputContent to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-