From 8df04dff17168fa91b9772d7a9334153460df928 Mon Sep 17 00:00:00 2001 From: svc-developer Date: Fri, 27 Oct 2023 15:12:23 +0000 Subject: [PATCH] 23.10.1 --- GlobalAssemblyInfo.cs | 4 +- src/AvaTaxApi.cs | 636 +++++++++++++++++- src/Avalara.AvaTax.RestClient.nuspec | 2 +- src/IAvaTaxClient.cs | 366 +++++++++- src/enums/BatchType.cs | 5 + src/enums/DocumentType.cs | 26 + src/enums/ErrorCodeId.cs | 15 + src/models/APConfigSettingRequestModel.cs | 55 ++ .../APConfigSettingSuccessResponseModel.cs | 70 ++ src/models/CostCenterBulkUploadInputModel.cs | 40 ++ src/models/CostCenterBulkUploadOutputModel.cs | 45 ++ src/models/CostCenterRequestModel.cs | 60 ++ src/models/CostCenterSuccessResponseModel.cs | 75 +++ src/models/CostCenterUploadErrorModel.cs | 50 ++ src/models/GetBatchesResult.cs | 35 + .../Int64TaxProfileObjectReferenceModel.cs | 50 ++ src/models/TaxProfileErrorResponseModel.cs | 50 ++ src/models/TaxProfileMetaDataModel.cs | 55 ++ 18 files changed, 1630 insertions(+), 9 deletions(-) create mode 100644 src/models/APConfigSettingRequestModel.cs create mode 100644 src/models/APConfigSettingSuccessResponseModel.cs create mode 100644 src/models/CostCenterBulkUploadInputModel.cs create mode 100644 src/models/CostCenterBulkUploadOutputModel.cs create mode 100644 src/models/CostCenterRequestModel.cs create mode 100644 src/models/CostCenterSuccessResponseModel.cs create mode 100644 src/models/CostCenterUploadErrorModel.cs create mode 100644 src/models/GetBatchesResult.cs create mode 100644 src/models/Int64TaxProfileObjectReferenceModel.cs create mode 100644 src/models/TaxProfileErrorResponseModel.cs create mode 100644 src/models/TaxProfileMetaDataModel.cs diff --git a/GlobalAssemblyInfo.cs b/GlobalAssemblyInfo.cs index 2dea013..59af00f 100644 --- a/GlobalAssemblyInfo.cs +++ b/GlobalAssemblyInfo.cs @@ -30,5 +30,5 @@ // Revision // -[assembly: AssemblyVersion("23.8.1")] -[assembly: AssemblyFileVersion("23.8.1")] +[assembly: AssemblyVersion("23.10.1")] +[assembly: AssemblyFileVersion("23.10.1")] diff --git a/src/AvaTaxApi.cs b/src/AvaTaxApi.cs index f836bcc..bc58b4d 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.8.1 + * @version 23.10.1 * @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.8.1"; } } + public static string API_VERSION { get { return "23.10.1"; } } #region Methods @@ -551,6 +551,94 @@ public AdvancedRuleLookupFileModel UpdateLookupFile(Int32 accountId, String id, } + /// + /// Create new rule + /// + /// + /// + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this AP Config Setting object + /// The AP Config Setting you wish to create. + public APConfigSettingSuccessResponseModel CreateAPConfigSetting(Int32 companyid, APConfigSettingRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/apconfigsetting"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("POST", path, model); + } + + + /// + /// Retrieve rule for this company + /// + /// + /// + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that defined this rule + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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 GetAPConfigSettingByCompany(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/apconfigsetting"); + path.ApplyField("companyid", companyid); + 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 all rules + /// + /// + /// + /// + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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 QueryAPConfigSetting(String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/apconfigsetting"); + 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); + } + + + /// + /// Update a AP config setting + /// + /// + /// + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this AP config setting object + /// The AP config setting object you wish to update. + public APConfigSettingSuccessResponseModel UpdateAPConfigSetting(Int32 companyid, APConfigSettingRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/apconfigsetting"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("PUT", path, model); + } + + /// /// Create a new AvaFileForm /// @@ -2536,6 +2624,154 @@ public ContactModel UpdateContact(Int32 companyId, Int32 id, ContactModel model) } + /// + /// Bulk upload cost centers + /// + /// + /// Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The cost center bulk upload model. + public CostCenterBulkUploadOutputModel BulkUploadCostCenters(Int32 companyid, CostCenterBulkUploadInputModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/$upload"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("POST", path, model); + } + + + /// + /// Create new cost center + /// + /// + /// Creates one or more new item objects attached to this company. + /// + /// Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The cost center you wish to create. + public CostCenterSuccessResponseModel CreateCostCenter(Int32 companyid, CostCenterRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("POST", path, model); + } + + + /// + /// Delete cost center for the given id + /// + /// + /// Deletes a cost center with the specified costcenterId that belongs to the company. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + public TaxProfileErrorResponseModel DeleteCostCenter(Int32 companyid, Int64 costcenterid) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/{costcenterid}"); + path.ApplyField("companyid", companyid); + path.ApplyField("costcenterid", costcenterid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("DELETE", path, null); + } + + + /// + /// Retrieve a single cost center + /// + /// + /// Retrieves details of a single cost center identified by costcenterId, which is owned by the company. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + public CostCenterSuccessResponseModel GetCostCenterById(Int32 companyid, Int64 costcenterid) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/{costcenterid}"); + path.ApplyField("companyid", companyid); + path.ApplyField("costcenterid", costcenterid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("GET", path, null); + } + + + /// + /// Retrieve cost centers for this company + /// + /// + /// Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that defined these cost centers + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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 ListCostCentersByCompany(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters"); + path.ApplyField("companyid", companyid); + 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 all cost centers + /// + /// + /// Retrieves all cost centers available. You can apply filters to retrieve specific records. + /// + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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 QueryCostCenters(String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/costcenters"); + 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); + } + + + /// + /// Update a single cost center + /// + /// + /// Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + /// The cost center object you wish to update. + public CostCenterSuccessResponseModel UpdateCostCenter(Int32 companyid, Int64 costcenterid, CostCenterRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/{costcenterid}"); + path.ApplyField("companyid", companyid); + path.ApplyField("costcenterid", costcenterid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("PUT", path, model); + } + + /// /// Create customers for this company /// @@ -4631,7 +4867,7 @@ public FetchResult ListProductClassificationSy /// /// Swagger Name: AvaTaxClient /// The country to examine for rate types - /// 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/). + /// 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:* country /// 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`. @@ -12107,6 +12343,77 @@ public ShippingVerifyResult verifyShipment(String companyCode, String transactio return RestCall("GET", path, null); } + + /// + /// Enqueues a batch of AvaTax transactions to be deregistered by ASV + /// + /// + /// + /// + /// Swagger Name: AvaTaxBeverageClient + /// The company code of the company that recorded the transaction + /// The batch code of generated by AvaTax batch transaction upload + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + public void enqueueBatchDeregistration(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ) + { + var path = new AvaTaxPath("/api/v2/asv/companies/{companyCode}/batches/{batchCode}/deregister"); + path.ApplyField("companyCode", companyCode); + path.ApplyField("batchCode", batchCode); + if(!String.IsNullOrEmpty(api_version)){ + path.AddQuery("api-version", api_version); + } + if(!String.IsNullOrEmpty(x_avalara_version)){ + WithCustomHeader("x-avalara-version", x_avalara_version); + } + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + RestCallString("PUT", path, null); + } + + + /// + /// Enqueues a batch of AvaTax transactions to be registered by ASV + /// + /// + /// + /// + /// Swagger Name: AvaTaxBeverageClient + /// The company code of the company that recorded the transaction + /// The batch code generated by AvaTax for batch transaction upload process + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + public void enqueueBatchRegistration(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ) + { + var path = new AvaTaxPath("/api/v2/asv/companies/{companyCode}/batches/{batchCode}/register"); + path.ApplyField("companyCode", companyCode); + path.ApplyField("batchCode", batchCode); + if(!String.IsNullOrEmpty(api_version)){ + path.AddQuery("api-version", api_version); + } + if(!String.IsNullOrEmpty(x_avalara_version)){ + WithCustomHeader("x-avalara-version", x_avalara_version); + } + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + RestCallString("PUT", path, null); + } + + + /// + /// Gets records for current and previously processed batch registration jobs + /// + /// + /// + /// + /// Swagger Name: AvaTaxBeverageClient + /// (Optional): For users with access to multiple accounts, filters results to those associated with the specified Account ID. If not specified, the Account ID defaults to the one associated with the account + public GetBatchesResult getBatchRegistrationData(String accountId) + { + var path = new AvaTaxPath("/api/v2/asv/batches"); + path.AddQuery("accountId", accountId); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID, API_VERSION); + return RestCall("GET", path, null); + } + #endregion #region Asynchronous @@ -12639,6 +12946,98 @@ public async Task UpdateLookupFileAsync(Int32 accou } + /// Swagger Name: AvaTaxClient + /// + /// Create new rule; + /// + /// + /// ; + /// + + /// The ID of the company that owns this AP Config Setting object + /// The AP Config Setting you wish to create. + public async Task CreateAPConfigSettingAsync(Int32 companyid, APConfigSettingRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/apconfigsetting"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("POST", path, model).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve rule for this company; + /// + /// + /// ; + /// + + /// The ID of the company that defined this rule + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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> GetAPConfigSettingByCompanyAsync(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/apconfigsetting"); + path.ApplyField("companyid", companyid); + 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 all rules; + /// + /// + /// ; + /// + + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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> QueryAPConfigSettingAsync(String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/apconfigsetting"); + 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 + /// + /// Update a AP config setting; + /// + /// + /// ; + /// + + /// The ID of the company that owns this AP config setting object + /// The AP config setting object you wish to update. + public async Task UpdateAPConfigSettingAsync(Int32 companyid, APConfigSettingRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/apconfigsetting"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("PUT", path, model).ConfigureAwait(false); + } + + /// Swagger Name: AvaTaxClient /// /// Create a new AvaFileForm; @@ -14683,6 +15082,161 @@ public async Task UpdateContactAsync(Int32 companyId, Int32 id, Co } + /// Swagger Name: AvaTaxClient + /// + /// Bulk upload cost centers; + /// + /// + /// Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded.; + /// + + /// The ID of the company that owns this cost center object + /// The cost center bulk upload model. + public async Task BulkUploadCostCentersAsync(Int32 companyid, CostCenterBulkUploadInputModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/$upload"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("POST", path, model).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxClient + /// + /// Create new cost center; + /// + /// + /// Creates one or more new item objects attached to this company. + /// + /// Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations.; + /// + + /// The ID of the company that owns this cost center object + /// The cost center you wish to create. + public async Task CreateCostCenterAsync(Int32 companyid, CostCenterRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters"); + path.ApplyField("companyid", companyid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("POST", path, model).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxClient + /// + /// Delete cost center for the given id; + /// + /// + /// Deletes a cost center with the specified costcenterId that belongs to the company.; + /// + + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + public async Task DeleteCostCenterAsync(Int32 companyid, Int64 costcenterid) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/{costcenterid}"); + path.ApplyField("companyid", companyid); + path.ApplyField("costcenterid", costcenterid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("DELETE", path, null).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve a single cost center; + /// + /// + /// Retrieves details of a single cost center identified by costcenterId, which is owned by the company.; + /// + + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + public async Task GetCostCenterByIdAsync(Int32 companyid, Int64 costcenterid) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/{costcenterid}"); + path.ApplyField("companyid", companyid); + path.ApplyField("costcenterid", costcenterid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("GET", path, null).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve cost centers for this company; + /// + /// + /// Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records.; + /// + + /// The ID of the company that defined these cost centers + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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> ListCostCentersByCompanyAsync(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters"); + path.ApplyField("companyid", companyid); + 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 all cost centers; + /// + /// + /// Retrieves all cost centers available. You can apply filters to retrieve specific records.; + /// + + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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> QueryCostCentersAsync(String filter, String include, Int32? top, Int32? skip, String orderBy) + { + var path = new AvaTaxPath("/api/v2/costcenters"); + 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 + /// + /// Update a single cost center; + /// + /// + /// Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update.; + /// + + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + /// The cost center object you wish to update. + public async Task UpdateCostCenterAsync(Int32 companyid, Int64 costcenterid, CostCenterRequestModel model) + { + var path = new AvaTaxPath("/api/v2/companies/{companyid}/costcenters/{costcenterid}"); + path.ApplyField("companyid", companyid); + path.ApplyField("costcenterid", costcenterid); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("PUT", path, model).ConfigureAwait(false); + } + + /// Swagger Name: AvaTaxClient /// /// Create customers for this company; @@ -16848,7 +17402,7 @@ public async Task> ListProductClas /// /// The country to examine for rate types - /// 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/). + /// 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:* country /// 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`. @@ -24545,6 +25099,80 @@ public async Task verifyShipmentAsync(String companyCode, return await RestCallAsync("GET", path, null).ConfigureAwait(false); } + + /// Swagger Name: AvaTaxBeverageClient + /// + /// Enqueues a batch of AvaTax transactions to be deregistered by ASV; + /// + /// + /// ; + /// + + /// The company code of the company that recorded the transaction + /// The batch code of generated by AvaTax batch transaction upload + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + public async Task enqueueBatchDeregistrationAsync(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ) + { + var path = new AvaTaxPath("/api/v2/asv/companies/{companyCode}/batches/{batchCode}/deregister"); + path.ApplyField("companyCode", companyCode); + path.ApplyField("batchCode", batchCode); + if(!String.IsNullOrEmpty(api_version)){ + path.AddQuery("api-version", api_version); + } + if(!String.IsNullOrEmpty(x_avalara_version)){ + WithCustomHeader("x-avalara-version", x_avalara_version); + } + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + await RestCallStringAsync("PUT", path, null).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxBeverageClient + /// + /// Enqueues a batch of AvaTax transactions to be registered by ASV; + /// + /// + /// ; + /// + + /// The company code of the company that recorded the transaction + /// The batch code generated by AvaTax for batch transaction upload process + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + public async Task enqueueBatchRegistrationAsync(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ) + { + var path = new AvaTaxPath("/api/v2/asv/companies/{companyCode}/batches/{batchCode}/register"); + path.ApplyField("companyCode", companyCode); + path.ApplyField("batchCode", batchCode); + if(!String.IsNullOrEmpty(api_version)){ + path.AddQuery("api-version", api_version); + } + if(!String.IsNullOrEmpty(x_avalara_version)){ + WithCustomHeader("x-avalara-version", x_avalara_version); + } + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + await RestCallStringAsync("PUT", path, null).ConfigureAwait(false); + } + + + /// Swagger Name: AvaTaxBeverageClient + /// + /// Gets records for current and previously processed batch registration jobs; + /// + /// + /// ; + /// + + /// (Optional): For users with access to multiple accounts, filters results to those associated with the specified Account ID. If not specified, the Account ID defaults to the one associated with the account + public async Task getBatchRegistrationDataAsync(String accountId) + { + var path = new AvaTaxPath("/api/v2/asv/batches"); + path.AddQuery("accountId", accountId); + _clientHeaders[Constants.AVALARA_CLIENT_HEADER]=string.Format(ClientID , API_VERSION); + return await RestCallAsync("GET", path, null).ConfigureAwait(false); + } + #endif #endregion } diff --git a/src/Avalara.AvaTax.RestClient.nuspec b/src/Avalara.AvaTax.RestClient.nuspec index 3bc1d1d..2bfa680 100644 --- a/src/Avalara.AvaTax.RestClient.nuspec +++ b/src/Avalara.AvaTax.RestClient.nuspec @@ -3,7 +3,7 @@ Avalara.AvaTax - 23.8.1 + 23.10.1 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 c0a23ec..1c625b7 100644 --- a/src/IAvaTaxClient.cs +++ b/src/IAvaTaxClient.cs @@ -445,6 +445,57 @@ public interface IAvaTaxClient /// The new values to update the lookup file AdvancedRuleLookupFileModel UpdateLookupFile(Int32 accountId, String id, AdvancedRuleLookupFileModel model); + /// + /// Create new rule + /// + /// + /// + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this AP Config Setting object + /// The AP Config Setting you wish to create. + APConfigSettingSuccessResponseModel CreateAPConfigSetting(Int32 companyid, APConfigSettingRequestModel model); + + /// + /// Retrieve rule for this company + /// + /// + /// + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that defined this rule + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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 GetAPConfigSettingByCompany(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// + /// Retrieve all rules + /// + /// + /// + /// + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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 QueryAPConfigSetting(String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// + /// Update a AP config setting + /// + /// + /// + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this AP config setting object + /// The AP config setting object you wish to update. + APConfigSettingSuccessResponseModel UpdateAPConfigSetting(Int32 companyid, APConfigSettingRequestModel model); + /// /// Create a new AvaFileForm /// @@ -1947,6 +1998,93 @@ public interface IAvaTaxClient /// The contact you wish to update. ContactModel UpdateContact(Int32 companyId, Int32 id, ContactModel model); + /// + /// Bulk upload cost centers + /// + /// + /// Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The cost center bulk upload model. + CostCenterBulkUploadOutputModel BulkUploadCostCenters(Int32 companyid, CostCenterBulkUploadInputModel model); + + /// + /// Create new cost center + /// + /// + /// Creates one or more new item objects attached to this company. + /// + /// Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The cost center you wish to create. + CostCenterSuccessResponseModel CreateCostCenter(Int32 companyid, CostCenterRequestModel model); + + /// + /// Delete cost center for the given id + /// + /// + /// Deletes a cost center with the specified costcenterId that belongs to the company. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + TaxProfileErrorResponseModel DeleteCostCenter(Int32 companyid, Int64 costcenterid); + + /// + /// Retrieve a single cost center + /// + /// + /// Retrieves details of a single cost center identified by costcenterId, which is owned by the company. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + CostCenterSuccessResponseModel GetCostCenterById(Int32 companyid, Int64 costcenterid); + + /// + /// Retrieve cost centers for this company + /// + /// + /// Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that defined these cost centers + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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 ListCostCentersByCompany(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// + /// Retrieve all cost centers + /// + /// + /// Retrieves all cost centers available. You can apply filters to retrieve specific records. + /// + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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 QueryCostCenters(String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// + /// Update a single cost center + /// + /// + /// Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update. + /// + /// Swagger Name: AvaTaxClient + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + /// The cost center object you wish to update. + CostCenterSuccessResponseModel UpdateCostCenter(Int32 companyid, Int64 costcenterid, CostCenterRequestModel model); + /// /// Create customers for this company /// @@ -3342,7 +3480,7 @@ public interface IAvaTaxClient /// /// Swagger Name: AvaTaxClient /// The country to examine for rate types - /// 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/). + /// 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:* country /// 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`. @@ -8837,6 +8975,42 @@ public interface IAvaTaxClient /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. ShippingVerifyResult verifyShipment(String companyCode, String transactionCode, String documentType, String api_version = "" , String x_avalara_version = "" ); + + /// + /// Enqueues a batch of AvaTax transactions to be deregistered by ASV + /// + /// + /// + /// + /// Swagger Name: AvaTaxBeverageClient + /// The company code of the company that recorded the transaction + /// The batch code of generated by AvaTax batch transaction upload + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + void enqueueBatchDeregistration(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ); + + /// + /// Enqueues a batch of AvaTax transactions to be registered by ASV + /// + /// + /// + /// + /// Swagger Name: AvaTaxBeverageClient + /// The company code of the company that recorded the transaction + /// The batch code generated by AvaTax for batch transaction upload process + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + void enqueueBatchRegistration(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ); + + /// + /// Gets records for current and previously processed batch registration jobs + /// + /// + /// + /// + /// Swagger Name: AvaTaxBeverageClient + /// (Optional): For users with access to multiple accounts, filters results to those associated with the specified Account ID. If not specified, the Account ID defaults to the one associated with the account + GetBatchesResult getBatchRegistrationData(String accountId); #endregion #region Asynchronous #if PORTABLE @@ -9220,6 +9394,61 @@ public interface IAvaTaxClient /// The new values to update the lookup file Task UpdateLookupFileAsync(Int32 accountId, String id, AdvancedRuleLookupFileModel model); + /// Swagger Name: AvaTaxClient + /// + /// Create new rule; + /// + /// + /// ; + /// + + /// The ID of the company that owns this AP Config Setting object + /// The AP Config Setting you wish to create. + Task CreateAPConfigSettingAsync(Int32 companyid, APConfigSettingRequestModel model); + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve rule for this company; + /// + /// + /// ; + /// + + /// The ID of the company that defined this rule + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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> GetAPConfigSettingByCompanyAsync(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve all rules; + /// + /// + /// ; + /// + + /// 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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + /// 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> QueryAPConfigSettingAsync(String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// Swagger Name: AvaTaxClient + /// + /// Update a AP config setting; + /// + /// + /// ; + /// + + /// The ID of the company that owns this AP config setting object + /// The AP config setting object you wish to update. + Task UpdateAPConfigSettingAsync(Int32 companyid, APConfigSettingRequestModel model); + /// Swagger Name: AvaTaxClient /// /// Create a new AvaFileForm; @@ -10781,6 +11010,100 @@ public interface IAvaTaxClient /// The contact you wish to update. Task UpdateContactAsync(Int32 companyId, Int32 id, ContactModel model); + /// Swagger Name: AvaTaxClient + /// + /// Bulk upload cost centers; + /// + /// + /// Allows bulk upload of cost centers for the specified company. Use the companyId path parameter to identify the company for which the cost centers should be uploaded.; + /// + + /// The ID of the company that owns this cost center object + /// The cost center bulk upload model. + Task BulkUploadCostCentersAsync(Int32 companyid, CostCenterBulkUploadInputModel model); + + /// Swagger Name: AvaTaxClient + /// + /// Create new cost center; + /// + /// + /// Creates one or more new item objects attached to this company. + /// + /// Costcenter is defined as function or department within a company which is not directly going to generate revenues and profits to the company but is still incurring expenses to the company for its operations.; + /// + + /// The ID of the company that owns this cost center object + /// The cost center you wish to create. + Task CreateCostCenterAsync(Int32 companyid, CostCenterRequestModel model); + + /// Swagger Name: AvaTaxClient + /// + /// Delete cost center for the given id; + /// + /// + /// Deletes a cost center with the specified costcenterId that belongs to the company.; + /// + + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + Task DeleteCostCenterAsync(Int32 companyid, Int64 costcenterid); + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve a single cost center; + /// + /// + /// Retrieves details of a single cost center identified by costcenterId, which is owned by the company.; + /// + + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + Task GetCostCenterByIdAsync(Int32 companyid, Int64 costcenterid); + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve cost centers for this company; + /// + /// + /// Retrieves a list of cost centers attached to this company. You can apply filters to retrieve specific records.; + /// + + /// The ID of the company that defined these cost centers + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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> ListCostCentersByCompanyAsync(Int32 companyid, String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// Swagger Name: AvaTaxClient + /// + /// Retrieve all cost centers; + /// + /// + /// Retrieves all cost centers available. You can apply filters to retrieve specific records.; + /// + + /// 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:* companyId, meta, defaultItem + /// A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name. + /// 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> QueryCostCentersAsync(String filter, String include, Int32? top, Int32? skip, String orderBy); + + /// Swagger Name: AvaTaxClient + /// + /// Update a single cost center; + /// + /// + /// Updates a single cost center owned by the company. Use the costcenterId path parameter to identify the cost center to update.; + /// + + /// The ID of the company that owns this cost center object + /// The primary key of this cost center + /// The cost center object you wish to update. + Task UpdateCostCenterAsync(Int32 companyid, Int64 costcenterid, CostCenterRequestModel model); + /// Swagger Name: AvaTaxClient /// /// Create customers for this company; @@ -12246,7 +12569,7 @@ public interface IAvaTaxClient /// /// The country to examine for rate types - /// 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/). + /// 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:* country /// 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`. @@ -17962,6 +18285,45 @@ public interface IAvaTaxClient /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. Task verifyShipmentAsync(String companyCode, String transactionCode, String documentType, String api_version = "" , String x_avalara_version = "" ); + + /// Swagger Name: AvaTaxBeverageClient + /// + /// Enqueues a batch of AvaTax transactions to be deregistered by ASV; + /// + /// + /// ; + /// + + /// The company code of the company that recorded the transaction + /// The batch code of generated by AvaTax batch transaction upload + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + Task enqueueBatchDeregistrationAsync(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ); + + /// Swagger Name: AvaTaxBeverageClient + /// + /// Enqueues a batch of AvaTax transactions to be registered by ASV; + /// + /// + /// ; + /// + + /// The company code of the company that recorded the transaction + /// The batch code generated by AvaTax for batch transaction upload process + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2 + /// (Optional): API version that should satisfy the request. If omitted, defaults to 2.2. Header takes precendence if both header and query parameters are present. + Task enqueueBatchRegistrationAsync(String companyCode, String batchCode, String api_version = "" , String x_avalara_version = "" ); + + /// Swagger Name: AvaTaxBeverageClient + /// + /// Gets records for current and previously processed batch registration jobs; + /// + /// + /// ; + /// + + /// (Optional): For users with access to multiple accounts, filters results to those associated with the specified Account ID. If not specified, the Account ID defaults to the one associated with the account + Task getBatchRegistrationDataAsync(String accountId); #endif #endregion } diff --git a/src/enums/BatchType.cs b/src/enums/BatchType.cs index a32e6b7..23ae0fd 100644 --- a/src/enums/BatchType.cs +++ b/src/enums/BatchType.cs @@ -96,5 +96,10 @@ public enum BatchType ///
VarianceImport = 14, + /// + /// + /// + CostCenterImport = 15, + } } diff --git a/src/enums/DocumentType.cs b/src/enums/DocumentType.cs index 9baed7b..28e19a1 100644 --- a/src/enums/DocumentType.cs +++ b/src/enums/DocumentType.cs @@ -164,6 +164,32 @@ public enum DocumentType ///
CustomsOrder = 11, + /// + /// Represents a proposed movement of inventory from one jurisdiction to another. + /// + /// This document type is used when physical goods are shipped from one jurisdiction to another, and it + /// may cause updates in the tax liability for various jurisdictions. + /// + /// For an inventory transfer invoice, the `companyCode` of the transaction refers to the owner of the inventory + /// that will be moved from one location to another. + /// + /// This is a permanent document and is recorded in AvaTax. + /// + InventoryTransferOutboundInvoice = 12, + + /// + /// Represents a proposed movement of inventory from one jurisdiction to another. + /// + /// This document type is used when physical goods are shipped from one jurisdiction to another, and it + /// may cause updates in the tax liability for various jurisdictions. + /// + /// For an inventory transfer invoice, the `companyCode` of the transaction refers to the owner of the inventory + /// that will be moved from one location to another. + /// + /// This is a temporary document type and is not saved in tax history. + /// + InventoryTransferOutboundOrder = 13, + /// /// Not a real document type. /// diff --git a/src/enums/ErrorCodeId.cs b/src/enums/ErrorCodeId.cs index 04b3ef2..71b9639 100644 --- a/src/enums/ErrorCodeId.cs +++ b/src/enums/ErrorCodeId.cs @@ -876,6 +876,11 @@ public enum ErrorCodeId /// DocumentNotCommitted = 313, + /// + /// + /// + LineFetchLimitExceeded = 314, + /// /// /// @@ -1516,6 +1521,11 @@ public enum ErrorCodeId ///
NoClassificationForSameHsCode = 1738, + /// + /// + /// + InvalidValueError = 1739, + /// /// SendSales API errors /// @@ -1837,5 +1847,10 @@ public enum ErrorCodeId ///
RegistrationNumberNotFound = 2812, + /// + /// + /// + InvalidCostCenter = 2813, + } } diff --git a/src/models/APConfigSettingRequestModel.cs b/src/models/APConfigSettingRequestModel.cs new file mode 100644 index 0000000..91547f2 --- /dev/null +++ b/src/models/APConfigSettingRequestModel.cs @@ -0,0 +1,55 @@ +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 +{ + /// + /// AP Config Setting Request Model + /// + public class APConfigSettingRequestModel + { + /// + /// The Amount + /// + public Int64? amount { get; set; } + + /// + /// The Variance For Ignore + /// + public Int64? varianceForIgnore { get; set; } + + /// + /// The Variance For Accrue + /// + public Int64? varianceForAccrue { get; set; } + + /// + /// The Variance Percent + /// + public Int64? variancePercent { 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/APConfigSettingSuccessResponseModel.cs b/src/models/APConfigSettingSuccessResponseModel.cs new file mode 100644 index 0000000..6f6ce6e --- /dev/null +++ b/src/models/APConfigSettingSuccessResponseModel.cs @@ -0,0 +1,70 @@ +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 +{ + /// + /// AP Config Setting Response Model + /// + public class APConfigSettingSuccessResponseModel + { + /// + /// The Rule Id + /// + public Int64? ruleId { get; set; } + + /// + /// CompanyId to which the rule belongs + /// + public Int32? companyId { get; set; } + + /// + /// + /// + public TaxProfileMetaDataModel meta { get; set; } + + /// + /// The Amount + /// + public Int64? amount { get; set; } + + /// + /// The Variance For Ignore + /// + public Int64? varianceForIgnore { get; set; } + + /// + /// The Variance For Accrue + /// + public Int64? varianceForAccrue { get; set; } + + /// + /// The Variance Percent + /// + public Int64? variancePercent { 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/CostCenterBulkUploadInputModel.cs b/src/models/CostCenterBulkUploadInputModel.cs new file mode 100644 index 0000000..d340d76 --- /dev/null +++ b/src/models/CostCenterBulkUploadInputModel.cs @@ -0,0 +1,40 @@ +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 a bulk upload input model. + /// + public class CostCenterBulkUploadInputModel + { + /// + /// List of costCenters + /// + public List costCenters { 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/CostCenterBulkUploadOutputModel.cs b/src/models/CostCenterBulkUploadOutputModel.cs new file mode 100644 index 0000000..ad93319 --- /dev/null +++ b/src/models/CostCenterBulkUploadOutputModel.cs @@ -0,0 +1,45 @@ +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 a bulk upload response model. + /// + public class CostCenterBulkUploadOutputModel + { + /// + /// Count of processed objects + /// + public Int32? total { get; set; } + + /// + /// Dictionary of object and respective list of errors + /// + public List failed { 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/CostCenterRequestModel.cs b/src/models/CostCenterRequestModel.cs new file mode 100644 index 0000000..06799af --- /dev/null +++ b/src/models/CostCenterRequestModel.cs @@ -0,0 +1,60 @@ +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 +{ + /// + /// Cost Center Request Model + /// + public class CostCenterRequestModel + { + /// + /// The Entity Use Code + /// + public String entityUseCode { get; set; } + + /// + /// Effective from Date + /// + public DateTime? effectiveDate { get; set; } + + /// + /// End Date + /// + public DateTime? endDate { get; set; } + + /// + /// + /// + public Int64TaxProfileObjectReferenceModel defaultItem { get; set; } + + /// + /// The Cost center Name + /// + public String costCenterCode { 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/CostCenterSuccessResponseModel.cs b/src/models/CostCenterSuccessResponseModel.cs new file mode 100644 index 0000000..472e003 --- /dev/null +++ b/src/models/CostCenterSuccessResponseModel.cs @@ -0,0 +1,75 @@ +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 +{ + /// + /// Cost Center Response Model + /// + public class CostCenterSuccessResponseModel + { + /// + /// The Cost center Id + /// + public Int64? costCenterId { get; set; } + + /// + /// CompanyId to which the cost center belongs + /// + public Int32? companyId { get; set; } + + /// + /// + /// + public TaxProfileMetaDataModel meta { get; set; } + + /// + /// The Entity Use Code + /// + public String entityUseCode { get; set; } + + /// + /// Effective from Date + /// + public DateTime? effectiveDate { get; set; } + + /// + /// End Date + /// + public DateTime? endDate { get; set; } + + /// + /// + /// + public Int64TaxProfileObjectReferenceModel defaultItem { get; set; } + + /// + /// The Cost center Name + /// + public String costCenterCode { 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/CostCenterUploadErrorModel.cs b/src/models/CostCenterUploadErrorModel.cs new file mode 100644 index 0000000..29d049e --- /dev/null +++ b/src/models/CostCenterUploadErrorModel.cs @@ -0,0 +1,50 @@ +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 a costCenter upload error model. + /// + public class CostCenterUploadErrorModel + { + /// + /// Row index of a costCenter + /// + public Int32? rowIndex { get; set; } + + /// + /// Cost Center name + /// + public String costCenterCode { get; set; } + + /// + /// List of errors for against given costCenter name + /// + public List errors { 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/GetBatchesResult.cs b/src/models/GetBatchesResult.cs new file mode 100644 index 0000000..e6fc29d --- /dev/null +++ b/src/models/GetBatchesResult.cs @@ -0,0 +1,35 @@ +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: AvaTaxBeverageClient + */ + +namespace Avalara.AvaTax.RestClient +{ + /// + /// The Response of the /batches endpoint. + /// + public class GetBatchesResult + { + + /// + /// 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/Int64TaxProfileObjectReferenceModel.cs b/src/models/Int64TaxProfileObjectReferenceModel.cs new file mode 100644 index 0000000..56e7137 --- /dev/null +++ b/src/models/Int64TaxProfileObjectReferenceModel.cs @@ -0,0 +1,50 @@ +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 +{ + /// + /// TaxProfile Service Object Reference Model + /// + public class Int64TaxProfileObjectReferenceModel + { + /// + /// Identifier or Id of data + /// + public Int64? identifier { get; set; } + + /// + /// Display name + /// + public String displayName { get; set; } + + /// + /// Location + /// + public String location { 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/TaxProfileErrorResponseModel.cs b/src/models/TaxProfileErrorResponseModel.cs new file mode 100644 index 0000000..3318748 --- /dev/null +++ b/src/models/TaxProfileErrorResponseModel.cs @@ -0,0 +1,50 @@ +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 +{ + /// + /// Info model for Problem Detail + /// + public class TaxProfileErrorResponseModel + { + /// + /// Title + /// + public String title { get; set; } + + /// + /// Status + /// + public String status { get; set; } + + /// + /// Detail + /// + public String detail { 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/TaxProfileMetaDataModel.cs b/src/models/TaxProfileMetaDataModel.cs new file mode 100644 index 0000000..99f6f7a --- /dev/null +++ b/src/models/TaxProfileMetaDataModel.cs @@ -0,0 +1,55 @@ +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 +{ + /// + /// Tax Profile Service Meta data information + /// + public class TaxProfileMetaDataModel + { + /// + /// Created By User + /// + public String createdUser { get; set; } + + /// + /// Created Date + /// + public DateTime? createdDate { get; set; } + + /// + /// Modified User + /// + public String modifiedUser { get; set; } + + /// + /// Modified Date + /// + public DateTime? modifiedDate { 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 }); + } + } +}