Class GeneratePaymentRequestResponse
java.lang.Object
xyz.tcheeric.cashu.voucher.app.dto.GeneratePaymentRequestResponse
Response DTO for generating a NUT-18V VoucherPaymentRequest.
Contains the encoded payment request string that can be displayed as a QR code or shared with customers, along with the parsed request object for reference.
Usage Example
GeneratePaymentRequestResponse response = voucherService.generatePaymentRequest(request); // Get the encoded string for QR code String qrContent = response.getEncodedRequest(); // Get payment ID for tracking String paymentId = response.getPaymentId(); // Access the full request object if needed VoucherPaymentRequest voucherRequest = response.getRequest();
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates a successful response from an encoded request and parsed object.
-
Constructor Details
-
GeneratePaymentRequestResponse
public GeneratePaymentRequestResponse()
-
-
Method Details
-
from
public static GeneratePaymentRequestResponse from(String encodedRequest, xyz.tcheeric.cashu.common.nut18.VoucherPaymentRequest request) Creates a successful response from an encoded request and parsed object.- Parameters:
encodedRequest- the encoded request stringrequest- the parsed VoucherPaymentRequest- Returns:
- a new response instance
-