|
29 | 29 |
|
30 | 30 | import pl.wtx.symfonia.api.client.model.ApiError; |
31 | 31 | import pl.wtx.symfonia.api.client.model.Contractor; |
| 32 | +import pl.wtx.symfonia.api.client.model.ContractorCriteriaFilter; |
| 33 | +import pl.wtx.symfonia.api.client.model.ContractorListElement; |
32 | 34 |
|
33 | 35 | import java.lang.reflect.Type; |
34 | 36 | import java.util.ArrayList; |
@@ -226,4 +228,135 @@ public okhttp3.Call getContractorsAsync(@javax.annotation.Nullable String id, @j |
226 | 228 | localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
227 | 229 | return localVarCall; |
228 | 230 | } |
| 231 | + /** |
| 232 | + * Build call for getContractorsByFilterSql |
| 233 | + * @param contractorCriteriaFilter (required) |
| 234 | + * @param _callback Callback for upload/download progress |
| 235 | + * @return Call to execute |
| 236 | + * @throws ApiException If fail to serialize the request body object |
| 237 | + * @http.response.details |
| 238 | + <table border="1"> |
| 239 | + <caption>Response Details</caption> |
| 240 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 241 | + <tr><td> 200 </td><td> Zwraca kolekcje obiektow ContractorListElement. </td><td> - </td></tr> |
| 242 | + <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr> |
| 243 | + </table> |
| 244 | + */ |
| 245 | + public okhttp3.Call getContractorsByFilterSqlCall(@javax.annotation.Nonnull ContractorCriteriaFilter contractorCriteriaFilter, final ApiCallback _callback) throws ApiException { |
| 246 | + String basePath = null; |
| 247 | + // Operation Servers |
| 248 | + String[] localBasePaths = new String[] { }; |
| 249 | + |
| 250 | + // Determine Base Path to Use |
| 251 | + if (localCustomBaseUrl != null){ |
| 252 | + basePath = localCustomBaseUrl; |
| 253 | + } else if ( localBasePaths.length > 0 ) { |
| 254 | + basePath = localBasePaths[localHostIndex]; |
| 255 | + } else { |
| 256 | + basePath = null; |
| 257 | + } |
| 258 | + |
| 259 | + Object localVarPostBody = contractorCriteriaFilter; |
| 260 | + |
| 261 | + // create path and map variables |
| 262 | + String localVarPath = "/Contractors/FilterSql"; |
| 263 | + |
| 264 | + List<Pair> localVarQueryParams = new ArrayList<Pair>(); |
| 265 | + List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>(); |
| 266 | + Map<String, String> localVarHeaderParams = new HashMap<String, String>(); |
| 267 | + Map<String, String> localVarCookieParams = new HashMap<String, String>(); |
| 268 | + Map<String, Object> localVarFormParams = new HashMap<String, Object>(); |
| 269 | + |
| 270 | + final String[] localVarAccepts = { |
| 271 | + "application/json" |
| 272 | + }; |
| 273 | + final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); |
| 274 | + if (localVarAccept != null) { |
| 275 | + localVarHeaderParams.put("Accept", localVarAccept); |
| 276 | + } |
| 277 | + |
| 278 | + final String[] localVarContentTypes = { |
| 279 | + "application/json" |
| 280 | + }; |
| 281 | + final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); |
| 282 | + if (localVarContentType != null) { |
| 283 | + localVarHeaderParams.put("Content-Type", localVarContentType); |
| 284 | + } |
| 285 | + |
| 286 | + String[] localVarAuthNames = new String[] { }; |
| 287 | + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); |
| 288 | + } |
| 289 | + |
| 290 | + @SuppressWarnings("rawtypes") |
| 291 | + private okhttp3.Call getContractorsByFilterSqlValidateBeforeCall(@javax.annotation.Nonnull ContractorCriteriaFilter contractorCriteriaFilter, final ApiCallback _callback) throws ApiException { |
| 292 | + // verify the required parameter 'contractorCriteriaFilter' is set |
| 293 | + if (contractorCriteriaFilter == null) { |
| 294 | + throw new ApiException("Missing the required parameter 'contractorCriteriaFilter' when calling getContractorsByFilterSql(Async)"); |
| 295 | + } |
| 296 | + |
| 297 | + return getContractorsByFilterSqlCall(contractorCriteriaFilter, _callback); |
| 298 | + |
| 299 | + } |
| 300 | + |
| 301 | + /** |
| 302 | + * Metoda umozliwia pobranie listy kontrahentow spelniajacych podane kryteria wyszukiwania przy uzyciu w skladni SQL. |
| 303 | + * |
| 304 | + * @param contractorCriteriaFilter (required) |
| 305 | + * @return List<ContractorListElement> |
| 306 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 307 | + * @http.response.details |
| 308 | + <table border="1"> |
| 309 | + <caption>Response Details</caption> |
| 310 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 311 | + <tr><td> 200 </td><td> Zwraca kolekcje obiektow ContractorListElement. </td><td> - </td></tr> |
| 312 | + <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr> |
| 313 | + </table> |
| 314 | + */ |
| 315 | + public List<ContractorListElement> getContractorsByFilterSql(@javax.annotation.Nonnull ContractorCriteriaFilter contractorCriteriaFilter) throws ApiException { |
| 316 | + ApiResponse<List<ContractorListElement>> localVarResp = getContractorsByFilterSqlWithHttpInfo(contractorCriteriaFilter); |
| 317 | + return localVarResp.getData(); |
| 318 | + } |
| 319 | + |
| 320 | + /** |
| 321 | + * Metoda umozliwia pobranie listy kontrahentow spelniajacych podane kryteria wyszukiwania przy uzyciu w skladni SQL. |
| 322 | + * |
| 323 | + * @param contractorCriteriaFilter (required) |
| 324 | + * @return ApiResponse<List<ContractorListElement>> |
| 325 | + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body |
| 326 | + * @http.response.details |
| 327 | + <table border="1"> |
| 328 | + <caption>Response Details</caption> |
| 329 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 330 | + <tr><td> 200 </td><td> Zwraca kolekcje obiektow ContractorListElement. </td><td> - </td></tr> |
| 331 | + <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr> |
| 332 | + </table> |
| 333 | + */ |
| 334 | + public ApiResponse<List<ContractorListElement>> getContractorsByFilterSqlWithHttpInfo(@javax.annotation.Nonnull ContractorCriteriaFilter contractorCriteriaFilter) throws ApiException { |
| 335 | + okhttp3.Call localVarCall = getContractorsByFilterSqlValidateBeforeCall(contractorCriteriaFilter, null); |
| 336 | + Type localVarReturnType = new TypeToken<List<ContractorListElement>>(){}.getType(); |
| 337 | + return localVarApiClient.execute(localVarCall, localVarReturnType); |
| 338 | + } |
| 339 | + |
| 340 | + /** |
| 341 | + * Metoda umozliwia pobranie listy kontrahentow spelniajacych podane kryteria wyszukiwania przy uzyciu w skladni SQL. (asynchronously) |
| 342 | + * |
| 343 | + * @param contractorCriteriaFilter (required) |
| 344 | + * @param _callback The callback to be executed when the API call finishes |
| 345 | + * @return The request call |
| 346 | + * @throws ApiException If fail to process the API call, e.g. serializing the request body object |
| 347 | + * @http.response.details |
| 348 | + <table border="1"> |
| 349 | + <caption>Response Details</caption> |
| 350 | + <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> |
| 351 | + <tr><td> 200 </td><td> Zwraca kolekcje obiektow ContractorListElement. </td><td> - </td></tr> |
| 352 | + <tr><td> 400 </td><td> Bad Request </td><td> - </td></tr> |
| 353 | + </table> |
| 354 | + */ |
| 355 | + public okhttp3.Call getContractorsByFilterSqlAsync(@javax.annotation.Nonnull ContractorCriteriaFilter contractorCriteriaFilter, final ApiCallback<List<ContractorListElement>> _callback) throws ApiException { |
| 356 | + |
| 357 | + okhttp3.Call localVarCall = getContractorsByFilterSqlValidateBeforeCall(contractorCriteriaFilter, _callback); |
| 358 | + Type localVarReturnType = new TypeToken<List<ContractorListElement>>(){}.getType(); |
| 359 | + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); |
| 360 | + return localVarCall; |
| 361 | + } |
229 | 362 | } |
0 commit comments