Skip to content

Commit 6dadfb2

Browse files
committed
Rozne response zwracane przez endpoint Contractors
1 parent 5836341 commit 6dadfb2

File tree

5 files changed

+318
-17
lines changed

5 files changed

+318
-17
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Ten klient API zapewnia interfejsy Java dla Symfonia WebAPI, umożliwiając pły
6363
6464
## 📦 Informacje o wersji
6565

66-
- **Aktualna wersja**: `0.1.5`
66+
- **Aktualna wersja**: `0.1.6`
6767
- **Wymagana wersja Java**: Java 17+
6868

6969
## 🔓 Licencja
@@ -84,7 +84,7 @@ Możesz dodać bibliotekę do swojego projektu, dołączając zależność z Mav
8484
<dependency>
8585
<groupId>pl.wtx.symfonia</groupId>
8686
<artifactId>symfonia-erp-webapi-client</artifactId>
87-
<version>0.1.5</version>
87+
<version>0.1.6</version>
8888
</dependency>
8989
```
9090

@@ -102,7 +102,7 @@ Następnie dodaj zbudowany artefakt do swojego projektu:
102102
<dependency>
103103
<groupId>pl.wtx.symfonia</groupId>
104104
<artifactId>symfonia-erp-webapi-client</artifactId>
105-
<version>0.1.5</version>
105+
<version>0.1.6</version>
106106
</dependency>
107107
```
108108

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>pl.wtx.symfonia</groupId>
77
<artifactId>symfonia-erp-webapi-client</artifactId>
8-
<version>0.1.5</version>
8+
<version>0.1.6</version>
99
<packaging>jar</packaging>
1010

1111
<name>Symfonia ERP WebAPI Client</name>

src/main/java/pl/wtx/symfonia/api/client/ContractorsApi.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@
2828

2929

3030
import pl.wtx.symfonia.api.client.model.ApiError;
31-
import pl.wtx.symfonia.api.client.model.Contractor;
3231
import pl.wtx.symfonia.api.client.model.ContractorCriteriaFilter;
3332
import pl.wtx.symfonia.api.client.model.ContractorListElement;
33+
import pl.wtx.symfonia.api.client.model.GetContractors200Response;
3434

