Skip to content

Commit

Permalink
Merge pull request #275 from avadev/23.3.1
Browse files Browse the repository at this point in the history
Update for 23.3.1
  • Loading branch information
svc-developer authored Mar 29, 2023
2 parents 2ab3ddf + 8b97d2c commit 6f28fdd
Show file tree
Hide file tree
Showing 11 changed files with 470 additions and 373 deletions.
4 changes: 2 additions & 2 deletions lib/AvaTaxClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* @author Sachin Baijal <[email protected]>
* @copyright 2004-2018 Avalara, Inc.
* @license https://www.apache.org/licenses/LICENSE-2.0
* @version 23.3.0
* @version 23.3.1
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
*/

Expand Down Expand Up @@ -50,7 +50,7 @@ export default class AvaTaxClient {
public auth: string;
public customHttpAgent: https.Agent;
public enableStrictTypeConversion: boolean;
private apiVersion: string = '23.3.0';
private apiVersion: string = '23.3.1';
private logger: Logger;
/**
* Construct a new AvaTaxClient
Expand Down
36 changes: 36 additions & 0 deletions lib/enums/ChargedTo.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 ChargedTo {
Buyer = 0,
Seller = 1,
ThirdParty = 2,
}

@JsonConverter
export class ChargedToConverter implements JsonCustomConvert<ChargedTo> {
serialize(data: ChargedTo) {
return data;
}
deserialize(enumType: string): ChargedTo {
return ChargedTo[enumType as keyof typeof ChargedTo];
}
}
35 changes: 35 additions & 0 deletions lib/enums/Compression.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
* 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 Compression {
NONE = 0,
GZIP = 1,
}

@JsonConverter
export class CompressionConverter implements JsonCustomConvert<Compression> {
serialize(data: Compression) {
return data;
}
deserialize(enumType: string): Compression {
return Compression[enumType as keyof typeof Compression];
}
}
1 change: 1 addition & 0 deletions lib/enums/ErrorCodeId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
InvalidParameter = 1734,
InvalidSystemCode = 1735,
NoItemsForClassification = 1736,
InvalidFileName = 1737,
UnsupportedFileFormat = 1800,
UnsupportedOutputFileType = 1801,
TaxProfileNotProvided = 1900,
Expand Down
1 change: 0 additions & 1 deletion lib/enums/ReportSource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
export enum ReportSource {
SNOWFLAKE = 0,
MONGODB = 1,
SNOWFLAKE_DLD = 2,
}

@JsonConverter
Expand Down
2 changes: 2 additions & 0 deletions lib/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export * from './ReportDateFilter';
export * from './ReportDocType';
export * from './DocumentStatus';
export * from './ReportSource';
export * from './Compression';
export * from './AdjustmentPeriodTypeId';
export * from './PaymentAccountTypeId';
export * from './FilingTypeId';
Expand Down Expand Up @@ -93,6 +94,7 @@ export * from './TaxOverrideType';
export * from './RateType';
export * from './TaxRuleTypeId';
export * from './LiabilityType';
export * from './ChargedTo';
export * from './DeemedSellerType';
export * from './CompanyAccessLevel';
export * from './SecurityRoleId';
Expand Down
6 changes: 6 additions & 0 deletions lib/models/ExportDocumentLineModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,10 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("reportSource", Enums.ReportSourceConverter, true)
reportSource?: Enums.ReportSource | undefined = undefined;
/**
* @type {Enums.Compression}
* @memberof ExportDocumentLineModel
*/
@JsonProperty("compression", Enums.CompressionConverter, true)
compression?: Enums.Compression | undefined = undefined;
}
6 changes: 6 additions & 0 deletions lib/models/ReportParametersModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,4 +138,10 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("taxSubType", String, true)
taxSubType?: string | undefined = undefined;
/**
* @type {Enums.Compression}
* @memberof ReportParametersModel
*/
@JsonProperty("compression", Enums.CompressionConverter, true)
compression?: Enums.Compression | undefined = undefined;
}
110 changes: 58 additions & 52 deletions lib/models/SkyscraperStatusModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @link https://github.com/avadev/AvaTax-REST-V2-JS-SDK
*/

import * as Enums from '../enums/index';
import * as Enums from "../enums/index";
import { RequiredFilingCalendarDataFieldModel } from "./requiredFilingCalendarDataFieldModel";
import { JsonObject, JsonProperty } from "json2typescript";
import { DateConverter } from "../utils/dateConverter";
Expand All @@ -23,54 +23,60 @@ import { DateConverter } from "../utils/dateConverter";
* @export
* @class SkyscraperStatusModel
*/
@JsonObject("SkyscraperStatusModel")
export class SkyscraperStatusModel {
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("name", String, true)
name?: string | undefined = undefined;
/**
* @type {string[]}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("taxFormCodes", [String], true)
taxFormCodes?: string[] | undefined = undefined;
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("country", String, true)
country?: string | undefined = undefined;
/**
* @type {Enums.ScraperType}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("scraperType", Enums.ScraperTypeConverter, true)
scraperType?: Enums.ScraperType | undefined = undefined;
/**
* @type {boolean}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("isAvailable", Boolean, true)
isAvailable?: boolean | undefined = undefined;
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("expectedResponseTime", String, true)
expectedResponseTime?: string | undefined = undefined;
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("message", String, true)
message?: string | undefined = undefined;
/**
* @type {requiredFilingCalendarDataFieldModel[]}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("requiredFilingCalendarDataFields", [RequiredFilingCalendarDataFieldModel], true)
requiredFilingCalendarDataFields?: RequiredFilingCalendarDataFieldModel[] | undefined = undefined;
}
@JsonObject("SkyscraperStatusModel")
export class SkyscraperStatusModel {
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("name", String, true)
name?: string | undefined = undefined;
/**
* @type {string[]}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("taxFormCodes", [String], true)
taxFormCodes?: string[] | undefined = undefined;
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("country", String, true)
country?: string | undefined = undefined;
/**
* @type {Enums.ScraperType}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("scraperType", Enums.ScraperTypeConverter, true)
scraperType?: Enums.ScraperType | undefined = undefined;
/**
* @type {boolean}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("isAvailable", Boolean, true)
isAvailable?: boolean | undefined = undefined;
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("expectedResponseTime", String, true)
expectedResponseTime?: string | undefined = undefined;
/**
* @type {string}
* @memberof SkyscraperStatusModel
*/
@JsonProperty("message", String, true)
message?: string | undefined = undefined;
/**
* @type {requiredFilingCalendarDataFieldModel[]}
* @memberof SkyscraperStatusModel
*/
@JsonProperty(
"requiredFilingCalendarDataFields",
[RequiredFilingCalendarDataFieldModel],
true
)
requiredFilingCalendarDataFields?:
| RequiredFilingCalendarDataFieldModel[]
| undefined = undefined;
}
6 changes: 6 additions & 0 deletions lib/models/TransactionLineDetailModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ import { DateConverter } from "../utils/dateConverter";
*/
@JsonProperty("liabilityType", Enums.LiabilityTypeConverter, true)
liabilityType?: Enums.LiabilityType | undefined = undefined;
/**
* @type {Enums.ChargedTo}
* @memberof TransactionLineDetailModel
*/
@JsonProperty("chargedTo", Enums.ChargedToConverter, true)
chargedTo?: Enums.ChargedTo | undefined = undefined;
/**
* @type {string}
* @memberof TransactionLineDetailModel
Expand Down
Loading

0 comments on commit 6f28fdd

Please sign in to comment.