|
| 1 | +package com.docusign.esign.api; |
| 2 | + |
| 3 | +import com.sun.jersey.api.client.GenericType; |
| 4 | + |
| 5 | +import com.docusign.esign.client.ApiException; |
| 6 | +import com.docusign.esign.client.ApiClient; |
| 7 | +import com.docusign.esign.client.Configuration; |
| 8 | +import com.docusign.esign.client.Pair; |
| 9 | + |
| 10 | +import com.docusign.esign.model.ViewUrl; |
| 11 | +import com.docusign.esign.model.ErrorDetails; |
| 12 | +import com.docusign.esign.model.ReturnUrlRequest; |
| 13 | + |
| 14 | + |
| 15 | +public class DefaultApi { |
| 16 | + private ApiClient apiClient; |
| 17 | + |
| 18 | + public DefaultApi() { |
| 19 | + this(Configuration.getDefaultApiClient()); |
| 20 | + } |
| 21 | + |
| 22 | + public DefaultApi(ApiClient apiClient) { |
| 23 | + this.apiClient = apiClient; |
| 24 | + } |
| 25 | + |
| 26 | + public ApiClient getApiClient() { |
| 27 | + return apiClient; |
| 28 | + } |
| 29 | + |
| 30 | + public void setApiClient(ApiClient apiClient) { |
| 31 | + this.apiClient = apiClient; |
| 32 | + } |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + /** |
| 39 | + * Provides a URL to start an edit view of the Template UI |
| 40 | + * |
| 41 | + * @param accountId The external account number (int) or account ID Guid. |
| 42 | + * @param templateId The ID of the template being accessed. |
| 43 | + |
| 44 | + * DefaultApi.TemplateEditViewOptions Options for modifying the method behavior. |
| 45 | + * @return ViewUrl |
| 46 | + * @throws ApiException if fails to make API call |
| 47 | + */ |
| 48 | + public ViewUrl templateEditView(String accountId, String templateId, ReturnUrlRequest returnUrlRequest) throws ApiException { |
| 49 | + Object localVarPostBody = returnUrlRequest; |
| 50 | + |
| 51 | + // verify the required parameter 'accountId' is set |
| 52 | + if (accountId == null) { |
| 53 | + throw new ApiException(400, "Missing the required parameter 'accountId' when calling templateEditView"); |
| 54 | + } |
| 55 | + |
| 56 | + // verify the required parameter 'templateId' is set |
| 57 | + if (templateId == null) { |
| 58 | + throw new ApiException(400, "Missing the required parameter 'templateId' when calling templateEditView"); |
| 59 | + } |
| 60 | + |
| 61 | + // create path and map variables |
| 62 | + String localVarPath = "/v2/accounts/{accountId}/templates/{templateId}/views/edit".replaceAll("\\{format\\}","json") |
| 63 | + .replaceAll("\\{" + "accountId" + "\\}", apiClient.escapeString(accountId.toString())) |
| 64 | + .replaceAll("\\{" + "templateId" + "\\}", apiClient.escapeString(templateId.toString())); |
| 65 | + |
| 66 | + // query params |
| 67 | + java.util.List<Pair> localVarQueryParams = new java.util.ArrayList<Pair>(); |
| 68 | + java.util.Map<String, String> localVarHeaderParams = new java.util.HashMap<String, String>(); |
| 69 | + java.util.Map<String, Object> localVarFormParams = new java.util.HashMap<String, Object>(); |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + final String[] localVarAccepts = { |
| 78 | + "application/json" |
| 79 | + }; |
| 80 | + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); |
| 81 | + |
| 82 | + final String[] localVarContentTypes = { |
| 83 | + |
| 84 | + }; |
| 85 | + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); |
| 86 | + |
| 87 | + String[] localVarAuthNames = new String[] { }; |
| 88 | + |
| 89 | + |
| 90 | + GenericType<ViewUrl> localVarReturnType = new GenericType<ViewUrl>() {}; |
| 91 | + return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType); |
| 92 | + |
| 93 | + } |
| 94 | + |
| 95 | +} |
0 commit comments