Skip to content

Commit

Permalink
Merge pull request #303 from avadev/24.11.2
Browse files Browse the repository at this point in the history
Update for 24.11.2
  • Loading branch information
svc-developer authored Nov 12, 2024
2 parents c71db9f + 93c6d3f commit cfe05b2
Show file tree
Hide file tree
Showing 14 changed files with 225 additions and 57 deletions.
60 changes: 30 additions & 30 deletions lib/AvaTaxClient.ts

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions lib/enums/ErrorCodeId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
ItemDualWriteParameterValueMismatchError = 1740,
DuplicateItemIdsInTaxCodeClassificationRequest = 1741,
TooManyItemIdsInTaxCodeClassificationRequest = 1742,
InvalidProductCodeLength = 1743,
InvalidProductCodeFormat = 1744,
UnsupportedFileFormat = 1800,
UnsupportedOutputFileType = 1801,
TaxProfileNotProvided = 1900,
Expand Down Expand Up @@ -401,6 +403,25 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
DuplicateContactCode = 3002,
SCSServerError = 3003,
UserReconciliationError = 3004,
InvalidHttpPatchRequest = 3005,
UnsupportedPatchOperationError = 3006,
SystemCodeAndCountryCodeMismatch = 3007,
DuplicateSystemAndCountryForItem = 3008,
NotFound = 4001,
Unexpected = 4002,
NoHostFound = 4003,
UnexpectedAuth = 4004,
SiteSelectionFailed = 4006,
DropDefaultUsername = 4007,
DropDefaultNotMigrated = 4008,
DropBearerAuth = 4009,
SiteSelectionError = 4010,
RateLimitExceeded = 4011,
NoHealthySite = 4012,
ClientDisconnected = 4013,
ServiceDisconnected = 4014,
ServiceTimeout = 4015,
UnexpectedError = -1,
}

@JsonConverter
Expand Down
1 change: 1 addition & 0 deletions lib/enums/ReportSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
SNOWFLAKE = 0,
MONGODB = 1,
RETURNSAPI = 2,
TAXREGION = 3,
}

@JsonConverter
Expand Down
36 changes: 36 additions & 0 deletions lib/enums/ReturnsLiabilityType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* AvaTax Software Development Kit for JavaScript
*
* (c) 2004-2022 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Jonathan Wenger <[email protected]>
* @author Sachin Baijal <[email protected]>
* @copyright 2004-2018 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
*/

import { JsonConverter, JsonCustomConvert } from "json2typescript";

/**
* @export
* @enum {string}
*/
export enum ReturnsLiabilityType {
ALL = 0,
ORIGINAL = 1,
AMENDED = 2,
}

@JsonConverter
export class ReturnsLiabilityTypeConverter implements JsonCustomConvert<ReturnsLiabilityType> {
serialize(data: ReturnsLiabilityType) {
return data;
}
deserialize(enumType: string): ReturnsLiabilityType {
return ReturnsLiabilityType[enumType as keyof typeof ReturnsLiabilityType];
}
}
36 changes: 36 additions & 0 deletions lib/enums/ReturnsReportType.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* AvaTax Software Development Kit for JavaScript
*
* (c) 2004-2022 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Jonathan Wenger <[email protected]>
* @author Sachin Baijal <[email protected]>
* @copyright 2004-2018 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
*/

import { JsonConverter, JsonCustomConvert } from "json2typescript";

/**
* @export
* @enum {string}
*/
export enum ReturnsReportType {
LIABILITYSUMMARYRETURNDETAILHOSPITALITY = 0,
LIABILITYSUMMARYRETURNDETAIL = 1,
LIABILITYCARRYOVERCREDIT = 2,
}

@JsonConverter
export class ReturnsReportTypeConverter implements JsonCustomConvert<ReturnsReportType> {
serialize(data: ReturnsReportType) {
return data;
}
deserialize(enumType: string): ReturnsReportType {
return ReturnsReportType[enumType as keyof typeof ReturnsReportType];
}
}
2 changes: 2 additions & 0 deletions lib/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ export * from './CompanyFilingStatus';
export * from './FirmClientLinkageStatus';
export * from './ItemCatalogueResultEvent';
export * from './BoundaryLevel';
export * from './ReturnsLiabilityType';
export * from './ReturnsReportType';
export * from './MarketplaceLiabilityType';
export * from './AddressTypeId';
export * from './AddressCategoryId';
Expand Down
24 changes: 0 additions & 24 deletions lib/models/DcvViewModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,28 +61,4 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("emailId", String, true)
emailId?: string | undefined = undefined;
/**
* @type {string}
* @memberof DcvViewModel
*/
@JsonProperty("createdOn", String, true)
createdOn?: string | undefined = undefined;
/**
* @type {string}
* @memberof DcvViewModel
*/
@JsonProperty("createdBy", String, true)
createdBy?: string | undefined = undefined;
/**
* @type {string}
* @memberof DcvViewModel
*/
@JsonProperty("updatedOn", String, true)
updatedOn?: string | undefined = undefined;
/**
* @type {string}
* @memberof DcvViewModel
*/
@JsonProperty("updatedBy", String, true)
updatedBy?: string | undefined = undefined;
}
7 changes: 7 additions & 0 deletions lib/models/ExportDocumentLineModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

