From c740fecdb0fc5ffda88034446e14a229292abb3e Mon Sep 17 00:00:00 2001 From: svc-developer Date: Thu, 13 Jun 2024 16:49:34 +0000 Subject: [PATCH] 24.6.1 --- src/Constants.php | 41 +++-- src/Methods.php | 338 ++++++++++++++++++++++++++++------------ src/Models.php | 381 +++++++++++++++++++++++++++++----------------- 3 files changed, 506 insertions(+), 254 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 0b37011..07ce2e6 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -2,7 +2,7 @@ namespace Avalara; use GuzzleHttp\Client; -define('AVATAX_SDK_VERSION', '24.4.2'); +define('AVATAX_SDK_VERSION', '24.6.1'); /***************************************************************************** * * @@ -784,6 +784,7 @@ class BatchType const C_CUSTOMERSUPPLIERIMPORT = 13; const C_VARIANCEIMPORT = 14; const C_COSTCENTERIMPORT = 15; + const C_GLACCOUNTIMPORT = 16; } @@ -1706,6 +1707,8 @@ class ErrorCodeId const C_NOCLASSIFICATIONFORSAMEHSCODE = 1738; const C_INVALIDVALUEERROR = 1739; const C_ITEMDUALWRITEPARAMETERVALUEMISMATCHERROR = 1740; + const C_DUPLICATEITEMIDSINTAXCODECLASSIFICATIONREQUEST = 1741; + const C_TOOMANYITEMIDSINTAXCODECLASSIFICATIONREQUEST = 1742; /** * SendSales API errors @@ -1834,6 +1837,16 @@ class ErrorCodeId const C_REGISTRATIONNUMBERNOTFOUND = 2812; const C_INVALIDCOSTCENTER = 2813; + /** + * Sync flow restricts one record for Item model + */ + const C_TOOMANYITEMSINSYNCFLOWREQUEST = 2814; + + /** + * IMS-2096: Recommendation status update rule + */ + const C_INVALIDTAXCODEIDINRECOMMENDATIONSTATUSUPDATE = 2815; + /** * Occurs when a Header value is incorrect or invalid in some way */ @@ -3387,26 +3400,30 @@ class DeemedSellerType * Account Payable (AP) status code indicates an action that needs to be taken when the tolerance/threshold falls between certain range. */ class APStatus -{ const C_PAYASBILLEDMATCH = 0; +{ const C_NOACCRUALMATCH = 0; const C_SHORTPAYITEMSACCRUEMATCH = 1; const C_MARKFORREVIEWMATCH = 2; const C_REJECTMATCH = 3; - const C_PAYASBILLEDNOACCRUAL = 4; - const C_PAYASBILLEDACCRUEUNDERCHARGE = 5; + const C_NOACCRUALUNDERCHARGE = 4; + const C_ACCRUEDUNDERCHARGE = 5; const C_SHORTPAYITEMSACCRUEUNDERCHARGE = 6; - const C_MARKFORREVIEWUNDERCHARGE = 7; + const C_NEEDREVIEWUNDERCHARGE = 7; const C_REJECTUNDERCHARGE = 8; - const C_PAYASBILLEDOVERCHARGE = 9; + const C_NOACCRUALOVERCHARGE = 9; const C_SHORTPAYAVALARACALCULATED = 10; const C_SHORTPAYITEMSACCRUEOVERCHARGE = 11; const C_MARKFORREVIEWOVERCHARGE = 12; const C_REJECTOVERCHARGE = 13; - const C_AMOUNTTHRESHOLDNOTMET = 14; - const C_COSTCENTEREXEMPTED = 15; - const C_ITEMEXEMPTED = 16; - const C_TRUSTEDVENDOR = 17; - const C_ACCRUEDBYVENDOR = 18; - const C_IGNORED = 19; + const C_NOACCRUALAMOUNTTHRESHOLDNOTMET = 14; + const C_NOACCRUALEXEMPTEDCOSTCENTER = 15; + const C_NOACCRUALEXEMPTEDITEM = 16; + const C_NOACCRUALTRUSTEDVENDOR = 17; + const C_ACCRUEDVENDOR = 18; + const C_NEEDREVIEWVENDOR = 19; + const C_NOACCRUALEXEMPTEDVENDOR = 20; + const C_NOACCRUALEXEMPTEDGLACCOUNT = 21; + const C_PENDINGACCRUALVENDOR = 22; + const C_PENDINGACCRUALUNDERCHARGE = 23; } diff --git a/src/Methods.php b/src/Methods.php index 2028e8a..2ea1981 100644 --- a/src/Methods.php +++ b/src/Methods.php @@ -3620,7 +3620,7 @@ public function listCertificateExposureZones($filter=null, $top=null, $skip=null * Some parameters are only available for use if you have subscribed to certain features of AvaTax. * Swagger Name: AvaTaxClient * - * @param string $filter 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 + * @param string $filter 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:* attributeSubType, values * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -3883,6 +3883,44 @@ public function listFilingFrequencies($filter=null, $top=null, $skip=null, $orde return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); } + /** + * List of all recommendation status which can be assigned to an item + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * @return \stdClass + */ + public function listItemsRecommendationsStatus() { + $path = "/api/v2/definitions/items/recommendationstatus"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); + } + + /** + * List of all possible status which can be assigned to an item + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * @return \stdClass + */ + public function listItemsStatus() { + $path = "/api/v2/definitions/items/status"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); + } + /** * List jurisdictions based on the filter provided * @@ -4489,7 +4527,7 @@ public function listNoticeTypes($filter=null, $top=null, $skip=null, $orderBy=nu * Some parameters are only available for use if you have subscribed to certain features of AvaTax. * Swagger Name: AvaTaxClient * - * @param string $filter 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:* serviceTypes, regularExpression, values + * @param string $filter 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:* serviceTypes, regularExpression, attributeSubType, values * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -4511,7 +4549,7 @@ public function listParameters($filter=null, $top=null, $skip=null, $orderBy=nul * Swagger Name: AvaTaxClient * * @param int $accountId The ID of the account to retrieve the parameters. - * @param string $filter 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:* serviceTypes, regularExpression, values + * @param string $filter 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:* serviceTypes, regularExpression, attributeSubType, values * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -4551,7 +4589,7 @@ public function listParametersByAccount($accountId, $filter=null, $top=null, $sk * * @param string $companyCode Company code. * @param string $itemCode Item code. - * @param string $filter 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:* serviceTypes, regularExpression, values + * @param string $filter 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:* serviceTypes, regularExpression, attributeSubType, values * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -4574,7 +4612,7 @@ public function listParametersByItem($companyCode, $itemCode, $filter=null, $top * Some parameters are only available for use if you have subscribed to certain features of AvaTax. * Swagger Name: AvaTaxClient * - * @param string $filter 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 + * @param string $filter 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:* attributeSubType, values, valueDescriptions * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -4842,28 +4880,6 @@ public function listRegionsByCountryAndTaxTypeAndTaxSubTypeAndRateType($companyI return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); } - /** - * Retrieve the full list of Avalara-supported resource file types - * - * Returns the full list of Avalara-supported resource file types - * This API is intended to be useful to identify all the different resource file types. - * Swagger Name: AvaTaxClient - * - * @param string $filter 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/). - * @param int $top 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. - * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return \stdClass - */ - public function listResourceFileTypes($filter=null, $top=null, $skip=null, $orderBy=null) { - $path = "/api/v2/definitions/resourcefiletypes"; - $guzzleParams = [ - 'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], - 'body' => null - ]; - return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); - } - /** * Retrieve the full list of Avalara-supported usage of parameters used for returns. * @@ -4872,7 +4888,7 @@ public function listResourceFileTypes($filter=null, $top=null, $skip=null, $orde * Some parameters are only available for use if you have subscribed to certain features of AvaTax. * Swagger Name: AvaTaxClient * - * @param string $filter 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 + * @param string $filter 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:* attributeSubType, values * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. @@ -5814,6 +5830,127 @@ public function fundingRequestStatus($id, $businessUnit, $subscriptionType) { return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); } + /** + * Bulk upload GL accounts + * + * Allows a bulk upload of GL accounts for the specified company. Use the companyid path parameter to identify the company for which the GL accounts should be uploaded. + * Swagger Name: AvaTaxClient + * + * @param int $companyid The ID of the company that owns this GL account object + * @param GLAccountBulkUploadInputModel $model The GL account bulk upload model. + * @return \stdClass + */ + public function bulkUploadGLAccounts($companyid, $model) { + $path = "/api/v2/companies/{$companyid}/glaccounts/$upload"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams, AVATAX_SDK_VERSION ); + } + + /** + * Create a new GL account + * + * Creates one or more new GL account objects attached to this company. + * + * A GL account is a general ledger account that can be passed to transactions at the line level to apply the multiple rules of the transactions, including exemptions, allocations, etc. to a specific general ledger. + * Swagger Name: AvaTaxClient + * + * @param int $companyid The ID of the company that owns this GL Account object + * @param GLAccountRequestModel $model The GL Account you want to create + * @return \stdClass + */ + public function createGLAccount($companyid, $model) { + $path = "/api/v2/companies/{$companyid}/glaccounts"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams, AVATAX_SDK_VERSION ); + } + + /** + * Delete the GL account associated with the given company ID and GL account ID + * + * Deletes the GL account associated with the specified `glaccountid` and `companyid` + * Swagger Name: AvaTaxClient + * + * @param int $companyid The ID of the company that owns this GL account object + * @param int $glaccountid The primary key of this GL account + * @return \stdClass + */ + public function deleteGLAccount($companyid, $glaccountid) { + $path = "/api/v2/companies/{$companyid}/glaccounts/{$glaccountid}"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'DELETE', $guzzleParams, AVATAX_SDK_VERSION ); + } + + /** + * Retrieve a single GL account + * + * Retrieve details of a single GL account identified by its `glaccountid` and `companyid` + * Swagger Name: AvaTaxClient + * + * @param int $companyid The ID of the company that owns this GL account object + * @param int $glaccountid The primary key of this GL account + * @return \stdClass + */ + public function getGLAccountById($companyid, $glaccountid) { + $path = "/api/v2/companies/{$companyid}/glaccounts/{$glaccountid}"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); + } + + /** + * Retrieve GL accounts for this company + * + * Retrieves a list of GL accounts attached to this company. You can apply filters to retrieve specific records. + * Swagger Name: AvaTaxClient + * + * @param int $companyid The ID of the company that owns these GL accounts + * @param string $filter 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 + * @param string $include 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. + * @param int $top 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. + * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @return \stdClass + */ + public function listGLAccountsByCompany($companyid, $filter=null, $include=null, $top=null, $skip=null, $orderBy=null) { + $path = "/api/v2/companies/{$companyid}/glaccounts"; + $guzzleParams = [ + 'query' => ['$filter' => $filter, '$include' => $include, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); + } + + /** + * Update a single GL account + * + * Updates a single GL account owned by the company. Use the glaccountid path parameter to identify the GL account to update. + * Swagger Name: AvaTaxClient + * + * @param int $companyid The ID of the company that owns this GL Account object + * @param int $glaccountid The primary key of this GL Account + * @param GLAccountRequestModel $model The GL account object you want to update + * @return \stdClass + */ + public function updateGLAccount($companyid, $glaccountid, $model) { + $path = "/api/v2/companies/{$companyid}/glaccounts/{$glaccountid}"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'PUT', $guzzleParams, AVATAX_SDK_VERSION ); + } + /** * Delete all classifications for an item * @@ -5984,13 +6121,14 @@ public function createItemParameters($companyId, $itemId, $model) { * Swagger Name: AvaTaxClient * * @param int $companyId The ID of the company that owns this item. + * @param boolean $processRecommendationsSynchronously If true then Indix api will be called synchronously to get tax code recommendations. * @param ItemModel[] $model The item you wish to create. * @return \stdClass */ - public function createItems($companyId, $model) { + public function createItems($companyId, $processRecommendationsSynchronously, $model) { $path = "/api/v2/companies/{$companyId}/items"; $guzzleParams = [ - 'query' => [], + 'query' => ['processRecommendationsSynchronously' => null === $processRecommendationsSynchronously ? null : json_encode($processRecommendationsSynchronously)], 'body' => json_encode($model) ]; return $this->restCall($path, 'POST', $guzzleParams, AVATAX_SDK_VERSION ); @@ -6226,39 +6364,6 @@ public function deleteItemTags($companyId, $itemId) { return $this->restCall($path, 'DELETE', $guzzleParams, AVATAX_SDK_VERSION ); } - /** - * Get status of classification requests of a company - * - * Get status of tax code classification requests of a company. - * - * Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and - * major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes - * allowing them to take advantage of thousands of tax rules in the AvaTax engine resulting in accurate taxability determinations. - * - * Enable includeClassificationDetails flag to get details of classification request status. - * - * ### Security Policies - * - * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. - * Swagger Name: AvaTaxClient - * - * @param int $companyId The ID of the company that defined these items - * @param boolean $includeClassificationDetails A boolean field to get detailed classification status. - * @param string $filter 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:* classificationDetails, totalItems - * @param int $top 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. - * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @return \stdClass - */ - public function getClassificationStatus($companyId, $includeClassificationDetails, $filter=null, $top=null, $skip=null, $orderBy=null) { - $path = "/api/v2/companies/{$companyId}/classificationrequests/taxcode"; - $guzzleParams = [ - 'query' => ['$includeClassificationDetails' => null === $includeClassificationDetails ? null : json_encode($includeClassificationDetails), '$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], - 'body' => null - ]; - return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); - } - /** * Retrieve a single item * @@ -6376,31 +6481,21 @@ public function getItemTags($companyId, $itemId, $filter=null, $top=null, $skip= } /** - * Retrieve premium classification for a company's item based on its ItemCode and SystemCode. + * Get Item TaxCode Recommendations * - * Retrieves the premium classification for an ItemCode and SystemCode. - * - * NOTE: If your item code contains any of these characters /, +, ?,",' ,% or #, please use the following encoding before making a request: - * * Replace '/' with '\_-ava2f-\_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code' - * * Replace '+' with '\_-ava2b-\_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code' - * * Replace '?' with '\_-ava3f-\_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code' - * * Replace '%' with '\_-ava25-\_' For example: 'Item%Code' becomes 'Item_-ava25-_Code' - * * Replace '#' with '\_-ava23-\_' For example: 'Item#Code' becomes 'Item_-ava23-_Code' - * * Replace ''' with '\_-ava27-\_' For example: 'Item'Code' becomes 'Item_-ava27-_Code' - * * Replace '"' with '\_-ava22-\_' For example: 'Item"Code' becomes 'Item_-ava22-_Code' + * Provides at least three tax-code recommendations for the given company ID and item ID * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. * Swagger Name: AvaTaxClient * - * @param int $companyId The ID of the company that owns this item object - * @param string $itemCode The ItemCode of the item for which you want to retrieve premium classification - * @param string $systemCode The SystemCode for which you want to retrieve premium classification + * @param int $companyId + * @param int $itemId * @return \stdClass */ - public function getPremiumClassification($companyId, $itemCode, $systemCode) { - $path = "/api/v2/companies/{$companyId}/items/{$itemCode}/premiumClassification/{$systemCode}"; + public function getItemTaxCodeRecommendations($companyId, $itemId) { + $path = "/api/v2/companies/{$companyId}/items/{$itemId}/taxcoderecommendations"; $guzzleParams = [ 'query' => [], 'body' => null @@ -6409,31 +6504,33 @@ public function getPremiumClassification($companyId, $itemCode, $systemCode) } /** - * Get tax code recommendations + * Retrieve premium classification for a company's item based on its ItemCode and SystemCode. * - * Get tax code recommendations. + * Retrieves the premium classification for an ItemCode and SystemCode. * - * Avalara AvaTax system tax codes represent various goods and services classified by industry or consumer categories and - * major physical similarities. Taxability rules are associated with tax codes. Customers can map their Items to tax codes - * allowing them to take advantage of thousands of tax rules in the AvaTax engine resulting in accurate taxability determinations. + * NOTE: If your item code contains any of these characters /, +, ?,",' ,% or #, please use the following encoding before making a request: + * * Replace '/' with '\_-ava2f-\_' For example: 'Item/Code' becomes 'Item_-ava2f-_Code' + * * Replace '+' with '\_-ava2b-\_' For example: 'Item+Code' becomes 'Item_-ava2b-_Code' + * * Replace '?' with '\_-ava3f-\_' For example: 'Item?Code' becomes 'Item_-ava3f-_Code' + * * Replace '%' with '\_-ava25-\_' For example: 'Item%Code' becomes 'Item_-ava25-_Code' + * * Replace '#' with '\_-ava23-\_' For example: 'Item#Code' becomes 'Item_-ava23-_Code' + * * Replace ''' with '\_-ava27-\_' For example: 'Item'Code' becomes 'Item_-ava27-_Code' + * * Replace '"' with '\_-ava22-\_' For example: 'Item"Code' becomes 'Item_-ava22-_Code' * * ### Security Policies * * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. * Swagger Name: AvaTaxClient * - * @param int $companyId The ID of the company that defined these items - * @param int $requestId The ID of the classification request - * @param string $filter 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:* recommendations, url - * @param int $top 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. - * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. - * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @param int $companyId The ID of the company that owns this item object + * @param string $itemCode The ItemCode of the item for which you want to retrieve premium classification + * @param string $systemCode The SystemCode for which you want to retrieve premium classification * @return \stdClass */ - public function getTaxCodeRecommendations($companyId, $requestId, $filter=null, $top=null, $skip=null, $orderBy=null) { - $path = "/api/v2/companies/{$companyId}/classificationrequests/taxcode/{$requestId}/recommendations"; + public function getPremiumClassification($companyId, $itemCode, $systemCode) { + $path = "/api/v2/companies/{$companyId}/items/{$itemCode}/premiumClassification/{$systemCode}"; $guzzleParams = [ - 'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'query' => [], 'body' => null ]; return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); @@ -6562,6 +6659,10 @@ public function listItemParameters($companyId, $itemId, $filter=null, $top=null, * * You may specify Tag Name in the `tagName` query parameter if you want to filter items on the basis of tagName * + * You may specify comma seperated item status in the `itemStatus` query parameter if you want to filter items on the basis of item status + * + * You may specify Tax Code recommendation status in the `taxCodeRecommendationStatus` query parameter if you want to filter items on the basis of tax code recommendation status + * * You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values: * * * Parameters @@ -6575,18 +6676,20 @@ public function listItemParameters($companyId, $itemId, $filter=null, $top=null, * Swagger Name: AvaTaxClient * * @param int $companyId The ID of the company that defined these items - * @param string $filter 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:* taxCode, source, sourceEntityId, upc, classifications, parameters, tags, properties + * @param string $filter 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:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus * @param string $include A comma separated list of additional data to retrieve. * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. - * @param string $tagName Tag Name on the basis of which you want to filter Items + * @param string $tagName Tag Name on the basis of which you want to filter Items + * @param string $itemStatus A comma separated list of item status on the basis of which you want to filter Items + * @param string $taxCodeRecommendationStatus Tax code recommendation status on the basis of which you want to filter Items * @return \stdClass */ - public function listItemsByCompany($companyId, $filter=null, $include=null, $top=null, $skip=null, $orderBy=null, $tagName=null) { + public function listItemsByCompany($companyId, $filter=null, $include=null, $top=null, $skip=null, $orderBy=null, $tagName=null, $itemStatus=null, $taxCodeRecommendationStatus=null) { $path = "/api/v2/companies/{$companyId}/items"; $guzzleParams = [ - 'query' => ['$filter' => $filter, '$include' => $include, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy, 'tagName' => $tagName], + 'query' => ['$filter' => $filter, '$include' => $include, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy, 'tagName' => $tagName, 'itemStatus' => $itemStatus, 'taxCodeRecommendationStatus' => $taxCodeRecommendationStatus], 'body' => null ]; return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); @@ -6612,7 +6715,7 @@ public function listItemsByCompany($companyId, $filter=null, $include=null, $top * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. * Swagger Name: AvaTaxClient * - * @param string $filter 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:* taxCode, source, sourceEntityId, upc, classifications, parameters, tags, properties + * @param string $filter 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:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus * @param string $include A comma separated list of additional data to retrieve. * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. @@ -6628,6 +6731,43 @@ public function queryItems($filter=null, $include=null, $top=null, $skip=null, $ return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); } + /** + * Retrieve items for this company based on System Code and filter criteria(optional) provided + * + * Retrieve items based on System Code + * + * Items are a way of separating your tax calculation process from your tax configuration details. If you choose, you + * can provide `itemCode` values for each `CreateTransaction()` API call rather than specifying tax codes, parameters, descriptions, + * and other data fields. AvaTax will automatically look up each `itemCode` and apply the correct tax codes and parameters + * from the item table instead. This allows your CreateTransaction call to be as simple as possible, and your tax compliance + * team can manage your item catalog and adjust the tax behavior of items without having to modify your software. + * + * Search for specific objects by passing the `$filter` criteria in the body; 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. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * Swagger Name: AvaTaxClient + * + * @param int $companyId The ID of the company that defined these items + * @param string $systemCode System code on the basis of which you want to filter Items + * @param int $top 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. + * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. + * @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`. + * @param FilterModel $model A filter statement to select specific records, as defined by https://github.com/Microsoft/api-guidelines/blob/master/Guidelines.md#97-filtering . + * @return \stdClass + */ + public function queryItemsBySystemCode($companyId, $systemCode, $top=null, $skip=null, $orderBy=null, $model=null) { + $path = "/api/v2/companies/{$companyId}/items/internal/bySystemCode/{$systemCode}"; + $guzzleParams = [ + 'query' => ['$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams, AVATAX_SDK_VERSION ); + } + /** * Retrieve all items associated with given tag * @@ -6650,7 +6790,7 @@ public function queryItems($filter=null, $include=null, $top=null, $skip=null, $ * * @param int $companyId The ID of the company that defined these items. * @param string $tag The master tag to be associated with item. - * @param string $filter 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:* taxCode, source, sourceEntityId, upc, classifications, parameters, tags, properties + * @param string $filter 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:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus * @param string $include A comma separated list of additional data to retrieve. * @param int $top 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. * @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets. diff --git a/src/Models.php b/src/Models.php index 55fa0b8..2199a37 100644 --- a/src/Models.php +++ b/src/Models.php @@ -1863,33 +1863,6 @@ class ChangeTransactionCodeModel */ public $newCode; } -/** - * Represents classification details model - * Swagger Name: AvaTaxClient - */ -class ClassificationDetailsModel -{ - /** - * @var int The number of items which are classified - */ - public $classified; - /** - * @var int The number of items which are in progress state - */ - public $inProgress; - /** - * @var int The number of items which are not classified - */ - public $notClassified; - /** - * @var int The number of items which are failed because of some error - */ - public $failed; - /** - * @var int The number of items which are not found as they may be deleted - */ - public $notFound; -} /** * Represents a classification for a given item. * Swagger Name: AvaTaxClient @@ -1928,13 +1901,17 @@ class ClassificationParameterUsageMapModel */ public $taxTypeGroupId; /** - * @var string This defines if the parameter is recommeded ,optional or mandatory (See Visibility::* for a list of allowable values) + * @var string This defines if the parameter is recommended ,optional or mandatory (See Visibility::* for a list of allowable values) */ public $visibility; /** * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ public $attributeType; + /** + * @var string The sub-type of parameter as determined by its application. + */ + public $attributeSubType; /** * @var string The name of the property. To use this property, add a field on the `parameters` object of a [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) call. */ @@ -6569,6 +6546,17 @@ class FilingsTaxSummaryModel */ public $reportableTaxAmount; } +/** + * Filter Model + * Swagger Name: AvaTaxClient + */ +class FilterModel +{ + /** + * @var string Filter + */ + public $filter; +} /** * Account Linkage Input model * Swagger Name: AvaTaxClient @@ -7284,6 +7272,117 @@ class FundingStatusModel */ public $templateRequestId; } +/** + * Represents a bulk upload input model. + * Swagger Name: AvaTaxClient + */ +class GLAccountBulkUploadInputModel +{ + /** + * @var GLAccountRequestModel[] List of GL accounts + */ + public $glAccounts; +} +/** + * Represents a bulk upload response model. + * Swagger Name: AvaTaxClient + */ +class GLAccountBulkUploadOutputModel +{ + /** + * @var int The total number of processed objects + */ + public $total; + /** + * @var GLAccountUploadErrorModel[] A dictionary of the object and a respective list of errors + */ + public $failed; +} +/** + * GL account request model + * Swagger Name: AvaTaxClient + */ +class GLAccountRequestModel +{ + /** + * @var string The entity use code + */ + public $entityUseCode; + /** + * @var string The "effective from" date + */ + public $effectiveDate; + /** + * @var string The end date + */ + public $endDate; + /** + * @var Int64TaxProfileObjectReferenceModel + */ + public $defaultItem; + /** + * @var string The GL account code + */ + public $glAccountCode; +} +/** + * GL account response model + * Swagger Name: AvaTaxClient + */ +class GLAccountSuccessResponseModel +{ + /** + * @var int The GL account ID + */ + public $glAccountId; + /** + * @var int The company ID to which this GL account belongs + */ + public $companyId; + /** + * @var TaxProfileMetaDataModel + */ + public $meta; + /** + * @var string The entity use code + */ + public $entityUseCode; + /** + * @var string The "effective from" date + */ + public $effectiveDate; + /** + * @var string The end date + */ + public $endDate; + /** + * @var Int64TaxProfileObjectReferenceModel + */ + public $defaultItem; + /** + * @var string The GL account code + */ + public $glAccountCode; +} +/** + * Represents a GL account upload error model + * Swagger Name: AvaTaxClient + */ +class GLAccountUploadErrorModel +{ + /** + * @var int Row index of a GL account + */ + public $rowIndex; + /** + * @var string GL Account code + */ + public $glAccountCode; + /** + * @var string[] List of errors for against given GL account code + */ + public $errors; +} /** * * Swagger Name: AvaTaxClient @@ -7538,18 +7637,22 @@ class ItemCatalogueInputModel * @var string A friendly description of this item in your product catalog. */ public $description; - /** - * @var string A summary for selection of the tax code. - */ - public $summary; /** * @var string The tax code of the item. */ public $taxCode; + /** + * @var string Type of item + */ + public $itemType; /** * @var string The universal product code of the item. */ public $upc; + /** + * @var string A summary for selection of the tax code. + */ + public $summary; /** * @var string A way to group similar items. */ @@ -7686,11 +7789,11 @@ class ItemModel */ public $itemCode; /** - * @var int DEPRECATED - Date: 11/13/2018, Version: 18.12, Message: For identifying an `Item` with `Avalara TaxCode`, please call the [CreateItemClassification API] with your ItemCode and the Avalara TaxCode. The unique ID number of the tax code that is applied when selling this item. When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string; you do not need to specify both values. + * @var int The unique ID number of the tax code that is applied when selling this item. When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string; you do not need to specify both values. */ public $taxCodeId; /** - * @var string DEPRECATED - Date: 11/13/2018, Version: 18.12, Message: For identifying an `Item` with `Avalara TaxCode`, please call the [CreateItemClassification API] with your ItemCode and the Avalara TaxCode. The unique code string of the Tax Code that is applied when selling this item. When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string; you do not need to specify both values. + * @var string The unique code string of the Tax Code that is applied when selling this item. When creating or updating an item, you can either specify the Tax Code ID number or the Tax Code string; you do not need to specify both values. */ public $taxCode; /** @@ -7722,19 +7825,27 @@ class ItemModel */ public $modifiedUserId; /** - * @var string Source of creation of this item + * @var string Source of creation of this. */ public $source; /** * @var string The Id of this item at the source */ public $sourceEntityId; + /** + * @var string Type of item + */ + public $itemType; /** * @var string Universal unique code for item */ public $upc; /** - * @var ClassificationModel[] List of classifications that belong to this item. A single classification consits of a productCode and a systemCode for a particular item. + * @var string Long Summary for Item + */ + public $summary; + /** + * @var ClassificationModel[] List of classifications that belong to this item. A single classification consists of a productCode and a systemCode for a particular item. */ public $classifications; /** @@ -7749,6 +7860,14 @@ class ItemModel * @var object Additional key-description of the product. */ public $properties; + /** + * @var ItemStatusOutputModel[] List of item status + */ + public $itemStatus; + /** + * @var TaxCodeRecommendationStatusOutputModel + */ + public $taxCodeRecommendationStatus; } /** * Represents a parameter associated with an item. @@ -7949,6 +8068,36 @@ class ItemRestrictionOutputModel */ public $createdUserId; } +/** + * Status Output Model + * Swagger Name: AvaTaxClient + */ +class ItemStatusModel +{ + /** + * @var string Status + */ + public $name; + /** + * @var string Description + */ + public $description; +} +/** + * Output model for item status + * Swagger Name: AvaTaxClient + */ +class ItemStatusOutputModel +{ + /** + * @var string Item Status + */ + public $status; + /** + * @var string Last modified date + */ + public $modifiedDate; +} /** * An abridged item model used for syncing product catalogs with AvaTax. * Swagger Name: AvaTaxClient @@ -8028,18 +8177,10 @@ class ItemTagDetailOutputModel */ class ItemTaxCodeClassificationRequestInputModel { - /** - * @var boolean Determines if classification has to be initiated for all items of a company - */ - public $classifyAllItems; /** * @var int[] Item ids for which classification has to be initiated */ public $itemIds; - /** - * @var string[] Product categories of items - */ - public $productCategories; } /** * Represents a tax code classification request output model @@ -8048,11 +8189,11 @@ class ItemTaxCodeClassificationRequestInputModel class ItemTaxCodeClassificationRequestOutputModel { /** - * @var int The unique ID of the classification request + * @var int The unique Request Id of classification request */ public $requestId; /** - * @var int The unique ID of the company that created the classification request. + * @var int The unique ID number of the company that has created classification request. */ public $companyId; /** @@ -8060,11 +8201,11 @@ class ItemTaxCodeClassificationRequestOutputModel */ public $request; /** - * @var string The status of the classification request + * @var string The status of classification request */ public $status; /** - * @var string The request type of the classification request + * @var string The request type of classification request */ public $requestType; /** @@ -8081,69 +8222,19 @@ class ItemTaxCodeClassificationRequestOutputModel public $modifiedDate; } /** - * Represents a tax code classification request status output model + * Status Output Model * Swagger Name: AvaTaxClient */ -class ItemTaxCodeClassificationRequestStatusOutputModel +class ItemTaxCodeRecommendationStatusModel { /** - * @var int The unique Request Id of classification request - */ - public $requestId; - /** - * @var ClassificationDetailsModel - */ - public $classificationDetails; - /** - * @var int The total number of items for which classification is initiated in request - */ - public $totalItems; - /** - * @var string The status of classification request - */ - public $status; - /** - * @var string The date/time when this request was created. - */ - public $createdDate; -} -/** - * Represents item tax code model - * Swagger Name: AvaTaxClient - */ -class ItemTaxCodeModel -{ - /** - * @var string Suggested tax code + * @var string Status */ - public $taxCode; + public $name; /** - * @var string Suggested tax code description + * @var string Description */ public $description; - /** - * @var int Priority of Suggested tax code description - */ - public $rank; -} -/** - * Represents item tax code recommendations model - * Swagger Name: AvaTaxClient - */ -class ItemTaxCodeRecommendationsOutputModel -{ - /** - * @var string A unique code representing this item. - */ - public $itemCode; - /** - * @var ItemTaxCodeModel[] Item tax code recommendations - */ - public $recommendations; - /** - * @var string Url - */ - public $url; } /** * Represents a item upload error model. @@ -10972,6 +11063,10 @@ class ParameterModel * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ public $attributeType; + /** + * @var string The sub-type of parameter as determined by its application. + */ + public $attributeSubType; /** * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. */ @@ -11031,6 +11126,10 @@ class ParameterUsageModel * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ public $attributeType; + /** + * @var string The sub-type of parameter as determined by its application. + */ + public $attributeSubType; /** * @var string The name of the property. To use this property, add a field on the `parameters` object of a [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) call. */ @@ -11816,21 +11915,6 @@ class ResourceFileDownloadResult */ public $contentType; } -/** - * Resource File Type Model - * Swagger Name: AvaTaxClient - */ -class ResourceFileTypeModel -{ - /** - * @var int The resource file type id - */ - public $resourceFileTypeId; - /** - * @var string The name of the file type - */ - public $name; -} /** * A request to upload a file to Resource Files * Swagger Name: AvaTaxClient @@ -11857,34 +11941,11 @@ class ResourceFileUploadRequestModel * @var string The original name of this file. */ public $name; - /** - * @var int The resource type ID of this file. - */ - public $resourceFileTypeId; /** * @var int Length of the file in bytes. */ public $length; } -/** - * Encapsulates the result of uploading a file to the resource system - * Swagger Name: AvaTaxClient - */ -class ResourceFileUploadResultModel -{ - /** - * @var string If the request failed, this contains a description of the error. - */ - public $message; - /** - * @var int If the request succeeded, this is the ID number of the file. - */ - public $resourceFileId; - /** - * @var boolean True if the upload request succeeded. - */ - public $aaa_success; -} /** * usage of system defined parameters for returns. * Swagger Name: AvaTaxClient @@ -11911,6 +11972,10 @@ class ReturnsParameterUsageModel * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ public $attributeType; + /** + * @var string The sub-type of parameter as determined by its application. + */ + public $attributeSubType; /** * @var string The name of the property. To use this property, add a field on the `parameters` object of a [CreateTransaction](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Transactions/CreateTransaction/) call. */ @@ -12353,6 +12418,36 @@ class TaxCodeModel */ public $modifiedUserId; } +/** + * Output model for item tax code recommendation status + * Swagger Name: AvaTaxClient + */ +class TaxCodeRecommendationStatusOutputModel +{ + /** + * @var string Recommendation status + */ + public $status; + /** + * @var string Status message + */ + public $message; +} +/** + * Tax Code Recommendation Output Model + * Swagger Name: AvaTaxClient + */ +class TaxCodeRecommendationsOutputModel +{ + /** + * @var string Recommended TaxCode + */ + public $taxCode; + /** + * @var string Recommended TaxCode Level + */ + public $level; +} /** * Information about Avalara-defined tax code types. * This list is used when creating tax codes and tax rules. @@ -13910,11 +14005,11 @@ class TransactionModel */ public $deliveryTerms; /** - * @var string Users can set tolerance or threshold limits on transactions and inform users of appropriate actions to take if a transaction falls outside of these values. An Accounts Payable (AP) status code indicates the action that needs to be taken when the tolerance/threshold falls above or below the tolerance/threshold limits. Available AP status codes are: 1. PayAsBilledMatch 2. PayAsBilledNoAccrual 3. PayAsBilledAccrueUndercharge 4. ShortPayItemsAccrueUndercharge 5. MarkForReviewUndercharge 6. RejectUndercharge 7. ShortPayItemsAccrueOvercharge 8. MarkForReviewOvercharge 9. RejectOvercharge 10. RejectMatch 11. MarkForReviewMatch 12. ShortPayItemsAccrueMatch 13. PayAsBilledOvercharge 14. ShortPayAvalaraCalculated 15. AmountThresholdNotMet 16. TrustedVendor 17. CostCenterExempted 18. ItemExempted 19. AccruedByVendor (See APStatus::* for a list of allowable values) + * @var string Users can set tolerance or threshold limits on transactions and inform users of appropriate actions to take if a transaction falls outside of these values. An Accounts Payable (AP) status code indicates the action that needs to be taken when the tolerance/threshold falls above or below the tolerance/threshold limits. Available AP status codes are: 1. NoAccrualMatch 2. NoAccrualUndercharge 3. NoAccrualOvercharge 4. NoAccrualAmountThresholdNotMet 5. NoAccrualTrustedVendor 6. NoAccrualExemptedCostCenter 7. NoAccrualExemptedItem 8. NoAccrualExemptedVendor 9. AccruedUndercharge 10. AccruedVendor 11. NeedReviewUndercharge 12. NeedReviewVendor 13. PendingAccrualVendor 14. PendingAccrualUndercharge (See APStatus::* for a list of allowable values) */ public $apStatusCode; /** - * @var string An Accounts Payable (AP) status indicates an action that needs to be taken when the tolerance amount falls above or below certain threshold limits. Available AP statuses are: 1. Ignored - No variance, pay as billed (PayAsBilledMatch) 2. Ignored - Undercharged, pay as billed (PayAsBilledNoAccrual) 3. Accrued - Pay bill and accrue undercharge variance (PayAsBilledAccrueUndercharge) 4. Accrued - Pay for items and accrue all tax (ShortPayItemsAccrueUndercharge) 5. Needs review - Undercharged (MarkForReviewUndercharge) 6. Ignored - Reject undercharged transaction (RejectUndercharge) 7. Accrued - Pay for items and accrue all tax (ShortPayItemsAccrueOvercharge) 8. Needs review - Overcharged (MarkForReviewOvercharge) 9. Ignored - Reject overcharged transaction (RejectOvercharge) 10. Ignored - No variance, reject transaction (RejectMatch) 11. Needs review - No variance (MarkForReviewMatch) 12. Accrued - No variance, pay for items and accrue all tax (ShortPayItemsAccrueMatch) 13. Ignored - Overcharged, pay as billed (PayAsBilledOvercharge) 14. Ignored - Overcharged, pay Avalara’s calculated tax (ShortPayAvalaraCalculated) 15. Ignored - Amount threshold not met (AmountThresholdNotMet) 16. Ignored - Use trusted vendor’s calculations (TrustedVendor) 17. Ignored - Cost center exempted from tax (CostCenterExempted) 18. Ignored - Item exempted from tax (ItemExempted) 19. Accrued - Accrued by Vendor (AccruedByVendor) + * @var string An Accounts Payable (AP) status indicates an action that needs to be taken when the tolerance amount falls above or below certain threshold limits. */ public $apStatus; }