@Entity public class DemoPerRequestPaymentData extends java.lang.Object implements PerRequestPaymentData
Constructor and Description |
---|
DemoPerRequestPaymentData() |
Modifier and Type | Method and Description |
---|---|
java.lang.Integer |
getId() |
Amount |
getOrderAmount() |
byte[] |
getPreImageHash()
Unique identifier of a payment in the system and also used in LightningHandler
to identify an invoice.
|
boolean |
isExecuted() |
boolean |
isPayPerRequest() |
boolean |
isSettled() |
void |
setExecuted(boolean executed) |
void |
setId(java.lang.Integer id) |
void |
setOrderAmount(Amount orderAmount) |
void |
setPayPerRequest(boolean payPerRequest) |
void |
setPreImageHash(byte[] preImageHash) |
void |
setSettled(boolean settled) |
java.lang.String |
toString() |
public java.lang.Integer getId()
public void setId(java.lang.Integer id)
id
- Unique Id of database row.public byte[] getPreImageHash()
getPreImageHash
in interface MinimalPaymentData
public void setPreImageHash(byte[] preImageHash)
setPreImageHash
in interface MinimalPaymentData
preImageHash
- unique identifier of a payment in the system and also used in LightningHandler
to identify an invoice. Should be generated by TokenGenerator when
creating an order and not set manually.public Amount getOrderAmount()
getOrderAmount
in interface MinimalPaymentData
public void setOrderAmount(Amount orderAmount)
setOrderAmount
in interface MinimalPaymentData
orderAmount
- the requested amount for payment. This can be either a FiatAmount or CryptoAmount but
always make sure the systems configured CurrencyConverter supports this currency when converting
into a currency accepted by the LightningHandler later in the payment flow.public boolean isSettled()
isSettled
in interface MinimalPaymentData
public void setSettled(boolean settled)
setSettled
in interface MinimalPaymentData
settled
- true if related invoice have been settled in full.public boolean isPayPerRequest()
isPayPerRequest
in interface PerRequestPaymentData
public void setPayPerRequest(boolean payPerRequest)
setPayPerRequest
in interface PerRequestPaymentData
payPerRequest
- flag indicating that this payment is for one request only. The implementation
can take the payPerRequest flag from the order request as guidance, but it is the PaymentHandler
that ultimately decides if payPerRequest should be set.public boolean isExecuted()
isExecuted
in interface PerRequestPaymentData
public void setExecuted(boolean executed)
setExecuted
in interface PerRequestPaymentData
executed
- true if related request have been executed, is set after successful processing
if a payed call and used to indicate that it cannot be processed again.public java.lang.String toString()
toString
in class java.lang.Object