Skip to content

Commit 3e3609d

Browse files
committed
Update async signature
1 parent d2c0b16 commit 3e3609d

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/services/terminalCloudAPI.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,22 @@ class TerminalCloudAPI extends Service {
5252
return ObjectSerializer.serialize(request, "TerminalApiRequest");
5353
}
5454

55-
public async(terminalApiRequest: TerminalApiRequest): Promise<string> {
55+
/**
56+
* Send an asynchronous payment request to the Terminal API.
57+
*
58+
* @param terminalApiRequest - The request to send.
59+
* @returns A promise that resolves to "ok" if the request was successful, or a TerminalApiResponse if there is an error.
60+
*/
61+
public async(terminalApiRequest: TerminalApiRequest): Promise<string | TerminalApiResponse> {
5662
const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest);
5763
return getJsonResponse<TerminalApiRequest>(this.terminalApiAsync, request);
5864
}
5965

66+
/**
67+
* Send a synchronous payment request to the Terminal API.
68+
* @param terminalApiRequest - The request to send.
69+
* @returns A promise that resolves to a TerminalApiResponse.
70+
*/
6071
public async sync(terminalApiRequest: TerminalApiRequest): Promise<TerminalApiResponse> {
6172
const request = TerminalCloudAPI.setApplicationInfo(terminalApiRequest);
6273
const response = await getJsonResponse<TerminalApiRequest, TerminalApiResponse>(

0 commit comments

Comments
 (0)