public class PaymentOption extends JSONParsable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
option |
protected java.lang.String |
value |
Constructor and Description |
---|
PaymentOption()
Empty Constructor
|
PaymentOption(javax.json.JsonObject jsonObject)
JSON Parseable constructor
|
PaymentOption(PaymentOption paymentOption)
Constructor converting an annotated payment option into a value object.
|
Modifier and Type | Method and Description |
---|---|
void |
convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
Method that should set the objects property to Json representation.
|
java.lang.String |
getOption() |
java.lang.String |
getValue() |
void |
parseJson(javax.json.JsonObject jsonObject)
Method to read all properties from a JsonObject into this value object.
|
void |
setOption(java.lang.String option) |
void |
setValue(java.lang.String value) |
add, addB58, addNotRequired, addNotRequiredB58, getBoolean, getBooleanIfSet, getByteArrayFromB58, getByteArrayFromB58IfSet, getByteArrayFromB64, getByteArrayFromB64IfSet, getByteArrayFromHex, getByteArrayFromHexIfSet, getDate, getDateIfSet, getDouble, getDoubleIfSet, getInt, getIntIfSet, getJsonArray, getJsonArrayIfSet, getJsonObject, getJsonObjectIfSet, getLong, getLongIfSet, getString, getStringIfSet, toJson, toJsonAsString, toString
public PaymentOption()
public PaymentOption(PaymentOption paymentOption)
paymentOption
- the related paymentOption annotation.public PaymentOption(javax.json.JsonObject jsonObject) throws javax.json.JsonException
jsonObject
- the json object to parsejavax.json.JsonException
public java.lang.String getOption()
public void setOption(java.lang.String option)
option
- the name of the option set. Values should be supported
by the configured payment handler.public java.lang.String getValue()
public void setValue(java.lang.String value)
value
- the options value. Values should be supported
by the configured payment handler.public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder) throws javax.json.JsonException
convertToJson
in class JSONParsable
jsonObjectBuilder
- the json object build to use to set key/values in jsonjavax.json.JsonException
- if problems occurred converting object to JSON.public void parseJson(javax.json.JsonObject jsonObject) throws javax.json.JsonException
parseJson
in class JSONParsable
jsonObject
- the json object to read key and values from and set object properties.javax.json.JsonException
- if problems occurred converting object from JSON.