Skip to content

Commit

Permalink
Merge pull request #292 from avadev/24.2.0
Browse files Browse the repository at this point in the history
Update for 24.2.0
  • Loading branch information
svc-developer authored Feb 12, 2024
2 parents 5e2348b + 3a117b7 commit 71365f4
Show file tree
Hide file tree
Showing 18 changed files with 820 additions and 99 deletions.
353 changes: 255 additions & 98 deletions lib/AvaTaxClient.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions lib/enums/DocumentStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
Adjusted = 5,
Queued = 6,
PendingApproval = 7,
Uncommitted = 12,
Any = -1,
}

Expand Down
1 change: 1 addition & 0 deletions lib/enums/ErrorCodeId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,7 @@ import { JsonConverter, JsonCustomConvert } from "json2typescript";
ContentNotFound = 2811,
RegistrationNumberNotFound = 2812,
InvalidCostCenter = 2813,
InvalidHTTPHeader = 3000,
}

@JsonConverter
Expand Down
37 changes: 37 additions & 0 deletions lib/enums/StackAggregationOption.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* 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 StackAggregationOption {
NoStackAggregation = 0,
FullStackAggregation = 1,
AggregateStateAndCounty = 2,
AggregateCityAndCounty = 3,
}

@JsonConverter
export class StackAggregationOptionConverter implements JsonCustomConvert<StackAggregationOption> {
serialize(data: StackAggregationOption) {
return data;
}
deserialize(enumType: string): StackAggregationOption {
return StackAggregationOption[enumType as keyof typeof StackAggregationOption];
}
}
1 change: 1 addition & 0 deletions lib/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export * from './PointOfSalePartnerId';
export * from './UserDefinedFieldType';
export * from './POABusinessUnit';
export * from './POASubscriptionType';
export * from './StackAggregationOption';
export * from './AccountStatusId';
export * from './AccountTypeId';
export * from './ResolutionQuality';
Expand Down
6 changes: 6 additions & 0 deletions lib/models/AddressesModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ a destination location such as a customer, please specify the `shipFrom` and `sh
In the United States, some jurisdictions recognize the address types `pointOfOrderOrigin` and `pointOfOrderAcceptance`.
These address types affect the sourcing models of some transactions.
VAT transactions support a `goodsPlaceOrServiceRendered` address, which indicates where goods are located or where services
are rendered. VAT transactions also support an `import` address, which specifies the address of the buyer importing a good
from another country.
India GST transactions support a `billTo` address, which specifies where invoices and other billing-related information are sent to the buyer.
If latitude and longitude information is provided for any of these addresses along with line, city, region, country and postal code information,
we will be using only latitude and longitude and will discard line, city, region, country and postal code information for the transaction.
Expand Down
135 changes: 135 additions & 0 deletions lib/models/ComplianceRateOptionModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
/*
* 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";

/**
* Model for RateOption.
* @export
* @class ComplianceRateOptionModel
*/
@JsonObject("ComplianceRateOptionModel")
export class ComplianceRateOptionModel {
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("jurisName", String, true)
jurisName?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("groupCode", String, true)
groupCode?: string | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxRegionId", Number, true)
taxRegionId?: number | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxRegionName", String, true)
taxRegionName?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("reportLevel", String, true)
reportLevel?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxTypeCode", String, true)
taxTypeCode?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxTypeCodeName", String, true)
taxTypeCodeName?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxSubTypeCode", String, true)
taxSubTypeCode?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxSubTypeCodeName", String, true)
taxSubTypeCodeName?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("rateTypeCode", String, true)
rateTypeCode?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("rateTypeCodeName", String, true)
rateTypeCodeName?: string | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("stackRate", Number, true)
stackRate?: number | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("componentRate", Number, true)
componentRate?: number | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("taxAuthorityId", Number, true)
taxAuthorityId?: number | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("cityName", String, true)
cityName?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("countyName", String, true)
countyName?: string | undefined = undefined;
/**
* @type {Date}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("effDate", DateConverter, true)
effDate?: Date | undefined = undefined;
/**
* @type {Date}
* @memberof ComplianceRateOptionModel
*/
@JsonProperty("endDate", DateConverter, true)
endDate?: Date | undefined = undefined;
}
147 changes: 147 additions & 0 deletions lib/models/ComplianceStateConfigModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
/*
* 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";

/**
* A flattened model for State Config.
* @export
* @class ComplianceStateConfigModel
*/
@JsonObject("ComplianceStateConfigModel")
export class ComplianceStateConfigModel {
/**
* @type {number}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("stateConfigId", Number, true)
stateConfigId?: number | undefined = undefined;
/**
* @type {Date}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("effDate", DateConverter, true)
effDate?: Date | undefined = undefined;
/**
* @type {Date}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("endDate", DateConverter, true)
endDate?: Date | undefined = undefined;
/**
* @type {boolean}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("hasBoundary", Boolean, true)
hasBoundary?: boolean | undefined = undefined;
/**
* @type {boolean}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("hasRates", Boolean, true)
hasRates?: boolean | undefined = undefined;
/**
* @type {boolean}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("isLocalAdmin", Boolean, true)
isLocalAdmin?: boolean | undefined = undefined;
/**
* @type {boolean}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("isLocalNexus", Boolean, true)
isLocalNexus?: boolean | undefined = undefined;
/**
* @type {boolean}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("isSerState", Boolean, true)
isSerState?: boolean | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("minBoundaryLevelId", Number, true)
minBoundaryLevelId?: number | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("sstStatusId", Number, true)
sstStatusId?: number | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("state", String, true)
state?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("stateFips", String, true)
stateFips?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("stateName", String, true)
stateName?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("boundaryTableBaseName", String, true)
boundaryTableBaseName?: string | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("stjCount", Number, true)
stjCount?: number | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("tsStateId", String, true)
tsStateId?: string | undefined = undefined;
/**
* @type {string}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("country", String, true)
country?: string | undefined = undefined;
/**
* @type {number}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("isJaasEnabled", Number, true)
isJaasEnabled?: number | undefined = undefined;
/**
* @type {boolean}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("hasSSTBoundary", Boolean, true)
hasSSTBoundary?: boolean | undefined = undefined;
/**
* @type {Date}
* @memberof ComplianceStateConfigModel
*/
@JsonProperty("modifiedDate", DateConverter, true)
modifiedDate?: Date | undefined = undefined;
}
33 changes: 33 additions & 0 deletions lib/models/JurisNameModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* 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";

/**
* Represents JurisName Model
* @export
* @class JurisNameModel
*/
@JsonObject("JurisNameModel")
export class JurisNameModel {
/**
* @type {string}
* @memberof JurisNameModel
*/
@JsonProperty("jurisName", String, true)
jurisName?: string | undefined = undefined;
}
Loading

0 comments on commit 71365f4

Please sign in to comment.