-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package com.generalbytes.batm.server.extensions; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* Represents data necessary to generate a receipt message. | ||
* This interface provides access to placeholder variables and embedded images | ||
* that may be used within a receipt. | ||
*/ | ||
public interface ReceiptData { | ||
|
||
/** | ||
* Retrieves a map of placeholder variables for the receipt. | ||
* These variables contain values for all placeholders available for constructing | ||
* a receipt message. | ||
* | ||
* <p>Each entry in the map represents a placeholder's name and its corresponding value. | ||
* Placeholders are identified by their names without brackets. For example, a key | ||
* {@code "text.crypto.amount"} corresponds to the value for the placeholder | ||
* {@code {text.crypto.amount}} in the receipt template.</p> | ||
* | ||
* @return A map containing placeholder names as keys and their corresponding values. | ||
*/ | ||
Map<String, String> getVariables(); | ||
|
||
/** | ||
* Retrieves an array of embedded images to be included in the receipt email. | ||
* | ||
* <p>This method is specifically intended for email receipts | ||
* ({@link ReceiptTransferMethod#EMAIL}), where embedded images are used.</p> | ||
* | ||
* @return An array of {@link IExtensionContext.EmbeddedEmailImage} objects, | ||
* representing the images to embed in the email. | ||
* @see IExtensionContext#sendHTMLMailAsync(String, String, String, String, String, IExtensionContext.EmbeddedEmailImage...) | ||
*/ | ||
IExtensionContext.EmbeddedEmailImage[] getEmbeddedEmailImages(); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters