Skip to content

Commit

Permalink
Update java SDK with avalaraVersioning scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Wenger committed Jan 3, 2025
1 parent d04ead0 commit 28ed073
Show file tree
Hide file tree
Showing 47 changed files with 184 additions and 262 deletions.
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>Avalara.SDK</artifactId>
<packaging>jar</packaging>
<name>Avalara.SDK</name>
<version>24.12.10</version>
<version>24.12.1</version>
<url>https://github.com/avasachinbaijal/AvaTax-REST-V3-JRE-SDK</url>
<description>OpenAPI Java</description>
<scm>
Expand Down Expand Up @@ -259,11 +259,6 @@
<artifactId>swagger-annotations</artifactId>
<version>${swagger-core-version}</version>
</dependency>
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>dotenv-java</artifactId>
<version>3.0.0</version>
</dependency>
<!-- @Nullable annotation -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
Expand All @@ -285,6 +280,11 @@
<artifactId>gson</artifactId>
<version>${gson-version}</version>
</dependency>
<dependency>
<groupId>io.github.cdimascio</groupId>
<artifactId>dotenv-java</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>io.gsonfire</groupId>
<artifactId>gson-fire</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AvaTax Software Development Kit for Java (JRE)
*
* (c) 2004-2022 Avalara, Inc.
* (c) 2004-2025 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -12,10 +12,9 @@
*
* @author Sachin Baijal <[email protected]>
* @author Jonathan Wenger <[email protected]>
* @copyright 2004-2022 Avalara, Inc.
* @copyright 2004-2025 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @version
* @link https://github.com/avadev/AvaTax-REST-V3-JRE-SDK
* @link https://github.com/avadev/Avalara-SDK-Java
*/

package Avalara.SDK.api.EInvoicing.V1;
Expand Down Expand Up @@ -114,17 +113,14 @@ public okhttp3.Call getDataInputFieldsCall(GetDataInputFieldsRequest requestPara
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/data-input-fields";
String localVarPath = "/einvoicing/data-input-fields";

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>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.get$filter() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("$filter", requestParameters.get$filter()));
}
Expand Down Expand Up @@ -273,7 +269,7 @@ public class GetDataInputFieldsRequest {
public GetDataInputFieldsRequest () {
}

public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
Expand All @@ -299,7 +295,7 @@ public GetDataInputFieldsRequest getGetDataInputFieldsRequest() {

private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
this.localVarApiClient.setSdkVersion("");
this.localVarApiClient.setSdkVersion("24.12.1");
}
}

44 changes: 14 additions & 30 deletions src/main/java/Avalara/SDK/api/EInvoicing/V1/DocumentsApi.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AvaTax Software Development Kit for Java (JRE)
*
* (c) 2004-2022 Avalara, Inc.
* (c) 2004-2025 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -12,10 +12,9 @@
*
* @author Sachin Baijal <[email protected]>
* @author Jonathan Wenger <[email protected]>
* @copyright 2004-2022 Avalara, Inc.
* @copyright 2004-2025 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @version
* @link https://github.com/avadev/AvaTax-REST-V3-JRE-SDK
* @link https://github.com/avadev/Avalara-SDK-Java
*/

