public class InvoiceResponse extends Response
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TYPE |
| Constructor and Description |
|---|
InvoiceResponse()
Empty constructor.
|
InvoiceResponse(InvoiceResult invoiceResult,
boolean isPayPerRequest,
RequestPolicyType requestPolicyType,
boolean includeNodeInfo,
java.lang.String checkSettlementLink,
java.lang.String qrLink,
java.lang.String checkSettlementWebSocketEndpoint,
java.lang.String baseCheckSettlementWebSocketQueue)
Default constructor used by PaywallInterceptor.
|
| 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 |
getBolt11Invoice() |
java.lang.String |
getCheckSettlementLink() |
java.lang.String |
getCheckSettlementWebSocketEndpoint() |
java.lang.String |
getCheckSettlementWebSocketQueue() |
java.lang.String |
getDescription() |
CryptoAmount |
getInvoiceAmount() |
java.util.Date |
getInvoiceDate() |
java.util.Date |
getInvoiceExpireDate() |
NodeInfo |
getNodeInfo() |
java.lang.Boolean |
getPayPerRequest() |
java.lang.String |
getPreImageHash() |
java.lang.String |
getQrLink() |
java.lang.String |
getRequestPolicyType() |
java.lang.String |
getToken() |
java.lang.String |
getType() |
void |
parseJson(javax.json.JsonObject jsonObject)
Method to read all properties from a JsonObject into this value object.
|
void |
setBolt11Invoice(java.lang.String bolt11Invoice) |
void |
setCheckSettlementLink(java.lang.String checkSettlementLink) |
void |
setCheckSettlementWebSocketEndpoint(java.lang.String checkSettlementWebSocketEndpoint) |
void |
setCheckSettlementWebSocketQueue(java.lang.String checkSettlementWebSocketQueue) |
void |
setDescription(java.lang.String description) |
void |
setInvoiceAmount(CryptoAmount invoiceAmount) |
void |
setInvoiceDate(java.util.Date invoiceDate) |
void |
setInvoiceExpireDate(java.util.Date invoiceExpireDate) |
void |
setNodeInfo(NodeInfo nodeInfo) |
void |
setPayPerRequest(java.lang.Boolean payPerRequest) |
void |
setPreImageHash(java.lang.String preImageHash) |
void |
setQrLink(java.lang.String qrLink) |
void |
setRequestPolicyType(java.lang.String requestPolicyType) |
void |
setToken(java.lang.String token) |
void |
setType(java.lang.String type) |
java.lang.String |
toString()
Converts data content to pretty printed Json string.
|
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, toJsonAsStringpublic static final java.lang.String TYPE
public InvoiceResponse()
public InvoiceResponse(InvoiceResult invoiceResult, boolean isPayPerRequest, RequestPolicyType requestPolicyType, boolean includeNodeInfo, java.lang.String checkSettlementLink, java.lang.String qrLink, java.lang.String checkSettlementWebSocketEndpoint, java.lang.String baseCheckSettlementWebSocketQueue) throws InternalErrorException
invoiceResult - The related invoice resultisPayPerRequest - if invoice is required per request or if settlement with be valid for multiple requests
during a period of time.requestPolicyType - the related request policy type.includeNodeInfo - if lightning connection information info should be included in the response.checkSettlementLink - link to check settlement controller.qrLink - link to generate QR Code controller.checkSettlementWebSocketEndpoint - the URL to the check settlement web socket end point.baseCheckSettlementWebSocketQueue - the check settlement web socket queue name without preImageHash. (Should end with a /)InternalErrorException - if internal error occurred creating the object.public java.lang.String getType()
public void setType(java.lang.String type)
type - the type 'invoice', used in JSON conversions only.public java.lang.String getPreImageHash()
public void setPreImageHash(java.lang.String preImageHash)
preImageHash - the generated preImageHash from PreImageData which acts as an unique id for the payment.public java.lang.String getBolt11Invoice()
public void setBolt11Invoice(java.lang.String bolt11Invoice)
bolt11Invoice - the bolt11 invoice to display for the requester.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description - description to display in the invoice. (Optional).public CryptoAmount getInvoiceAmount()
public void setInvoiceAmount(CryptoAmount invoiceAmount)
invoiceAmount - the amount in the invoice. (Optional)public NodeInfo getNodeInfo()
public void setNodeInfo(NodeInfo nodeInfo)
nodeInfo - information about the related lightning node. (Optional)public java.lang.String getToken()
public void setToken(java.lang.String token)
token - the generated JWT invoice token used to track the payment when checking settlement.public java.util.Date getInvoiceDate()
public void setInvoiceDate(java.util.Date invoiceDate)
invoiceDate - the time this invoice was created.public java.util.Date getInvoiceExpireDate()
public void setInvoiceExpireDate(java.util.Date invoiceExpireDate)
invoiceExpireDate - the time the invoice will expire.public java.lang.Boolean getPayPerRequest()
public void setPayPerRequest(java.lang.Boolean payPerRequest)
payPerRequest - if payment is for this api is for one time only or usage is for a given period of time.public java.lang.String getRequestPolicyType()
public void setRequestPolicyType(java.lang.String requestPolicyType)
requestPolicyType - specifying type of policy used for aggregating
significant request data.public java.lang.String getCheckSettlementLink()
public void setCheckSettlementLink(java.lang.String checkSettlementLink)
checkSettlementLink - link to settlement controller for checking payment state.public java.lang.String getQrLink()
public void setQrLink(java.lang.String qrLink)
qrLink - link to QR Code generator controller.public java.lang.String getCheckSettlementWebSocketEndpoint()
public void setCheckSettlementWebSocketEndpoint(java.lang.String checkSettlementWebSocketEndpoint)
checkSettlementWebSocketEndpoint - URL to the WebSocket CheckSettlement EndPoint.public java.lang.String getCheckSettlementWebSocketQueue()
public void setCheckSettlementWebSocketQueue(java.lang.String checkSettlementWebSocketQueue)
checkSettlementWebSocketQueue - the preImageHash unique web socket queue to subscribe to.public void convertToJson(javax.json.JsonObjectBuilder jsonObjectBuilder)
throws javax.json.JsonException
convertToJson in class ResponsejsonObjectBuilder - 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
public java.lang.String toString()
JSONParsabletoString in class JSONParsable