Skip to content

Commit

Permalink
CF-672: added properties to transaction detail and changed method ret…
Browse files Browse the repository at this point in the history
…urning custom string data (#937)
  • Loading branch information
drocek authored and Filip Ocelka committed Sep 23, 2024
1 parent 6bc4b20 commit b85ffe7
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.generalbytes.batm.server.extensions;

public interface ICustomString {

/**
* @return Name of custom string.
*/
default String getName() {
return null;
}

/**
* @return Value of custom string.
*/
default String getValue() {
return null;
}

/**
* @return Language in the ISO standard (for example 'en' for English, 'de' for German, 'de_CH' for Swiss German etc.).
*/
default String getLanguage() {
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.math.BigDecimal;
import java.net.InetSocketAddress;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
Expand Down Expand Up @@ -854,17 +855,15 @@ public static class EmbeddedEmailImage {
void unlockTransaction(String rid, Date serverTimeToUnlock);

/**
* Returns the custom string value set in CAS.
* Returns the list of custom strings.
*
* @param serialNumber Terminal or GB Safe serial number.
* @param customStringName Name of custom string.
* @param language Language in the ISO standard (for example 'en' for English, 'de' for German, 'de_CH' for Swiss German etc.).
* For default value, set language to {@code "default"} or leave blank. If no value is found for the specified
* language, the value for the default language will be returned (if available), otherwise {@code null}.
* @return Custom string value from the selected terminal or GB Safe in the selected language. Returns {@code null} if not found.
*/
default String getCustomStringValue(String serialNumber, String customStringName, String language) {
return null;
* @param serialNumber Serial number of terminal or GB Safe.
* @param customStringName Name of custom string. If null, returns all custom strings of selected terminal or GB Safe.
* @return Values of the selected custom string in all available languages from the selected terminal or GB Safe.
* Returns an empty list if no custom string is found.
*/
default List<ICustomString> getCustomStrings(String serialNumber, String customStringName) {
return new ArrayList<>();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -329,4 +329,16 @@ public interface ITransactionDetails {
* @return Payment type: CASH/PAYMENT_CARD
*/
String getPaymentType();

/**
* @return UUID of transaction.
*/
String getUuid();

/**
* Returns the name of the crypto setting used for the transaction.
* @return Name of crypto setting used for the transaction.
*/
String getNameOfCryptoSettingUsed();

}

0 comments on commit b85ffe7

Please sign in to comment.