From dce6d90125bebd7da2e179f9a557b504b4b9df17 Mon Sep 17 00:00:00 2001 From: svc-developer Date: Thu, 13 Jul 2023 22:19:49 +0000 Subject: [PATCH] 23.7.0 --- GlobalAssemblyInfo.cs | 4 +- src/AvaTaxApi.cs | 156 +++++++++++++++++- src/Avalara.AvaTax.RestClient.nuspec | 2 +- src/IAvaTaxClient.cs | 116 ++++++++++++- src/models/CountryCoefficientsEntity.cs | 117 +++++++++++++ .../CountryCoefficientsRequestEntity.cs | 46 ++++++ src/models/CountryCoefficientsRequestModel.cs | 82 +++++++++ .../CountryCoefficientsResponseModel.cs | 49 ++++++ src/models/ParameterUsageModel.cs | 5 + src/models/TransactionLineModel.cs | 7 + 10 files changed, 575 insertions(+), 9 deletions(-) create mode 100644 src/models/CountryCoefficientsEntity.cs create mode 100644 src/models/CountryCoefficientsRequestEntity.cs create mode 100644 src/models/CountryCoefficientsRequestModel.cs create mode 100644 src/models/CountryCoefficientsResponseModel.cs diff --git a/GlobalAssemblyInfo.cs b/GlobalAssemblyInfo.cs index ddb1403..a293cdb 100644 --- a/GlobalAssemblyInfo.cs +++ b/GlobalAssemblyInfo.cs @@ -30,5 +30,5 @@ // Revision // -[assembly: AssemblyVersion("23.6.1")] -[assembly: AssemblyFileVersion("23.6.1")] +[assembly: AssemblyVersion("23.7.0")] +[assembly: AssemblyFileVersion("23.7.0")] diff --git a/src/AvaTaxApi.cs b/src/AvaTaxApi.cs index be9fb4d..e4ebdcf 100644 --- a/src/AvaTaxApi.cs +++ b/src/AvaTaxApi.cs @@ -17,7 +17,7 @@ * @author Sachin Baijal * @copyright 2004-2023 Avalara, Inc. * @license https://www.apache.org/licenses/LICENSE-2.0 - * @version 23.6.1 + * @version 23.7.0 * @link https://github.com/avadev/AvaTax-REST-V2-DotNet-SDK */ @@ -28,7 +28,7 @@ public partial class AvaTaxClient : IAvaTaxClient /// /// Returns the version number of the API used to generate this class /// - public static string API_VERSION { get { return "23.6.1"; } } + public static string API_VERSION { get { return "23.7.0"; } } #region Methods @@ -4464,7 +4464,7 @@ public FetchResult ListParametersByItem(String companyCode, Stri /// Some parameters are only available for use if you have subscribed to certain features of AvaTax. /// /// Swagger Name: AvaTaxClient - /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values, valueDescriptions /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -9846,6 +9846,32 @@ public TaxRateModel TaxRatesByPostalCode(String country, String postalCode) } + /// + /// Create new Country Coefficients. If already exist update them. + /// + /// + /// Create one or more Country Coefficients for particular country. + /// + /// We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease + /// a calculation for a line based on the tax-subtype and Country of destination for a transaction. + /// + /// This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax + /// Calculated by AvaTax. + /// + /// Make sure to use the same API to update the country coefficients that is already present in the database. + /// This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable + /// to the newer transactions. + /// + /// Swagger Name: AvaTaxClient + /// The Country Coefficients for specific country you wish to create. + public List CreateCountryCoefficients(CountryCoefficientsRequestEntity model) + { + var path = new AvaTaxPath("/api/v2/countryCoefficients"); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall>("PUT", path, model); + } + + /// /// Create a new tax rule /// @@ -9950,6 +9976,36 @@ public TaxRuleModel GetTaxRule(Int32 companyId, Int32 id) } + /// + /// Retrieve country coefficients for specific country + /// + /// + /// Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country. + /// + /// Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . + /// Paginate your results using the `$top`, `$skip`, and `$orderby` parameters. + /// + /// Swagger Name: AvaTaxClient + /// Country for which data need to be pulled for. + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId + /// A comma separated list of additional data to retrieve. + /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + public FetchResult ListCountryCoefficients(String country, String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/{country}/CountryCoefficients"); + path.ApplyField("country", country); + path.AddQuery("$filter", filter); + path.AddQuery("$include", include); + path.AddQuery("$top", top); + path.AddQuery("$skip", skip); + path.AddQuery("$orderBy", orderBy); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall>("GET", path, null); + } + + /// /// Retrieve tax rules for this company /// @@ -10094,6 +10150,7 @@ public TaxRuleModel UpdateTaxRule(Int32 companyId, Int32 id, TaxRuleModel model) /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10138,6 +10195,7 @@ public TransactionModel AddLines(String include, AddTransactionLineModel model) /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10316,6 +10374,7 @@ public BulkLockTransactionResult BulkLockTransaction(BulkLockTransactionModel mo /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10372,6 +10431,7 @@ public TransactionModel ChangeTransactionCode(String companyCode, String transac /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10435,6 +10495,7 @@ public TransactionModel CommitTransaction(String companyCode, String transaction /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10498,6 +10559,7 @@ public TransactionModel CreateOrAdjustTransaction(String include, CreateOrAdjust /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10544,6 +10606,7 @@ public TransactionModel CreateTransaction(String include, CreateTransactionModel /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10606,6 +10669,7 @@ public VarianceResponseModel GetAllVarianceReportByCompanyCode(String companyCod /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10692,6 +10756,7 @@ public TransactionModel GetTransactionByCodeAndType(String companyCode, String t /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10759,6 +10824,7 @@ public VarianceResponseModel GetVarianceReportByCompanyCodeByTransactionId(Strin /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10820,6 +10886,7 @@ public FetchResult ListTransactionsByCompany(String companyCod /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10886,6 +10953,7 @@ public TransactionModel LockTransaction(String companyCode, String transactionCo /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10945,6 +11013,7 @@ public TransactionModel RefundTransaction(String companyCode, String transaction /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -10994,6 +11063,7 @@ public TransactionModel SettleTransaction(String companyCode, String transaction /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -11040,6 +11110,7 @@ public TransactionModel UncommitTransaction(String companyCode, String transacti /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -11114,6 +11185,7 @@ public VarianceResponseModel VarianceReport(String companyCode, List> ListParametersByItemAsync(String /// Some parameters are only available for use if you have subscribed to certain features of AvaTax.; /// - /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values, valueDescriptions /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -22151,6 +22224,33 @@ public async Task TaxRatesByPostalCodeAsync(String country, String } + /// Swagger Name: AvaTaxClient + /// + /// Create new Country Coefficients. If already exist update them.; + /// + /// + /// Create one or more Country Coefficients for particular country. + /// + /// We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease + /// a calculation for a line based on the tax-subtype and Country of destination for a transaction. + /// + /// This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax + /// Calculated by AvaTax. + /// + /// Make sure to use the same API to update the country coefficients that is already present in the database. + /// This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable + /// to the newer transactions.; + /// + + /// The Country Coefficients for specific country you wish to create. + public async Task> CreateCountryCoefficientsAsync(CountryCoefficientsRequestEntity model) + { + var path = new AvaTaxPath("/api/v2/countryCoefficients"); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync>("PUT", path, model).ConfigureAwait(false); + } + + /// Swagger Name: AvaTaxClient /// /// Create a new tax rule; @@ -22258,6 +22358,37 @@ public async Task GetTaxRuleAsync(Int32 companyId, Int32 id) } + /// Swagger Name: AvaTaxClient + /// + /// Retrieve country coefficients for specific country; + /// + /// + /// Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country. + /// + /// Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . + /// Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.; + /// + + /// Country for which data need to be pulled for. + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId + /// A comma separated list of additional data to retrieve. + /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + public async Task> ListCountryCoefficientsAsync(String country, String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/{country}/CountryCoefficients"); + path.ApplyField("country", country); + path.AddQuery("$filter", filter); + path.AddQuery("$include", include); + path.AddQuery("$top", top); + path.AddQuery("$skip", skip); + path.AddQuery("$orderBy", orderBy); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync>("GET", path, null).ConfigureAwait(false); + } + + /// Swagger Name: AvaTaxClient /// /// Retrieve tax rules for this company; @@ -22406,6 +22537,7 @@ public async Task UpdateTaxRuleAsync(Int32 companyId, Int32 id, Ta /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22451,6 +22583,7 @@ public async Task AddLinesAsync(String include, AddTransaction /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22633,6 +22766,7 @@ public async Task BulkLockTransactionAsync(BulkLockTr /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22690,6 +22824,7 @@ public async Task ChangeTransactionCodeAsync(String companyCod /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22754,6 +22889,7 @@ public async Task CommitTransactionAsync(String companyCode, S /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22818,6 +22954,7 @@ public async Task CreateOrAdjustTransactionAsync(String includ /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22865,6 +23002,7 @@ public async Task CreateTransactionAsync(String include, Creat /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -22929,6 +23067,7 @@ public async Task GetAllVarianceReportByCompanyCodeAsync( /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23017,6 +23156,7 @@ public async Task GetTransactionByCodeAndTypeAsync(String comp /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23086,6 +23226,7 @@ public async Task GetVarianceReportByCompanyCodeByTransac /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23148,6 +23289,7 @@ public async Task> ListTransactionsByCompanyAsync( /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23215,6 +23357,7 @@ public async Task LockTransactionAsync(String companyCode, Str /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23275,6 +23418,7 @@ public async Task RefundTransactionAsync(String companyCode, S /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23325,6 +23469,7 @@ public async Task SettleTransactionAsync(String companyCode, S /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23372,6 +23517,7 @@ public async Task UncommitTransactionAsync(String companyCode, /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23448,6 +23594,7 @@ public async Task VarianceReportAsync(String companyCode, /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -23505,6 +23652,7 @@ public async Task VerifyTransactionAsync(String companyCode, S /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) diff --git a/src/Avalara.AvaTax.RestClient.nuspec b/src/Avalara.AvaTax.RestClient.nuspec index ceb4442..cc3f56f 100644 --- a/src/Avalara.AvaTax.RestClient.nuspec +++ b/src/Avalara.AvaTax.RestClient.nuspec @@ -3,7 +3,7 @@ Avalara.AvaTax - 23.6.1 + 23.7.0 Avalara AvaTax SDK Add world-class tax estimation and calculation to your project with Avalara's AvaTax suite of APIs and services. diff --git a/src/IAvaTaxClient.cs b/src/IAvaTaxClient.cs index b2688e2..c0a23ec 100644 --- a/src/IAvaTaxClient.cs +++ b/src/IAvaTaxClient.cs @@ -3237,7 +3237,7 @@ public interface IAvaTaxClient /// Some parameters are only available for use if you have subscribed to certain features of AvaTax. /// /// Swagger Name: AvaTaxClient - /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values, valueDescriptions /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -7116,6 +7116,26 @@ public interface IAvaTaxClient /// The postal code of the location. TaxRateModel TaxRatesByPostalCode(String country, String postalCode); + /// + /// Create new Country Coefficients. If already exist update them. + /// + /// + /// Create one or more Country Coefficients for particular country. + /// + /// We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease + /// a calculation for a line based on the tax-subtype and Country of destination for a transaction. + /// + /// This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax + /// Calculated by AvaTax. + /// + /// Make sure to use the same API to update the country coefficients that is already present in the database. + /// This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable + /// to the newer transactions. + /// + /// Swagger Name: AvaTaxClient + /// The Country Coefficients for specific country you wish to create. + List CreateCountryCoefficients(CountryCoefficientsRequestEntity model); + /// /// Create a new tax rule /// @@ -7197,6 +7217,24 @@ public interface IAvaTaxClient /// The primary key of this tax rule TaxRuleModel GetTaxRule(Int32 companyId, Int32 id); + /// + /// Retrieve country coefficients for specific country + /// + /// + /// Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country. + /// + /// Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . + /// Paginate your results using the `$top`, `$skip`, and `$orderby` parameters. + /// + /// Swagger Name: AvaTaxClient + /// Country for which data need to be pulled for. + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId + /// A comma separated list of additional data to retrieve. + /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + FetchResult ListCountryCoefficients(String country, String filter, String include, Int32? top, Int32? skip, String orderBy); + /// /// Retrieve tax rules for this company /// @@ -7310,6 +7348,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7347,6 +7386,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7492,6 +7532,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7538,6 +7579,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7591,6 +7633,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7647,6 +7690,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7686,6 +7730,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7734,6 +7779,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7800,6 +7846,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7851,6 +7898,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7899,6 +7947,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -7955,6 +8004,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -8003,6 +8053,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -8042,6 +8093,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -8078,6 +8130,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -8135,6 +8188,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -8181,6 +8235,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -12080,7 +12135,7 @@ public interface IAvaTaxClient /// Some parameters are only available for use if you have subscribed to certain features of AvaTax.; /// - /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* values, valueDescriptions /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -16126,6 +16181,27 @@ public interface IAvaTaxClient /// The postal code of the location. Task TaxRatesByPostalCodeAsync(String country, String postalCode); + /// Swagger Name: AvaTaxClient + /// + /// Create new Country Coefficients. If already exist update them.; + /// + /// + /// Create one or more Country Coefficients for particular country. + /// + /// We would like to use country coefficients during Cross-Border calculations to slightly increase or decrease + /// a calculation for a line based on the tax-subtype and Country of destination for a transaction. + /// + /// This will allow AvaTax to minimize the variance caused between actual transaction taken place on ground Vs Tax + /// Calculated by AvaTax. + /// + /// Make sure to use the same API to update the country coefficients that is already present in the database. + /// This will make existing entry for specific country as ineffective for that date. And new entry created will get applicable + /// to the newer transactions.; + /// + + /// The Country Coefficients for specific country you wish to create. + Task> CreateCountryCoefficientsAsync(CountryCoefficientsRequestEntity model); + /// Swagger Name: AvaTaxClient /// /// Create a new tax rule; @@ -16210,6 +16286,25 @@ public interface IAvaTaxClient /// The primary key of this tax rule Task GetTaxRuleAsync(Int32 companyId, Int32 id); + /// Swagger Name: AvaTaxClient + /// + /// Retrieve country coefficients for specific country; + /// + /// + /// Retrieve all or any specific records of Country Coefficients based on the filters(optional) for specific country. + /// + /// Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . + /// Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.; + /// + + /// Country for which data need to be pulled for. + /// A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* CoefficientsId, AccountId, ModifiedUserId, CreatedUserId + /// A comma separated list of additional data to retrieve. + /// If nonzero, return no more than this number of results. Used with `$skip` to provide pagination for large datasets. Unless otherwise specified, the maximum number of records that can be returned from an API call is 1,000 records. + /// If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + /// A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + Task> ListCountryCoefficientsAsync(String country, String filter, String include, Int32? top, Int32? skip, String orderBy); + /// Swagger Name: AvaTaxClient /// /// Retrieve tax rules for this company; @@ -16327,6 +16422,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16365,6 +16461,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16514,6 +16611,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16561,6 +16659,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16615,6 +16714,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16672,6 +16772,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16712,6 +16813,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16762,6 +16864,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16830,6 +16933,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16883,6 +16987,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16932,6 +17037,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -16989,6 +17095,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -17038,6 +17145,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -17078,6 +17186,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -17115,6 +17224,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -17174,6 +17284,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) @@ -17221,6 +17332,7 @@ public interface IAvaTaxClient /// /// * Lines /// * Details (implies lines) + /// * AccountPayableSalesTaxDetails (implies lines - only for Account Payable transaction) /// * Summary (implies details) /// * Addresses /// * SummaryOnly (omit lines and details - reduces API response size) diff --git a/src/models/CountryCoefficientsEntity.cs b/src/models/CountryCoefficientsEntity.cs new file mode 100644 index 0000000..c1defb9 --- /dev/null +++ b/src/models/CountryCoefficientsEntity.cs @@ -0,0 +1,117 @@ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +/* + * AvaTax API Client Library + * + * (c) 2004-2023 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * Swagger name: AvaTaxClient + */ + +namespace Avalara.AvaTax.RestClient +{ + /// + /// Represents the Country coefficients model, using which tax rules rates can be modified dynamically for CB transaciotns while applying tax rules + /// in order to reduce the variance for all the transactions at country level. + /// + public class CountryCoefficientsEntity + { + /// + /// CoefficientsId + /// + public Int32? coefficientsId { get; set; } + + /// + /// AccountId + /// + public Int32? accountId { get; set; } + + /// + /// The CompanyId of company for which coefficient will be applied. + /// + public Int32? companyId { get; set; } + + /// + /// The country for which coefficient will be applied. + /// + public String country { get; set; } + + /// + /// Value by which rates need to be altered while calculating taxes. + /// + public Decimal? coefficient { get; set; } + + /// + /// TaxSubTypeId + /// + public String taxSubTypeId { get; set; } + + /// + /// CurrencyCode + /// + public String currencyCode { get; set; } + + /// + /// UnitOfBasisId + /// + public Int32? unitOfBasisId { get; set; } + + /// + /// IsApplicable + /// Flag that is being used to mark the effectiveness of the specific entry for the particular date. + /// + public Boolean? isApplicable { get; set; } + + /// + /// ModifiedDate + /// + public DateTime? modifiedDate { get; set; } + + /// + /// StartDate + /// + public DateTime? startDate { get; set; } + + /// + /// + /// + public DateTime? endDate { get; set; } + + /// + /// ModifiedUserId. + /// + /// To track the user by which the records have been modified in the past. + /// This will allow us to track the historical changes made to particular record. + /// + public Int32? modifiedUserId { get; set; } + + /// + /// StartDate + /// + public DateTime? createdDate { get; set; } + + /// + /// CreatedUserId. + /// + /// To track the user who created the record at first place + /// + public Int32? createdUserId { get; set; } + + + /// + /// Convert this object to a JSON string of itself + /// + /// A JSON string of this object + public override string ToString() + { + return JsonConvert.SerializeObject(this, new JsonSerializerSettings() { Formatting = Formatting.Indented }); + } + } +} diff --git a/src/models/CountryCoefficientsRequestEntity.cs b/src/models/CountryCoefficientsRequestEntity.cs new file mode 100644 index 0000000..fdbc660 --- /dev/null +++ b/src/models/CountryCoefficientsRequestEntity.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +/* + * AvaTax API Client Library + * + * (c) 2004-2023 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * Swagger name: AvaTaxClient + */ + +namespace Avalara.AvaTax.RestClient +{ + /// + /// Represents the Country coefficients request input model, using which tax rules rates can be modified dynamically for CB transaciotns while applying tax rules + /// in order to reduce the variance for all the transactions at country level. + /// + public class CountryCoefficientsRequestEntity + { + /// + /// AccountId + /// + public Int32 accountId { get; set; } + + /// + /// CountryCoefficientsRequestModel list + /// + public List coefficientDetails { get; set; } + + + /// + /// Convert this object to a JSON string of itself + /// + /// A JSON string of this object + public override string ToString() + { + return JsonConvert.SerializeObject(this, new JsonSerializerSettings() { Formatting = Formatting.Indented }); + } + } +} diff --git a/src/models/CountryCoefficientsRequestModel.cs b/src/models/CountryCoefficientsRequestModel.cs new file mode 100644 index 0000000..d4fe832 --- /dev/null +++ b/src/models/CountryCoefficientsRequestModel.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +/* + * AvaTax API Client Library + * + * (c) 2004-2023 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * Swagger name: AvaTaxClient + */ + +namespace Avalara.AvaTax.RestClient +{ + /// + /// Represents the Country coefficients model, using which tax rules rates can be modified dynamically for CB transaciotns while applying tax rules + /// in order to reduce the variance for all the transactions at country level. + /// + public class CountryCoefficientsRequestModel + { + /// + /// CompanyCode + /// + public String companyCode { get; set; } + + /// + /// The country for which coefficient will be applied. + /// + public String country { get; set; } + + /// + /// Value by which rates need to be altered while calculating taxes. + /// + public Decimal coefficient { get; set; } + + /// + /// TaxSubTypeId + /// + public String taxSubTypeId { get; set; } + + /// + /// CurrencyCode + /// + public String currencyCode { get; set; } + + /// + /// UnitOfBasisId + /// + public Int32 unitOfBasisId { get; set; } + + /// + /// IsApplicable + /// Flag that is being used to mark the effectiveness of the specific entry for the particular date. + /// + public Boolean isApplicable { get; set; } + + /// + /// StartDate + /// + public DateTime startDate { get; set; } + + /// + /// + /// + public DateTime endDate { get; set; } + + + /// + /// Convert this object to a JSON string of itself + /// + /// A JSON string of this object + public override string ToString() + { + return JsonConvert.SerializeObject(this, new JsonSerializerSettings() { Formatting = Formatting.Indented }); + } + } +} diff --git a/src/models/CountryCoefficientsResponseModel.cs b/src/models/CountryCoefficientsResponseModel.cs new file mode 100644 index 0000000..7e35d16 --- /dev/null +++ b/src/models/CountryCoefficientsResponseModel.cs @@ -0,0 +1,49 @@ +using System; +using System.Collections.Generic; +using Newtonsoft.Json; + +/* + * AvaTax API Client Library + * + * (c) 2004-2023 Avalara, Inc. + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + * + * @author Jonathan Wenger + * @author Sachin Baijal + * Swagger name: AvaTaxClient + */ + +namespace Avalara.AvaTax.RestClient +{ + /// + /// Represents the coefficient, using which tax rules rates can be modified dynamically while applying tax rules + /// in order to reduce the variance for all the transactions at country level. + /// + /// Avalara supports a few different types of tax rules. For information about tax rule types, see + /// [TaxRuleTypeId](https://developer.avalara.com/cofficients) + /// + public class CountryCoefficientsResponseModel + { + /// + /// Total Number of Country Coefficients records inserted/updated. + /// + public Int32? count { get; set; } + + /// + /// Message + /// + public String message { get; set; } + + + /// + /// Convert this object to a JSON string of itself + /// + /// A JSON string of this object + public override string ToString() + { + return JsonConvert.SerializeObject(this, new JsonSerializerSettings() { Formatting = Formatting.Indented }); + } + } +} diff --git a/src/models/ParameterUsageModel.cs b/src/models/ParameterUsageModel.cs index 77709cf..4ac5729 100644 --- a/src/models/ParameterUsageModel.cs +++ b/src/models/ParameterUsageModel.cs @@ -93,6 +93,11 @@ public class ParameterUsageModel /// public List values { get; set; } + /// + /// If the parameter is of enumeration data type, then this list will be populated with description for each enum value. + /// + public List valueDescriptions { get; set; } + /// /// The unit of measurement type of the parameter /// diff --git a/src/models/TransactionLineModel.cs b/src/models/TransactionLineModel.cs index 59b067c..1b03078 100644 --- a/src/models/TransactionLineModel.cs +++ b/src/models/TransactionLineModel.cs @@ -274,6 +274,13 @@ public class TransactionLineModel ///
public List details { get; set; } + /// + /// Optional: A list of Account payable Sales tax details for this line item. + /// + /// To fetch this list, add the query string `?$include=AccountPayableSalesTaxDetails` to your URL. + /// + public List accountPayableSalesTaxDetails { get; set; } + /// /// Optional: A list of non-passthrough tax details for this line item. ///