Skip to content

Commit 846ff0d

Browse files
committed
Refactor sendReady method to return void in DeviceInterface and UpaInterface
1 parent b8ff7b7 commit 846ff0d

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

src/main/java/com/global/api/terminals/DeviceInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ public IDeviceResponse sendFile(SendFileType fileType, String filePath) throws A
200200
}
201201

202202
@Override
203-
public IDeviceResponse sendReady() throws ApiException {
203+
public void sendReady() throws ApiException {
204204
throw new UnsupportedTransactionException(ERROR_MESSAGE);
205205
}
206206

src/main/java/com/global/api/terminals/abstractions/IDeviceInterface.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public interface IDeviceInterface extends IDisposable {
107107

108108
IDeviceResponse sendFile(SendFileType fileType, String filePath) throws ApiException;
109109

110-
IDeviceResponse sendReady() throws ApiException; //UPA
110+
void sendReady() throws ApiException; //UPA
111111

112112
IDeviceResponse setDebugLevel(DebugLevel[] debugLevels, Enum logToConsole) throws ApiException;
113113

src/main/java/com/global/api/terminals/upa/UpaInterface.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,12 @@ public IBatchReportResponse findBatches() throws ApiException {
204204
}
205205

206206
@Override
207-
public IDeviceResponse sendReady() throws ApiException {
207+
public void sendReady() throws ApiException {
208208
DeviceMessage message = TerminalUtilities.buildMessage(
209209
READY_MESSAGE
210210
);
211211

212-
JsonDoc response = sendRequest(message);
213-
return new UpaDeviceResponse(response);
212+
_controller.send(message);
214213
}
215214

216215
public IDeviceResponse registerPOS(RegisterPOS data) throws ApiException {

0 commit comments

Comments
 (0)