import * as Enums from '../enums/index';
import { LiabilityParametersModel } from "./LiabilityParametersModel";
import { JsonObject, JsonProperty } from "json2typescript";
import { DateConverter } from "../utils/dateConverter";

Expand Down Expand Up @@ -144,6 +145,12 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("reportSource", Enums.ReportSourceConverter, true)
reportSource?: Enums.ReportSource | undefined = undefined;
/**
* @type {LiabilityParametersModel}
* @memberof ExportDocumentLineModel
*/
@JsonProperty("liabilityParameters", LiabilityParametersModel, true)
liabilityParameters?: LiabilityParametersModel | undefined = undefined;
/**
* @type {Enums.Compression}
* @memberof ExportDocumentLineModel
Expand Down
12 changes: 12 additions & 0 deletions lib/models/FundingStatusModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,16 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("templateRequestId", Number, true)
templateRequestId?: number | undefined = undefined;
/**
* @type {string}
* @memberof FundingStatusModel
*/
@JsonProperty("currency", String, true)
currency?: string | undefined = undefined;
/**
* @type {string}
* @memberof FundingStatusModel
*/
@JsonProperty("agreementType", String, true)
agreementType?: string | undefined = undefined;
}
69 changes: 69 additions & 0 deletions lib/models/LiabilityParametersModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
/*
* AvaTax Software Development Kit for JavaScript
*
* (c) 2004-2022 Avalara, Inc.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Jonathan Wenger <[email protected]>
* @author Sachin Baijal <[email protected]>
* @copyright 2004-2018 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
*/

import * as Enums from '../enums/index';
import { JsonObject, JsonProperty } from "json2typescript";
import { DateConverter } from "../utils/dateConverter";

/**
* The model for liability parameters definitions
* @export
* @class LiabilityParametersModel
*/
@JsonObject("LiabilityParametersModel")
export class LiabilityParametersModel {
/**
* @type {Enums.ReturnsLiabilityType}
* @memberof LiabilityParametersModel
*/
@JsonProperty("liabilityType", Enums.ReturnsLiabilityTypeConverter, true)
liabilityType?: Enums.ReturnsLiabilityType | undefined = undefined;
/**
* @type {Enums.ReturnsReportType}
* @memberof LiabilityParametersModel
*/
@JsonProperty("returnsReportType", Enums.ReturnsReportTypeConverter, true)
returnsReportType?: Enums.ReturnsReportType | undefined = undefined;
/**
* @type {number}
* @memberof LiabilityParametersModel
*/
@JsonProperty("hospitalityAccountId", Number, true)
hospitalityAccountId?: number | undefined = undefined;
/**
* @type {number}
* @memberof LiabilityParametersModel
*/
@JsonProperty("year", Number, true)
year?: number | undefined = undefined;
/**
* @type {object}
* @memberof LiabilityParametersModel
*/
@JsonProperty("month", Object, true)
month?: object | undefined = undefined;
/**
* @type {string}
* @memberof LiabilityParametersModel
*/
@JsonProperty("country", String, true)
country?: string | undefined = undefined;
/**
* @type {string}
* @memberof LiabilityParametersModel
*/
@JsonProperty("region", String, true)
region?: string | undefined = undefined;
}
7 changes: 7 additions & 0 deletions lib/models/ReportParametersModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

import * as Enums from '../enums/index';
import { LiabilityParametersModel } from "./LiabilityParametersModel";
import { JsonObject, JsonProperty } from "json2typescript";
import { DateConverter } from "../utils/dateConverter";

Expand Down Expand Up @@ -138,6 +139,12 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("taxSubType", String, true)
taxSubType?: string | undefined = undefined;
/**
* @type {LiabilityParametersModel}
* @memberof ReportParametersModel
*/
@JsonProperty("liabilityParameters", LiabilityParametersModel, true)
liabilityParameters?: LiabilityParametersModel | undefined = undefined;
/**
* @type {Enums.Compression}
* @memberof ReportParametersModel
Expand Down
4 changes: 2 additions & 2 deletions lib/models/VarianceResponseModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ import { DateConverter } from "../utils/dateConverter";
* @type {VarianceResponseEntity[]}
* @memberof VarianceResponseModel
*/
@JsonProperty("varianceResponses", [VarianceResponseEntity], true)
varianceResponses?: VarianceResponseEntity[] | undefined = undefined;
@JsonProperty("variance", [VarianceResponseEntity], true)
variance?: VarianceResponseEntity[] | undefined = undefined;
}
1 change: 1 addition & 0 deletions lib/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ export * from './JurisdictionModel';
export * from './JurisdictionNexusModel';
export * from './JurisdictionOverrideModel';
export * from './JurisdictionRateTypeTaxTypeMappingModel';
export * from './LiabilityParametersModel';
export * from './LicenseKeyModel';
export * from './LineItemModel';
export * from './LinkCertificatesModel';
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avatax",
"version": "24.10.0",
"version": "24.11.2",
"description": "AvaTax v2 SDK for languages using JavaScript",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit cfe05b2

Please sign in to comment.