File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,22 @@ class TerminalCloudAPI extends Service {
52
52
return ObjectSerializer . serialize ( request , "TerminalApiRequest" ) ;
53
53
}
54
54
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 > {
56
62
const request = TerminalCloudAPI . setApplicationInfo ( terminalApiRequest ) ;
57
63
return getJsonResponse < TerminalApiRequest > ( this . terminalApiAsync , request ) ;
58
64
}
59
65
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
+ */
60
71
public async sync ( terminalApiRequest : TerminalApiRequest ) : Promise < TerminalApiResponse > {
61
72
const request = TerminalCloudAPI . setApplicationInfo ( terminalApiRequest ) ;
62
73
const response = await getJsonResponse < TerminalApiRequest , TerminalApiResponse > (
You can’t perform that action at this time.
0 commit comments