Skip to content

Commit 71583ad

Browse files
committed
Added minor change to template
1 parent f9d4a43 commit 71583ad

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • generator/cybersource-java-template/libraries/okhttp-gson

generator/cybersource-java-template/libraries/okhttp-gson/api.mustache

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import {{invokerPackage}}.ProgressResponseBody;
1414
import {{invokerPackage}}.BeanValidationException;
1515
{{/performBeanValidation}}
1616

17+
import com.cybersource.authsdk.core.ConfigException;
1718
import com.google.gson.reflect.TypeToken;
1819

1920
import java.io.IOException;
@@ -145,7 +146,7 @@ public class {{classname}} {
145146
}
146147

147148
@SuppressWarnings("rawtypes")
148-
private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
149+
private okhttp3.Call {{operationId}}ValidateBeforeCall({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException, ConfigException {
149150
{{^performBeanValidation}}
150151
{{#allParams}}{{#required}}
151152
// verify the required parameter '{{paramName}}' is set
@@ -199,7 +200,7 @@ public class {{classname}} {
199200
* @return {{returnType}}{{/returnType}}
200201
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
201202
*/
202-
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
203+
public {{#returnType}}{{{returnType}}} {{/returnType}}{{^returnType}}void {{/returnType}}{{operationId}}({{#allParams}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException, ConfigException {
203204
logger.info("CALL TO METHOD '{{operationId}}' STARTED");
204205
{{#returnType}}ApiResponse<{{{returnType}}}> {{localVariablePrefix}}resp = {{/returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}});
205206
{{#returnType}}
@@ -214,7 +215,7 @@ public class {{classname}} {
214215
* @return ApiResponse&lt;{{#returnType}}{{returnType}}{{/returnType}}{{^returnType}}Void{{/returnType}}&gt;
215216
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
216217
*/
217-
public ApiResponse<{{#vendorExtensions.x-streaming}}InputStream{{/vendorExtensions.x-streaming}}{{^vendorExtensions.x-streaming}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/vendorExtensions.x-streaming}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException {
218+
public ApiResponse<{{#vendorExtensions.x-streaming}}InputStream{{/vendorExtensions.x-streaming}}{{^vendorExtensions.x-streaming}}{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}{{/vendorExtensions.x-streaming}}> {{operationId}}WithHttpInfo({{#allParams}}{{#useBeanValidation}}{{>beanValidationQueryParams}}{{/useBeanValidation}}{{{dataType}}} {{paramName}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) throws ApiException, ConfigException {
218219
this.apiClient.setComputationStartTime(System.nanoTime());
219220
okhttp3.Call {{localVariablePrefix}}call = {{operationId}}ValidateBeforeCall({{#allParams}}{{paramName}}, {{/allParams}}null, null);
220221
{{#returnType}}Type {{localVariablePrefix}}localVarReturnType = new TypeToken<{{{returnType}}}>(){}.getType();
@@ -229,7 +230,7 @@ public class {{classname}} {
229230
* @return The request call
230231
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
231232
*/
232-
public okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException {
233+
public okhttp3.Call {{operationId}}Async({{#allParams}}{{{dataType}}} {{paramName}}, {{/allParams}}final ApiCallback<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}Void{{/returnType}}> {{localVariablePrefix}}callback) throws ApiException, ConfigException {
233234
234235
this.apiClient.setComputationStartTime(System.nanoTime());
235236
ProgressResponseBody.ProgressListener progressListener = null;

0 commit comments

Comments
 (0)