public interface StandardPaymentData extends MinimalPaymentData
If system should support payPerRequest payments should the implementing data also implement the PerRequestPaymentData.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDescription() |
CryptoAmount |
getInvoiceAmount() |
java.time.Instant |
getInvoiceDate() |
java.time.Instant |
getInvoiceExpireDate() |
CryptoAmount |
getSettledAmount() |
java.time.Instant |
getSettlementDate() |
java.time.Duration |
getSettlementDuration()
The settlement duration indicates how long time a generated settlement should be valid.
|
void |
setDescription(java.lang.String description) |
void |
setInvoiceAmount(CryptoAmount invoiceAmount) |
void |
setInvoiceDate(java.time.Instant invoiceDate) |
void |
setInvoiceExpireDate(java.time.Instant invoiceExpireDate) |
void |
setSettledAmount(CryptoAmount settledAmount) |
void |
setSettlementDate(java.time.Instant settlementDate) |
void |
setSettlementDuration(java.time.Duration settlementDuration)
The settlement duration indicates how long time a generated settlement should be valid.
|
getOrderAmount, getPreImageHash, isSettled, setOrderAmount, setPreImageHash, setSettled
java.lang.String getDescription()
void setDescription(java.lang.String description)
description
- a short description of the payment used in the lightning invoice and might
be displayed to the end user.CryptoAmount getInvoiceAmount()
void setInvoiceAmount(CryptoAmount invoiceAmount)
invoiceAmount
- the amount set in the lightning invoice, this is the same as orderAmount if
the same currency is used in order as in lightning invoice, otherwise is the currency
converted before creating the invoice in LightningHandler and the actual invoiced amount
is specified here.java.time.Instant getInvoiceDate()
void setInvoiceDate(java.time.Instant invoiceDate)
invoiceDate
- the date the invoice was created in LightningHandler.java.time.Instant getInvoiceExpireDate()
void setInvoiceExpireDate(java.time.Instant invoiceExpireDate)
invoiceExpireDate
- the date a generated invoice should expire, this value will be used
when creating invoice in LightningHandler. If null will default invoice validity
be used to calculate an expire date automatically.CryptoAmount getSettledAmount()
void setSettledAmount(CryptoAmount settledAmount)
settledAmount
- the amount that was settled in the LightningHandlers supported crypto currency.
Should be equal to invoiceAmount if fully settled. Null if invoice isn't settled yet.java.time.Instant getSettlementDate()
void setSettlementDate(java.time.Instant settlementDate)
settlementDate
- the timestamp the invoice was settled in LightningHandler. Null if not settled yet.java.time.Duration getSettlementDuration()
If settlement expire date is set it has precedence over settlementDuration.
Important: Data in this field is only set to instruct the settlement token generator of expiration date. the actual settlement date is not updated in this field.
FullPaymentData.getSettlementExpireDate()
void setSettlementDuration(java.time.Duration settlementDuration)
If settlement expire date is set it has precedence over settlementDuration.
settlementDuration
- the specific duration of this message.FullPaymentData.getSettlementExpireDate()