Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from 1.7 to master #939

Merged
merged 7 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
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
@@ -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
Expand Down 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 @@ -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.
*
Expand Down Expand Up @@ -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;


Expand Down Expand Up @@ -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<ICustomString> getCustomStrings(String serialNumber, String customStringName) {
return new ArrayList<>();
}

}
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -17,6 +17,8 @@
************************************************************************************/
package com.generalbytes.batm.server.extensions;

import java.util.Set;

public interface IReceiptDetails {

String CUSTOM_DATA_RECEIPT_LANGUAGE = "receipt.language";
Expand Down Expand Up @@ -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<ReceiptTransferMethod> getTransferMethods();

}
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();

}
Original file line number Diff line number Diff line change
@@ -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
}
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Loading