package Avalara.SDK.api.EInvoicing.V1;
Expand Down Expand Up @@ -126,7 +125,7 @@ public okhttp3.Call downloadDocumentCall(DownloadDocumentRequest requestParamete
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/documents/{documentId}/$download"
String localVarPath = "/einvoicing/documents/{documentId}/$download"
.replaceAll("\\{" + "documentId" + "\\}", localVarApiClient.escapeString(requestParameters.documentId.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Expand All @@ -135,9 +134,6 @@ public okhttp3.Call downloadDocumentCall(DownloadDocumentRequest requestParamete
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
Expand Down Expand Up @@ -277,7 +273,7 @@ public class DownloadDocumentRequest {
public DownloadDocumentRequest () {
}

public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getAccept() { return accept; }
public void setAccept(String accept) { this.accept = accept; }
Expand Down Expand Up @@ -331,17 +327,14 @@ public okhttp3.Call fetchDocumentsCall(FetchDocumentsRequest requestParameters,
Object localVarPostBody = requestParameters.getDocumentFetchRequest();

// create path and map variables
String localVarPath = "/documents/$fetch";
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>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
Expand Down Expand Up @@ -467,7 +460,7 @@ public class FetchDocumentsRequest {
public FetchDocumentsRequest () {
}

public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public DocumentFetchRequest getDocumentFetchRequest() { return documentFetchRequest; }
public void setDocumentFetchRequest(DocumentFetchRequest documentFetchRequest) { this.documentFetchRequest = documentFetchRequest; }
Expand Down Expand Up @@ -519,17 +512,14 @@ public okhttp3.Call getDocumentListCall(GetDocumentListRequest requestParameters
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/documents";
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>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.getStartDate() != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("startDate", requestParameters.getStartDate()));
}
Expand Down Expand Up @@ -696,7 +686,7 @@ public class GetDocumentListRequest {
public GetDocumentListRequest () {
}

public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
Expand Down Expand Up @@ -762,7 +752,7 @@ public okhttp3.Call getDocumentStatusCall(GetDocumentStatusRequest requestParame
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/documents/{documentId}/status"
String localVarPath = "/einvoicing/documents/{documentId}/status"
.replaceAll("\\{" + "documentId" + "\\}", localVarApiClient.escapeString(requestParameters.documentId.toString()));

List<Pair> localVarQueryParams = new ArrayList<Pair>();
Expand All @@ -771,9 +761,6 @@ public okhttp3.Call getDocumentStatusCall(GetDocumentStatusRequest requestParame
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.getAvalaraVersion() != null) {
localVarHeaderParams.put("avalara-version", localVarApiClient.parameterToString(requestParameters.getAvalaraVersion()));
}
Expand Down Expand Up @@ -899,7 +886,7 @@ public class GetDocumentStatusRequest {
public GetDocumentStatusRequest () {
}

public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getDocumentId() { return documentId; }
public void setDocumentId(String documentId) { this.documentId = documentId; }
Expand Down Expand Up @@ -951,17 +938,14 @@ public okhttp3.Call submitDocumentCall(SubmitDocumentRequest requestParameters,
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/documents";
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>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.getMetadata() != null) {
localVarFormParams.put("metadata", requestParameters.getMetadata());
}
Expand Down Expand Up @@ -1102,7 +1086,7 @@ public class SubmitDocumentRequest {
public SubmitDocumentRequest () {
}

public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public SubmitDocumentMetadata getMetadata() { return metadata; }
public void setMetadata(SubmitDocumentMetadata metadata) { this.metadata = metadata; }
Expand All @@ -1122,7 +1106,7 @@ public SubmitDocumentRequest getSubmitDocumentRequest() {

private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
this.localVarApiClient.setSdkVersion("");
this.localVarApiClient.setSdkVersion("24.12.1");
}
}

16 changes: 6 additions & 10 deletions src/main/java/Avalara/SDK/api/EInvoicing/V1/InteropApi.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* AvaTax Software Development Kit for Java (JRE)
*
* (c) 2004-2022 Avalara, Inc.
* (c) 2004-2025 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
Expand All @@ -12,10 +12,9 @@
*
* @author Sachin Baijal <[email protected]>
* @author Jonathan Wenger <[email protected]>
* @copyright 2004-2022 Avalara, Inc.
* @copyright 2004-2025 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @version
* @link https://github.com/avadev/AvaTax-REST-V3-JRE-SDK
* @link https://github.com/avadev/Avalara-SDK-Java
*/

package Avalara.SDK.api.EInvoicing.V1;
Expand Down Expand Up @@ -114,17 +113,14 @@ public okhttp3.Call submitInteropDocumentCall(SubmitInteropDocumentRequest reque
Object localVarPostBody = null;

// create path and map variables
String localVarPath = "/interop/documents";
String localVarPath = "/einvoicing/interop/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>();

// Set avalara-version header from swagger.json version number
localVarHeaderParams.put("avalara-version", "1.2");

if (requestParameters.getFileName() != null) {
localVarFormParams.put("fileName", requestParameters.getFileName());
}
Expand Down Expand Up @@ -284,7 +280,7 @@ public SubmitInteropDocumentRequest () {
public void setDocumentType(String documentType) { this.documentType = documentType; }
public String getInterchangeType() { return interchangeType; }
public void setInterchangeType(String interchangeType) { this.interchangeType = interchangeType; }
public String getAvalaraVersion() { return avalaraVersion; }
public String getAvalaraVersion() { return (avalaraVersion != null) ? avalaraVersion : "1.2"; }
public void setAvalaraVersion(String avalaraVersion) { this.avalaraVersion = avalaraVersion; }
public String getXAvalaraClient() { return xAvalaraClient; }
public void setXAvalaraClient(String xAvalaraClient) { this.xAvalaraClient = xAvalaraClient; }
Expand All @@ -304,7 +300,7 @@ public SubmitInteropDocumentRequest getSubmitInteropDocumentRequest() {

private void SetConfiguration(ApiClient client) {
if (client == null) throw new MissingFormatArgumentException("client");
this.localVarApiClient.setSdkVersion("");
this.localVarApiClient.setSdkVersion("24.12.1");
}
}

Loading

0 comments on commit 28ed073

Please sign in to comment.