diff --git a/gradle.properties b/gradle.properties index f66d9c8d4..e5384dca8 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ # buildscript - project id projectGroup=com.generalbytes.batm.public -projectVersion=1.8.0 +projectVersion=1.8.1 # buildscript - common dependency versions bitrafaelVersion=1.0.44 diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java new file mode 100644 index 000000000..5c83cc329 --- /dev/null +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ICustomString.java @@ -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; + } + +} diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java index 461da7fff..5b230b9fc 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IExtensionContext.java @@ -1,5 +1,5 @@ /************************************************************************************* - * Copyright (C) 2014-2020 GENERAL BYTES s.r.o. All rights reserved. + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. * * This software may be distributed and modified under the terms of the GNU * General Public License version 2 (GPL2) as published by the Free Software @@ -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; @@ -308,6 +309,16 @@ public interface IExtensionContext { */ boolean addIdentityPiece(String identityPublicId, IIdentityPiece iidentityPiece); + /** + * Add note to identity. + * @param identityPublicId Public ID of identity. + * @param note Text of note. + * @return Return true if note has been set to the identity. Otherwise, return false. + */ + default boolean addNoteToIdentity(String identityPublicId, String note) { + return false; + } + /** * Update an existing personal info identity piece. * @@ -508,13 +519,13 @@ public static class EmbeddedEmailImage { * @throws BuyException */ ITransactionBuyInfo buyCrypto(String terminalSerialNumber, BigDecimal fiatAmount, String fiatCurrency, BigDecimal cryptoAmount, String cryptoCurrency, String destinationAddress, String identityPublicId, String discountCode) throws BuyException; - /** - * Call this transaction to create a cash back transaction. After this call server will allocate cash for the customer that can visit machine and withdraw cash. - * @param fiatAmount - * @param fiatCurrency - * @param identityPublicId - * @return - read ITransactionSellInfo.getTransactionUUID() to find out what should be filled in sell QR code. - */ + /** + * Call this transaction to create a cash back transaction. After this call server will allocate cash for the customer that can visit machine and withdraw cash. + * @param fiatAmount + * @param fiatCurrency + * @param identityPublicId + * @return - read ITransactionSellInfo.getTransactionUUID() to find out what should be filled in sell QR code. + */ ITransactionCashbackInfo cashback(String terminalSerialNumber, BigDecimal fiatAmount, String fiatCurrency, String identityPublicId) throws CashbackException; @@ -852,4 +863,17 @@ public static class EmbeddedEmailImage { * @param serverTimeToUnlock The absolute datetime when the transaction should unlock. */ void unlockTransaction(String rid, Date serverTimeToUnlock); + + /** + * Returns the list of custom strings. + * + * @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 getCustomStrings(String serialNumber, String customStringName) { + return new ArrayList<>(); + } + } diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java index eb0d75a05..cfcd81815 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/IReceiptDetails.java @@ -1,5 +1,5 @@ /************************************************************************************* - * Copyright (C) 2014-2020 GENERAL BYTES s.r.o. All rights reserved. + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. * * This software may be distributed and modified under the terms of the GNU * General Public License version 2 (GPL2) as published by the Free Software @@ -17,6 +17,8 @@ ************************************************************************************/ package com.generalbytes.batm.server.extensions; +import java.util.Set; + public interface IReceiptDetails { String CUSTOM_DATA_RECEIPT_LANGUAGE = "receipt.language"; @@ -49,4 +51,9 @@ public interface IReceiptDetails { */ String getUserLanguage(); + /** + * @return Methods used to send the receipt. It always contains at least one transfer method. + */ + Set getTransferMethods(); + } diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java index 5de9b6037..c0243b76c 100644 --- a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ITransactionDetails.java @@ -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(); + } diff --git a/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java new file mode 100644 index 000000000..5b86ea95b --- /dev/null +++ b/server_extensions_api/src/main/java/com/generalbytes/batm/server/extensions/ReceiptTransferMethod.java @@ -0,0 +1,23 @@ +/************************************************************************************* + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. + * + * This software may be distributed and modified under the terms of the GNU + * General Public License version 2 (GPL2) as published by the Free Software + * Foundation and appearing in the file GPL2.TXT included in the packaging of + * this file. Please note that GPL2 Section 2[b] requires that all works based + * on this software must also be made publicly available under the terms of + * the GPL2 ("Copyleft"). + * + * Contact information + * ------------------- + * + * GENERAL BYTES s.r.o. + * Web : http://www.generalbytes.com + * + ************************************************************************************/ +package com.generalbytes.batm.server.extensions; + +public enum ReceiptTransferMethod { + SMS, + EMAIL +} \ No newline at end of file diff --git a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java index 4fa5b1892..e913b13f2 100644 --- a/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java +++ b/server_extensions_extra/src/main/java/com/generalbytes/batm/server/extensions/TestExtensionContext.java @@ -1,3 +1,20 @@ +/************************************************************************************* + * Copyright (C) 2014-2024 GENERAL BYTES s.r.o. All rights reserved. + * + * This software may be distributed and modified under the terms of the GNU + * General Public License version 2 (GPL2) as published by the Free Software + * Foundation and appearing in the file GPL2.TXT included in the packaging of + * this file. Please note that GPL2 Section 2[b] requires that all works based + * on this software must also be made publicly available under the terms of + * the GPL2 ("Copyleft"). + * + * Contact information + * ------------------- + * + * GENERAL BYTES s.r.o. + * Web : http://www.generalbytes.com + * + ************************************************************************************/ package com.generalbytes.batm.server.extensions; import com.generalbytes.batm.server.extensions.aml.verification.ApplicantCheckResult;