3535
import java.lang.reflect.Type;
3636
import java.util.ArrayList;
@@ -87,7 +87,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
8787
<table border="1">
8888
<caption>Response Details</caption>
8989
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
90-
<tr><td> 200 </td><td> Zwraca kolekcje obiektow Contractor. </td><td> - </td></tr>
90+
<tr><td> 200 </td><td> Jeśli parametr &#39;id&#39; jest podany, zwracany jest pojedynczy obiekt Contractor. Jeśli parametr &#39;nip&#39; jest podany, zwracana jest lista obiektów Contractor. </td><td> - </td></tr>
9191
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
9292
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
9393
<tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
@@ -161,20 +161,20 @@ private okhttp3.Call getContractorsValidateBeforeCall(@javax.annotation.Nullable
161161
* @param id Identyfikator kontrahenta. (optional)
162162
* @param code Kod kontrahenta. (optional)
163163
* @param nip Identyfikator NIP kontrahenta. (optional)
164-
* @return List&lt;Contractor&gt;
164+
* @return GetContractors200Response
165165
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
166166
* @http.response.details
167167
<table border="1">
168168
<caption>Response Details</caption>
169169
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
170-
<tr><td> 200 </td><td> Zwraca kolekcje obiektow Contractor. </td><td> - </td></tr>
170+
<tr><td> 200 </td><td> Jeśli parametr &#39;id&#39; jest podany, zwracany jest pojedynczy obiekt Contractor. Jeśli parametr &#39;nip&#39; jest podany, zwracana jest lista obiektów Contractor. </td><td> - </td></tr>
171171
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
172172
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
173173
<tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
174174
</table>
175175
*/
176-
public List<Contractor> getContractors(@javax.annotation.Nullable String id, @javax.annotation.Nullable String code, @javax.annotation.Nullable String nip) throws ApiException {
177-
ApiResponse<List<Contractor>> localVarResp = getContractorsWithHttpInfo(id, code, nip);
176+
public GetContractors200Response getContractors(@javax.annotation.Nullable String id, @javax.annotation.Nullable String code, @javax.annotation.Nullable String nip) throws ApiException {
177+
ApiResponse<GetContractors200Response> localVarResp = getContractorsWithHttpInfo(id, code, nip);
178178
return localVarResp.getData();
179179
}
180180

@@ -184,21 +184,21 @@ public List<Contractor> getContractors(@javax.annotation.Nullable String id, @ja
184184
* @param id Identyfikator kontrahenta. (optional)
185185
* @param code Kod kontrahenta. (optional)
186186
* @param nip Identyfikator NIP kontrahenta. (optional)
187-
* @return ApiResponse&lt;List&lt;Contractor&gt;&gt;
187+
* @return ApiResponse&lt;GetContractors200Response&gt;
188188
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
189189
* @http.response.details
190190
<table border="1">
191191
<caption>Response Details</caption>
192192
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
193-
<tr><td> 200 </td><td> Zwraca kolekcje obiektow Contractor. </td><td> - </td></tr>
193+
<tr><td> 200 </td><td> Jeśli parametr &#39;id&#39; jest podany, zwracany jest pojedynczy obiekt Contractor. Jeśli parametr &#39;nip&#39; jest podany, zwracana jest lista obiektów Contractor. </td><td> - </td></tr>
194194
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
195195
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
196196
<tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
197197
</table>
198198
*/
199-
public ApiResponse<List<Contractor>> getContractorsWithHttpInfo(@javax.annotation.Nullable String id, @javax.annotation.Nullable String code, @javax.annotation.Nullable String nip) throws ApiException {
199+
public ApiResponse<GetContractors200Response> getContractorsWithHttpInfo(@javax.annotation.Nullable String id, @javax.annotation.Nullable String code, @javax.annotation.Nullable String nip) throws ApiException {
200200
okhttp3.Call localVarCall = getContractorsValidateBeforeCall(id, code, nip, null);
201-
Type localVarReturnType = new TypeToken<List<Contractor>>(){}.getType();
201+
Type localVarReturnType = new TypeToken<GetContractors200Response>(){}.getType();
202202
return localVarApiClient.execute(localVarCall, localVarReturnType);
203203
}
204204

@@ -215,16 +215,16 @@ public ApiResponse<List<Contractor>> getContractorsWithHttpInfo(@javax.annotatio
215215
<table border="1">
216216
<caption>Response Details</caption>
217217
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
218-
<tr><td> 200 </td><td> Zwraca kolekcje obiektow Contractor. </td><td> - </td></tr>
218+
<tr><td> 200 </td><td> Jeśli parametr &#39;id&#39; jest podany, zwracany jest pojedynczy obiekt Contractor. Jeśli parametr &#39;nip&#39; jest podany, zwracana jest lista obiektów Contractor. </td><td> - </td></tr>
219219
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
220220
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
221221
<tr><td> 404 </td><td> Not Found </td><td> - </td></tr>
222222
</table>
223223
*/
224-
public okhttp3.Call getContractorsAsync(@javax.annotation.Nullable String id, @javax.annotation.Nullable String code, @javax.annotation.Nullable String nip, final ApiCallback<List<Contractor>> _callback) throws ApiException {
224+
public okhttp3.Call getContractorsAsync(@javax.annotation.Nullable String id, @javax.annotation.Nullable String code, @javax.annotation.Nullable String nip, final ApiCallback<GetContractors200Response> _callback) throws ApiException {
225225

226226
okhttp3.Call localVarCall = getContractorsValidateBeforeCall(id, code, nip, _callback);
227-
Type localVarReturnType = new TypeToken<List<Contractor>>(){}.getType();
227+
Type localVarReturnType = new TypeToken<GetContractors200Response>(){}.getType();
228228
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
229229
return localVarCall;
230230
}

src/main/java/pl/wtx/symfonia/api/client/invoker/JSON.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
102102
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.ContractorCriteriaFilter.CustomTypeAdapterFactory());
103103
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.ContractorListElement.CustomTypeAdapterFactory());
104104
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.Dimension.CustomTypeAdapterFactory());
105+
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.GetContractors200Response.CustomTypeAdapterFactory());
105106
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.InventoryState.CustomTypeAdapterFactory());
106107
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.LoadedModuleInfo.CustomTypeAdapterFactory());
107108
gsonBuilder.registerTypeAdapterFactory(new pl.wtx.symfonia.api.client.model.Order.CustomTypeAdapterFactory());

0 commit comments

Comments
 (0)