-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDocumentsApi.java
More file actions
1112 lines (960 loc) · 58.7 KB
/
Copy pathDocumentsApi.java
File metadata and controls
1112 lines (960 loc) · 58.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* AvaTax Software Development Kit for Java (JRE)
*
* (c) 2004-2025 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Avalara E-Invoicing API
*
* An API that supports sending data for an E-Invoicing compliance use-case.
*
* @author Sachin Baijal <sachin.baijal@avalara.com>
* @author Jonathan Wenger <jonathan.wenger@avalara.com>
* @copyright 2004-2025 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @link https://github.com/avadev/Avalara-SDK-Java
*/
package Avalara.SDK.api.EInvoicing.V1;
import Avalara.SDK.ApiCallback;
import Avalara.SDK.ApiClient;
import Avalara.SDK.ApiException;
import Avalara.SDK.ApiResponse;
import Avalara.SDK.Configuration;
import Avalara.SDK.Pair;
import Avalara.SDK.ProgressRequestBody;
import Avalara.SDK.ProgressResponseBody;
import Avalara.SDK.AvalaraMicroservice;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import java.util.*;
import Avalara.SDK.model.EInvoicing.V1.BadDownloadRequest;
import Avalara.SDK.model.EInvoicing.V1.BadRequest;
import java.math.BigDecimal;
import Avalara.SDK.model.EInvoicing.V1.DocumentFetch;
import Avalara.SDK.model.EInvoicing.V1.DocumentListResponse;
import Avalara.SDK.model.EInvoicing.V1.DocumentStatusResponse;
import Avalara.SDK.model.EInvoicing.V1.DocumentSubmissionError;
import Avalara.SDK.model.EInvoicing.V1.DocumentSubmitResponse;
import Avalara.SDK.model.EInvoicing.V1.FetchDocumentsRequest;
import java.io.File;
import Avalara.SDK.model.EInvoicing.V1.ForbiddenError;
import Avalara.SDK.model.EInvoicing.V1.InternalServerError;
import Avalara.SDK.model.EInvoicing.V1.NotFoundError;
import java.time.OffsetDateTime;
import Avalara.SDK.model.EInvoicing.V1.SubmitDocumentMetadata;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class DocumentsApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public DocumentsApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
SetConfiguration(apiClient);
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
/**
* Build call for downloadDocument
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> * Content-type - <br> </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
<tr><td> 406 </td><td> Unsupported document format was requested in the Accept header </td><td> - </td></tr>
</table>
*/
public okhttp3.Call downloadDocumentCall(DownloadDocumentRequest requestParameters, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
//OAuth2 Scopes
String requiredScopes = "";
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/einvoicing/documents/{documentId}/$download"
.replaceAll("\\{" + "documentId" + "\\}", localVarApiClient.escapeString(requestParameters.documentId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
if (requestParameters.getAccept() != null) {
localVarHeaderParams.put("Accept", localVarApiClient.parameterToString(requestParameters.getAccept()));
}
if (requestParameters.getXAvalaraClient() != null) {
localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient()));
}
final String[] localVarAccepts = {
"application/pdf", "application/xml", "application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth", "Bearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call downloadDocumentValidateBeforeCall(DownloadDocumentRequest requestParameters, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestParameters.avalaraVersion' is set
if (requestParameters.getAvalaraVersion() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling downloadDocument(Async)");
}
// verify the required parameter 'requestParameters.accept' is set
if (requestParameters.getAccept() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.accept' when calling downloadDocument(Async)");
}
// verify the required parameter 'requestParameters.documentId' is set
if (requestParameters.getDocumentId() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.documentId' when calling downloadDocument(Async)");
}
okhttp3.Call localVarCall = downloadDocumentCall(requestParameters, _callback);
return localVarCall;
}
/**
* Returns a copy of the document
* When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned.
* @param requestOptions Object which represents the options available for a given API/request
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> * Content-type - <br> </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
<tr><td> 406 </td><td> Unsupported document format was requested in the Accept header </td><td> - </td></tr>
</table>
*/
public File downloadDocument(DownloadDocumentRequest requestParameters) throws ApiException {
ApiResponse<File> localVarResp = downloadDocumentWithHttpInfo(requestParameters);
return localVarResp.getData();
}
/**
* Returns a copy of the document
* When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned.
* @param requestOptions Object which represents the options available for a given API/request
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> * Content-type - <br> </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
<tr><td> 406 </td><td> Unsupported document format was requested in the Accept header </td><td> - </td></tr>
</table>
*/
public ApiResponse<File> downloadDocumentWithHttpInfo(DownloadDocumentRequest requestParameters) throws ApiException {
okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(requestParameters, null);
Type localVarReturnType = new TypeToken<File>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Returns a copy of the document (asynchronously)
* When the document is available, use this endpoint to download it as text, XML, or PDF. The output format needs to be specified in the Accept header, and it will vary depending on the mandate. If the file has not yet been created, then status code 404 (not found) is returned.
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> * Content-type - <br> </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
<tr><td> 406 </td><td> Unsupported document format was requested in the Accept header </td><td> - </td></tr>
</table>
*/
public okhttp3.Call downloadDocumentAsync(DownloadDocumentRequest requestParameters, final ApiCallback<File> _callback) throws ApiException {
okhttp3.Call localVarCall = downloadDocumentValidateBeforeCall(requestParameters, _callback);
Type localVarReturnType = new TypeToken<File>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Represents the Request object for the DownloadDocument API
*
* @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used</param>
* @param accept This header indicates the MIME type of the document</param>
* @param documentId The unique ID for this document that was returned in the POST /einvoicing/document response body</param>
* @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional)</param>
*/
public class DownloadDocumentRequest {
private String avalaraVersion;
private String accept;
private String documentId;
private String xAvalaraClient;
public DownloadDocumentRequest () {
}
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getAccept() { return accept; }
public void setAccept(String accept) { this.accept = accept; }
public String getDocumentId() { return documentId; }
public void setDocumentId(String documentId) { this.documentId = documentId; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
}
/**
* Getter function to instantiate Request class
* @returns DownloadDocumentRequest
*/
public DownloadDocumentRequest getDownloadDocumentRequest() {
return this.new DownloadDocumentRequest();
}
/**
* Build call for fetchDocuments
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Accepted DocumentFetch Request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call fetchDocumentsCall(FetchDocumentsRequest requestParameters, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
//OAuth2 Scopes
String requiredScopes = "";
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = requestParameters.getFetchDocumentsRequest();
// create path and map variables
String localVarPath = "/einvoicing/documents/$fetch";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
if (requestParameters.getXAvalaraClient() != null) {
localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient()));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth", "Bearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call fetchDocumentsValidateBeforeCall(FetchDocumentsRequest requestParameters, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestParameters.avalaraVersion' is set
if (requestParameters.getAvalaraVersion() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling fetchDocuments(Async)");
}
// verify the required parameter 'requestParameters.fetchDocumentsRequest' is set
if (requestParameters.getFetchDocumentsRequest() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.fetchDocumentsRequest' when calling fetchDocuments(Async)");
}
okhttp3.Call localVarCall = fetchDocumentsCall(requestParameters, _callback);
return localVarCall;
}
/**
* Fetch the inbound document from a tax authority
* This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number.
* @param requestOptions Object which represents the options available for a given API/request
* @return DocumentFetch
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Accepted DocumentFetch Request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
</table>
*/
public DocumentFetch fetchDocuments(FetchDocumentsRequest requestParameters) throws ApiException {
ApiResponse<DocumentFetch> localVarResp = fetchDocumentsWithHttpInfo(requestParameters);
return localVarResp.getData();
}
/**
* Fetch the inbound document from a tax authority
* This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number.
* @param requestOptions Object which represents the options available for a given API/request
* @return ApiResponse<DocumentFetch>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Accepted DocumentFetch Request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
</table>
*/
public ApiResponse<DocumentFetch> fetchDocumentsWithHttpInfo(FetchDocumentsRequest requestParameters) throws ApiException {
okhttp3.Call localVarCall = fetchDocumentsValidateBeforeCall(requestParameters, null);
Type localVarReturnType = new TypeToken<DocumentFetch>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Fetch the inbound document from a tax authority (asynchronously)
* This API allows you to retrieve an inbound document. Pass key-value pairs as parameters in the request, such as the confirmation number, supplier number, and buyer VAT number.
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> Accepted DocumentFetch Request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 500 </td><td> Internal Server Error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call fetchDocumentsAsync(FetchDocumentsRequest requestParameters, final ApiCallback<DocumentFetch> _callback) throws ApiException {
okhttp3.Call localVarCall = fetchDocumentsValidateBeforeCall(requestParameters, _callback);
Type localVarReturnType = new TypeToken<DocumentFetch>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Represents the Request object for the FetchDocuments API
*
* @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used</param>
* @param fetchDocumentsRequest </param>
* @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional)</param>
*/
public class FetchDocumentsRequest {
private String avalaraVersion;
private FetchDocumentsRequest fetchDocumentsRequest;
private String xAvalaraClient;
public FetchDocumentsRequest () {
}
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public FetchDocumentsRequest getFetchDocumentsRequest() { return fetchDocumentsRequest; }
public void setFetchDocumentsRequest(FetchDocumentsRequest fetchDocumentsRequest) { this.fetchDocumentsRequest = fetchDocumentsRequest; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
}
/**
* Getter function to instantiate Request class
* @returns FetchDocumentsRequest
*/
public FetchDocumentsRequest getFetchDocumentsRequest() {
return this.new FetchDocumentsRequest();
}
/**
* Build call for getDocumentList
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getDocumentListCall(GetDocumentListRequest requestParameters, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
//OAuth2 Scopes
String requiredScopes = "";
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/einvoicing/documents";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (requestParameters.getStartDate() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", requestParameters.getStartDate()));
}
if (requestParameters.getEndDate() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("endDate", requestParameters.getEndDate()));
}
if (requestParameters.getFlow() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("flow", requestParameters.getFlow()));
}
if (requestParameters.get$count() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("$count", requestParameters.get$count()));
}
if (requestParameters.get$countOnly() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("$countOnly", requestParameters.get$countOnly()));
}
if (requestParameters.get$filter() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter()));
}
if (requestParameters.get$top() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("$top", requestParameters.get$top()));
}
if (requestParameters.get$skip() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("$skip", requestParameters.get$skip()));
}
if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
if (requestParameters.getXAvalaraClient() != null) {
localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient()));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth", "Bearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getDocumentListValidateBeforeCall(GetDocumentListRequest requestParameters, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestParameters.avalaraVersion' is set
if (requestParameters.getAvalaraVersion() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getDocumentList(Async)");
}
okhttp3.Call localVarCall = getDocumentListCall(requestParameters, _callback);
return localVarCall;
}
/**
* Returns a summary of documents for a date range
* Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.
* @param requestOptions Object which represents the options available for a given API/request
* @return DocumentListResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
</table>
*/
public DocumentListResponse getDocumentList(GetDocumentListRequest requestParameters) throws ApiException {
ApiResponse<DocumentListResponse> localVarResp = getDocumentListWithHttpInfo(requestParameters);
return localVarResp.getData();
}
/**
* Returns a summary of documents for a date range
* Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.
* @param requestOptions Object which represents the options available for a given API/request
* @return ApiResponse<DocumentListResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
</table>
*/
public ApiResponse<DocumentListResponse> getDocumentListWithHttpInfo(GetDocumentListRequest requestParameters) throws ApiException {
okhttp3.Call localVarCall = getDocumentListValidateBeforeCall(requestParameters, null);
Type localVarReturnType = new TypeToken<DocumentListResponse>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Returns a summary of documents for a date range (asynchronously)
* Get a list of documents on the Avalara E-Invoicing platform that have a processing date within the specified date range.
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getDocumentListAsync(GetDocumentListRequest requestParameters, final ApiCallback<DocumentListResponse> _callback) throws ApiException {
okhttp3.Call localVarCall = getDocumentListValidateBeforeCall(requestParameters, _callback);
Type localVarReturnType = new TypeToken<DocumentListResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Represents the Request object for the GetDocumentList API
*
* @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used</param>
* @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional)</param>
* @param startDate Start date of documents to return. This defaults to the previous month. (optional)</param>
* @param endDate End date of documents to return. This defaults to the current date. (optional)</param>
* @param flow Optionally filter by document direction, where issued = `out` and received = `in` (optional)</param>
* @param $count When set to true, the count of the collection is also returned in the response body (optional)</param>
* @param $countOnly When set to true, only the count of the collection is returned (optional)</param>
* @param $filter Filter by field name and value. This filter only supports <code>eq</code> . Refer to [https://developer.avalara.com/avatax/filtering-in-rest/](https://developer.avalara.com/avatax/filtering-in-rest/) for more information on filtering. Filtering will be done over the provided startDate and endDate. If no startDate or endDate is provided, defaults will be assumed. (optional)</param>
* @param $top The number of items to include in the result. (optional)</param>
* @param $skip If nonzero, skip this number of results before returning data. Used with <code>$top</code> to provide pagination for large datasets. (optional)</param>
*/
public class GetDocumentListRequest {
private String avalaraVersion;
private String xAvalaraClient;
private OffsetDateTime startDate;
private OffsetDateTime endDate;
private String flow;
private String $count;
private String $countOnly;
private String $filter;
private BigDecimal $top;
private String $skip;
public GetDocumentListRequest () {
}
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
public OffsetDateTime getStartDate() { return startDate; }
public void setStartDate(OffsetDateTime startDate) { this.startDate = startDate; }
public OffsetDateTime getEndDate() { return endDate; }
public void setEndDate(OffsetDateTime endDate) { this.endDate = endDate; }
public String getFlow() { return flow; }
public void setFlow(String flow) { this.flow = flow; }
public String get$count() { return $count; }
public void set$count(String $count) { this.$count = $count; }
public String get$countOnly() { return $countOnly; }
public void set$countOnly(String $countOnly) { this.$countOnly = $countOnly; }
public String get$filter() { return $filter; }
public void set$filter(String $filter) { this.$filter = $filter; }
public BigDecimal get$top() { return $top; }
public void set$top(BigDecimal $top) { this.$top = $top; }
public String get$skip() { return $skip; }
public void set$skip(String $skip) { this.$skip = $skip; }
}
/**
* Getter function to instantiate Request class
* @returns GetDocumentListRequest
*/
public GetDocumentListRequest getGetDocumentListRequest() {
return this.new GetDocumentListRequest();
}
/**
* Build call for getDocumentStatus
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getDocumentStatusCall(GetDocumentStatusRequest requestParameters, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
//OAuth2 Scopes
String requiredScopes = "";
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/einvoicing/documents/{documentId}/status"
.replaceAll("\\{" + "documentId" + "\\}", localVarApiClient.escapeString(requestParameters.documentId.toString()));
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
if (requestParameters.getXAvalaraClient() != null) {
localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient()));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth", "Bearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getDocumentStatusValidateBeforeCall(GetDocumentStatusRequest requestParameters, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestParameters.avalaraVersion' is set
if (requestParameters.getAvalaraVersion() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling getDocumentStatus(Async)");
}
// verify the required parameter 'requestParameters.documentId' is set
if (requestParameters.getDocumentId() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.documentId' when calling getDocumentStatus(Async)");
}
okhttp3.Call localVarCall = getDocumentStatusCall(requestParameters, _callback);
return localVarCall;
}
/**
* Checks the status of a document
* Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.
* @param requestOptions Object which represents the options available for a given API/request
* @return DocumentStatusResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
</table>
*/
public DocumentStatusResponse getDocumentStatus(GetDocumentStatusRequest requestParameters) throws ApiException {
ApiResponse<DocumentStatusResponse> localVarResp = getDocumentStatusWithHttpInfo(requestParameters);
return localVarResp.getData();
}
/**
* Checks the status of a document
* Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.
* @param requestOptions Object which represents the options available for a given API/request
* @return ApiResponse<DocumentStatusResponse>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
</table>
*/
public ApiResponse<DocumentStatusResponse> getDocumentStatusWithHttpInfo(GetDocumentStatusRequest requestParameters) throws ApiException {
okhttp3.Call localVarCall = getDocumentStatusValidateBeforeCall(requestParameters, null);
Type localVarReturnType = new TypeToken<DocumentStatusResponse>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Checks the status of a document (asynchronously)
* Using the unique ID from POST /einvoicing/documents response body, request the current status of a document.
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> OK </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
<tr><td> 404 </td><td> A document for the specified ID was not found. </td><td> - </td></tr>
</table>
*/
public okhttp3.Call getDocumentStatusAsync(GetDocumentStatusRequest requestParameters, final ApiCallback<DocumentStatusResponse> _callback) throws ApiException {
okhttp3.Call localVarCall = getDocumentStatusValidateBeforeCall(requestParameters, _callback);
Type localVarReturnType = new TypeToken<DocumentStatusResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Represents the Request object for the GetDocumentStatus API
*
* @param avalaraVersion The HTTP Header meant to specify the version of the API intended to be used</param>
* @param documentId The unique ID for this document that was returned in the POST /einvoicing/documents response body</param>
* @param xAvalaraClient You can freely use any text you wish for this value. This feature can help you diagnose and solve problems with your software. The header can be treated like a fingerprint. (optional)</param>
*/
public class GetDocumentStatusRequest {
private String avalaraVersion;
private String documentId;
private String xAvalaraClient;
public GetDocumentStatusRequest () {
}
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.3"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getDocumentId() { return documentId; }
public void setDocumentId(String documentId) { this.documentId = documentId; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
}
/**
* Getter function to instantiate Request class
* @returns GetDocumentStatusRequest
*/
public GetDocumentStatusRequest getGetDocumentStatusRequest() {
return this.new GetDocumentStatusRequest();
}
/**
* Build call for submitDocument
* @param requestOptions Object which represents the options available for a given API/request
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 201 </td><td> Created </td><td> - </td></tr>
<tr><td> 400 </td><td> Bad request </td><td> - </td></tr>
<tr><td> 401 </td><td> Unauthorized </td><td> - </td></tr>
<tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
</table>
*/
public okhttp3.Call submitDocumentCall(SubmitDocumentRequest requestParameters, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
//OAuth2 Scopes
String requiredScopes = "";
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/einvoicing/documents";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
if (requestParameters.getMetadata() != null) {
localVarFormParams.put("metadata", requestParameters.getMetadata());
}
if (requestParameters.getData() != null) {
localVarFormParams.put("data", requestParameters.getData());
}
if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
if (requestParameters.getXAvalaraClient() != null) {
localVarHeaderParams.put("X-Avalara-Client", localVarApiClient.parameterToString(requestParameters.getXAvalaraClient()));
}
final String[] localVarAccepts = {
"application/json", "text/xml"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"multipart/form-data"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "OAuth", "Bearer" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, requiredScopes, AvalaraMicroservice.EInvoicing);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call submitDocumentValidateBeforeCall(SubmitDocumentRequest requestParameters, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'requestParameters.avalaraVersion' is set
if (requestParameters.getAvalaraVersion() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.avalaraVersion' when calling submitDocument(Async)");
}
// verify the required parameter 'requestParameters.metadata' is set
if (requestParameters.getMetadata() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.metadata' when calling submitDocument(Async)");
}
// verify the required parameter 'requestParameters.data' is set
if (requestParameters.getData() == null) {
throw new ApiException("Missing the required parameter 'requestParameters.data' when calling submitDocument(Async)");
}