From 29f71a8048a21aeda765afb394f3a8a42eb61bc0 Mon Sep 17 00:00:00 2001 From: SVC Developer Date: Thu, 10 Jun 2021 23:18:36 +0000 Subject: [PATCH] 21.6.0 update --- src/Client.php | 4 +- src/Constants.php | 94 +- src/Methods.php | 392 ++- src/Models.php | 6046 ++++++++++++++++++++++++--------------------- 4 files changed, 3620 insertions(+), 2916 deletions(-) diff --git a/src/Client.php b/src/Client.php index 2710b4e..99a13f9 100644 --- a/src/Client.php +++ b/src/Client.php @@ -168,13 +168,13 @@ protected function restCall($apiUrl, $verb, $guzzleParams) } $guzzleParams['headers'] = [ 'Accept' => 'application/json', - 'X-Avalara-Client' => "{$this->appName}; {$this->appVersion}; PhpRestClient; 21.3.1; {$this->machineName}" + 'X-Avalara-Client' => "{$this->appName}; {$this->appVersion}; PhpRestClient; 21.6.0; {$this->machineName}" ]; } else { $guzzleParams['headers'] = [ 'Accept' => 'application/json', 'Authorization' => 'Bearer '.$this->auth[0], - 'X-Avalara-Client' => "{$this->appName}; {$this->appVersion}; PhpRestClient; 21.3.1; {$this->machineName}" + 'X-Avalara-Client' => "{$this->appName}; {$this->appVersion}; PhpRestClient; 21.6.0; {$this->machineName}" ]; } // timeout for 1200s (20 min) diff --git a/src/Constants.php b/src/Constants.php index 62547cc..efb7d0d 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -254,6 +254,8 @@ class ErrorCodeId const C_INVALIDCOMPANYLOCATIONSETTING = 85; const C_INVALIDADJUSTMENTTYPE = 99; const C_DELETEINFORMATION = 100; + const C_DISABLEAUTHENTICATIONFORSAMLBASEDACCOUNTS = 101; + const C_DISABLERESETPASSWORDFORSAMLBASEDACCOUNTS = 102; const C_OUTOFRANGE = 118; const C_UNSPECIFIEDTIMEZONE = 119; const C_CANNOTCREATEDELETEDOBJECTS = 120; @@ -468,6 +470,12 @@ class ErrorCodeId const C_TAXCODEANDTAXCODEIDMISSING = 1724; const C_NEXUSALREADYEXISTS = 1725; const C_INVALIDADDRESSTYPEANDMARKETPLACEOUSIDEUSAFLAG = 1726; + const C_INVALIDSETTINGSET = 1727; + const C_INVALIDSETTINGNAME = 1728; + const C_INVALIDSETTINGVALUE = 1729; + const C_TOOMANYUSERDEFINEDFIELDS = 1730; + const C_DUPLICATEUSERDEFINEDFIELDSFOUND = 1731; + const C_INVALIDNAMEFORUSERDEFINEDFIELD = 1732; const C_UNSUPPORTEDFILEFORMAT = 1800; const C_UNSUPPORTEDOUTPUTFILETYPE = 1801; const C_TAXPROFILENOTPROVIDED = 1900; @@ -514,6 +522,9 @@ class ErrorCodeId const C_BATCHCANNOTBECANCELLEDSTATUSERROR = 2504; const C_BATCHCANNOTBECANCELLEDFORMATERROR = 2505; const C_INVALIDPARAMETERDATATYPE = 2600; + const C_TAGDOESNOTEXIST = 2620; + const C_OBJECTDELETED = 2660; + const C_ASSOCIATEDOBJECTSDELETED = 2661; const C_CANNOTDOWNLOADREPORT = 2700; } @@ -840,6 +851,7 @@ class BatchStatus const C_ERRORS = 6; const C_PAUSED = 7; const C_PROCESSING = 8; + const C_CANCELLING = 9; } @@ -886,6 +898,15 @@ class TaxDebugLevel } +/** + * + */ +class DeliveryTerms +{ const C_DAP = 1; + const C_DDP = 2; + +} + /** * */ @@ -961,18 +982,20 @@ class CompanyFilingStatus /** * */ -class LiabilityType -{ const C_SELLER = 0; - const C_BUYERSAGENT = 1; +class Visibility +{ const C_REQUIRED = 0; + const C_RECOMMENDED = 1; + const C_OPTIONAL = 2; + const C_CONDITIONAL = 3; } /** * */ -class DeemedSellerType -{ const C_MARKETPLACE = 1; - const C_MERCHANT = 2; +class ScraperType +{ const C_LOGIN = 1; + const C_CUSTOMERDORDATA = 2; } @@ -986,31 +1009,6 @@ class BoundaryLevel } -/** - * - */ -class DocumentStatus -{ const C_TEMPORARY = 0; - const C_SAVED = 1; - const C_POSTED = 2; - const C_COMMITTED = 3; - const C_CANCELLED = 4; - const C_ADJUSTED = 5; - const C_QUEUED = 6; - const C_PENDINGAPPROVAL = 7; - const C_ANY = -1; - -} - -/** - * - */ -class ScraperType -{ const C_LOGIN = 1; - const C_CUSTOMERDORDATA = 2; - -} - /** * */ @@ -1122,6 +1120,40 @@ class FirmClientLinkageStatus } +/** + * + */ +class LiabilityType +{ const C_SELLER = 0; + const C_BUYERSAGENT = 1; + +} + +/** + * + */ +class DeemedSellerType +{ const C_MARKETPLACE = 1; + const C_MERCHANT = 2; + +} + +/** + * + */ +class DocumentStatus +{ const C_TEMPORARY = 0; + const C_SAVED = 1; + const C_POSTED = 2; + const C_COMMITTED = 3; + const C_CANCELLED = 4; + const C_ADJUSTED = 5; + const C_QUEUED = 6; + const C_PENDINGAPPROVAL = 7; + const C_ANY = -1; + +} + /** * */ diff --git a/src/Methods.php b/src/Methods.php index 070d173..e0cd696 100644 --- a/src/Methods.php +++ b/src/Methods.php @@ -2295,25 +2295,6 @@ public function updateCompanyParameterDetail($companyId, $id, $model) { return $this->restCall($path, 'PUT', $guzzleParams); } - /** - * API to modify the reference fields at the document and the line level. - * - * - * - * - * @param int $companyId - * @param TransactionReferenceFieldModel[] $model - * @return FetchResult - */ - public function tagTransaction($companyId, $model) { - $path = "/api/v2/companies/{$companyId}/transactions/tag"; - $guzzleParams = [ - 'query' => [], - 'body' => json_encode($model) - ]; - return $this->restCall($path, 'PUT', $guzzleParams); - } - /** * Create a new contact * @@ -3290,6 +3271,29 @@ public function listCertificateExposureZones($filter=null, $top=null, $skip=null return $this->restCall($path, 'GET', $guzzleParams); } + /** + * Retrieve the full list of Avalara-supported usage of extra parameters for classification of a item. + * + * Returns the full list of Avalara-supported usage of extra parameters for item classification. + * The list of parameters is available for use with Item Classification. + * Some parameters are only available for use if you have subscribed to certain features of AvaTax. + * + * + * @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 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 FetchResult + */ + public function listClassificationParametersUsage($filter=null, $top=null, $skip=null, $orderBy=null) { + $path = "/api/v2/definitions/classification/parametersusage"; + $guzzleParams = [ + 'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams); + } + /** * Retrieve the full list of communications service types * @@ -4059,7 +4063,16 @@ public function listParameters($filter=null, $top=null, $skip=null, $orderBy=nul /** * Retrieve the parameters by companyCode and itemCode. * - * Returns the list of parameters based on the company country and state jurisdiction and the item code. + * Returns the list of parameters based on the company's service types and the item code. + * Ignores nexus if a service type is configured in the 'IgnoreNexusForServiceTypes' configuration section. + * Ignores nexus for the AvaAlcohol service type. + * + * NOTE: If your company code or item code contains any of these characters /, +, ? or a space, please use the following encoding before making a request: + * * Replace '/' with '\_-ava2f-\_' For example: 'Company/Code' becomes 'Company_-ava2f-_Code' + * * Replace '+' with '\_-ava2b-\_' For example: 'Company+Code' becomes 'Company_-ava2b-_Code' + * * Replace '?' with '\_-ava3f-\_' For example: 'Company?Code' becomes 'Company_-ava3f-_Code' + * * Replace '%' with '\_-ava25-\_' For example: 'Company%Code' becomes 'Company_-ava25-_Code' + * * Replace '#' with '\_-ava23-\_' For example: 'Company#Code' becomes 'Company_-ava23-_Code' * * ### Security Policies * @@ -4208,6 +4221,14 @@ public function listProductClassificationSystems($filter=null, $top=null, $skip= * * Tax authorities use product classification systems as a way to identify products and associate them with a tax rate. * More than one tax authority might use the same product classification system, but they might charge different tax rates for products. + * + * + * NOTE: If your company code contains any of these characters /, +, ? or a space, please use the following encoding before making a request: + * * Replace '/' with '\_-ava2f-\_' For example: 'Company/Code' becomes 'Company_-ava2f-_Code' + * * Replace '+' with '\_-ava2b-\_' For example: 'Company+Code' becomes 'Company_-ava2b-_Code' + * * Replace '?' with '\_-ava3f-\_' For example: 'Company?Code' becomes 'Company_-ava3f-_Code' + * * Replace '%' with '\_-ava25-\_' For example: 'Company%Code' becomes 'Company_-ava25-_Code' + * * Replace '#' with '\_-ava23-\_' For example: 'Company#Code' becomes 'Company_-ava23-_Code' * * * @param string $companyCode The company code. @@ -4319,6 +4340,29 @@ public function listResourceFileTypes($filter=null, $top=null, $skip=null, $orde return $this->restCall($path, 'GET', $guzzleParams); } + /** + * Retrieve the full list of Avalara-supported usage of parameters used for returns. + * + * Returns the full list of Avalara-supported usage of extra parameters for the returns. + * This list of parameters is available for use with Returns. + * Some parameters are only available for use if you have subscribed to certain features of AvaTax. + * + * + * @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 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 FetchResult + */ + public function listReturnsParametersUsage($filter=null, $top=null, $skip=null, $orderBy=null) { + $path = "/api/v2/definitions/returns/parametersusage"; + $guzzleParams = [ + 'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams); + } + /** * Retrieve the full list of Avalara-supported permissions * @@ -4366,6 +4410,27 @@ public function listSubscriptionTypes($filter=null, $top=null, $skip=null, $orde return $this->restCall($path, 'GET', $guzzleParams); } + /** + * Retrieve the list all tags supported by avalara + * + * Retrieves the list of suggested locations for a marketplace. + * + * + * @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 FetchResult + */ + public function listTags($filter=null, $top=null, $skip=null, $orderBy=null) { + $path = "/api/v2/definitions/tags"; + $guzzleParams = [ + 'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams); + } + /** * Retrieve the full list of Avalara-supported tax authorities. * @@ -5259,6 +5324,37 @@ public function batchDeleteItemParameters($companyId, $itemId) { return $this->restCall($path, 'DELETE', $guzzleParams); } + /** + * Bulk upload items from a product catalog + * + * Create/Update one or more item objects attached to this company. + * + * 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. + * + * The tax code takes precedence over the tax code id if both are provided. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * + * + * @param int $companyId The ID of the company that owns this items. + * @param ItemBulkUploadInputModel $model The items you wish to upload. + * @return ItemBulkUploadOutputModel + */ + public function bulkUploadItems($companyId, $model) { + $path = "/api/v2/companies/{$companyId}/items/upload"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams); + } + /** * Add classifications to an item. * @@ -5354,6 +5450,32 @@ public function createItems($companyId, $model) { return $this->restCall($path, 'POST', $guzzleParams); } + /** + * Create tags for a item + * + * Creates one or more new `Tag` objects attached to this Item. + * + * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * + * + * @param int $companyId The ID of the company that defined these items + * @param int $itemId The ID of the item as defined by the company that owns this tag. + * @param ItemTagDetailModel[] $model Tags you wish to associate with the Item + * @return ItemTagDetailModel[] + */ + public function createItemTags($companyId, $itemId, $model) { + $path = "/api/v2/companies/{$companyId}/items/{$itemId}/tags"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams); + } + /** * Delete a single item * @@ -5443,6 +5565,57 @@ public function deleteItemParameter($companyId, $itemId, $id) { return $this->restCall($path, 'DELETE', $guzzleParams); } + /** + * Delete item tag by id + * + * Deletes the `Tag` object of an Item at this URL. + * + * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * + * + * @param int $companyId The ID of the company that defined these items + * @param int $itemId The ID of the item as defined by the company that owns this tag. + * @param int $itemTagDetailId The ID of the item tag detail you wish to delete. + * @return ErrorDetail[] + */ + public function deleteItemTag($companyId, $itemId, $itemTagDetailId) { + $path = "/api/v2/companies/{$companyId}/items/{$itemId}/tags/{$itemTagDetailId}"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'DELETE', $guzzleParams); + } + + /** + * Delete all item tags + * + * Deletes all `Tags` objects of an Item at this URL. + * + * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin. + * + * + * @param int $companyId The ID of the company that defined these items. + * @param int $itemId The ID of the item as defined by the company that owns this tag. + * @return ErrorDetail[] + */ + public function deleteItemTags($companyId, $itemId) { + $path = "/api/v2/companies/{$companyId}/items/{$itemId}/tags"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'DELETE', $guzzleParams); + } + /** * Retrieve a single item * @@ -5531,6 +5704,34 @@ public function getItemParameter($companyId, $itemId, $id) { return $this->restCall($path, 'GET', $guzzleParams); } + /** + * Retrieve tags for an item + * + * Get the `Tag` objects of an Item identified by this URL. + * + * Item tags puts multiple labels for an item. So that item can be easily grouped by these tags. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * + * + * @param int $companyId The ID of the company that defined these items + * @param int $itemId The ID of the item as defined by the company that owns this tag. + * @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:* tagName + * @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. + * @return FetchResult + */ + public function getItemTags($companyId, $itemId, $filter=null, $top=null, $skip=null) { + $path = "/api/v2/companies/{$companyId}/items/{$itemId}/tags"; + $guzzleParams = [ + 'query' => ['$filter' => $filter, '$top' => $top, '$skip' => $skip], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams); + } + /** * Retrieve classifications for an item. * @@ -5586,7 +5787,7 @@ public function listItemClassifications($companyId, $itemId, $filter=null, $top= * * @param int $companyId The company id * @param int $itemId The item id - * @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:* name, unit + * @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:* name, unit, isNeededForCalculation, isNeededForReturns, isNeededForClassification * @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`. @@ -5627,7 +5828,7 @@ public function listItemParameters($companyId, $itemId, $filter=null, $top=null, * * * @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, classifications, 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:* taxCode, classifications, parameters, tags * @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. @@ -5663,7 +5864,7 @@ public function listItemsByCompany($companyId, $filter=null, $include=null, $top * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. * * - * @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, classifications, 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:* taxCode, classifications, parameters, tags * @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. @@ -5679,6 +5880,44 @@ public function queryItems($filter=null, $include=null, $top=null, $skip=null, $ return $this->restCall($path, 'GET', $guzzleParams); } + /** + * Retrieve all items associated with given tag + * + * Get multiple item objects associated with given tag. + * + * 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 using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) . + * + * Paginate your results using the `$top`, `$skip`, and `$orderby` parameters. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. + * + * + * @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, classifications, parameters, tags + * @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`. + * @return FetchResult + */ + public function queryItemsByTag($companyId, $tag, $filter=null, $include=null, $top=null, $skip=null, $orderBy=null) { + $path = "/api/v2/companies/{$companyId}/items/bytags/{$tag}"; + $guzzleParams = [ + 'query' => ['$filter' => $filter, '$include' => $include, '$top' => $top, '$skip' => $skip, '$orderBy' => $orderBy], + 'body' => null + ]; + return $this->restCall($path, 'GET', $guzzleParams); + } + /** * Sync items from a product catalog * @@ -7308,6 +7547,96 @@ public function updateNexusParameter($companyId, $nexusId, $id, $model) { return $this->restCall($path, 'PUT', $guzzleParams); } + /** + * Creates a new tax notice responsibility type. + * + * This API is available by invitation only and only available for users with Compliance admin access. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * + * + * @param CreateNoticeResponsibilityTypeModel $model The responsibility type to create + * @return NoticeResponsibilityModel + */ + public function createNoticeResponsibilityType($model) { + $path = "/api/v2/notices/responsibilities"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams); + } + + /** + * Creates a new tax notice root cause type. + * + * This API is available by invitation only and only available for users with Compliance admin access. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * * This API depends on the following active services:*Returns* (at least one of): Mrs, MRSComplianceManager, AvaTaxCsp.*Firm Managed* (for accounts managed by a firm): ARA, ARAManaged. + * + * + * @param CreateNoticeRootCauseTypeModel $model The root cause type to create + * @return NoticeRootCauseModel + */ + public function createNoticeRootCauseType($model) { + $path = "/api/v2/notices/rootcauses"; + $guzzleParams = [ + 'query' => [], + 'body' => json_encode($model) + ]; + return $this->restCall($path, 'POST', $guzzleParams); + } + + /** + * Delete a tax notice responsibility type. + * + * This API is available by invitation only and only available for users with Compliance admin access. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * + * + * @param int $responsibilityId The unique ID of the responsibility type + * @return ErrorDetail[] + */ + public function deleteNoticeResponsibilityType($responsibilityId) { + $path = "/api/v2/notices/responsibilities/{$responsibilityId}"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'DELETE', $guzzleParams); + } + + /** + * Delete a tax notice root cause type. + * + * This API is available by invitation only and only available for users with Compliance admin access. + * + * ### Security Policies + * + * * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, SSTAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser. + * + * + * @param int $rootCauseId The unique ID of the root cause type + * @return ErrorDetail[] + */ + public function deleteNoticeRootCauseType($rootCauseId) { + $path = "/api/v2/notices/rootcauses/{$rootCauseId}"; + $guzzleParams = [ + 'query' => [], + 'body' => null + ]; + return $this->restCall($path, 'DELETE', $guzzleParams); + } + /** * Mark a single notification as dismissed. * @@ -7778,7 +8107,7 @@ public function updateSubscription($accountId, $id, $model) { * * Check the status of a report by calling `GetReport` and passing in the report's `id` value. * * When a report's status is `Completed`, call `DownloadReport` to retrieve the file. * - * This API works for all report types. + * * We throttle this API. You can only call this API up to 5 times in a minute. * * ### Security Policies * @@ -7915,6 +8244,11 @@ public function listReports($companyId, $pageKey, $skip=null, $top=null) { * A setting can refer to any type of data you need to remember about this company object. * When creating this object, you may define your own `set`, `name`, and `value` parameters. * To define your own values, please choose a `set` name that begins with `X-` to indicate an extension. + * + * Use Set = Transactions, Name = TaxCodePrioritization/HSCodePrioritization and Value = Transaction/ItemMaster for prioritizing which TaxCodes/HsCodes should be used for calculating taxes. + * + * Example: To prioritize TaxCodes passed in a Transaction over values stored with Items when calculating tax, use + * Set = Transactions, Name = TaxCodePrioritization, Value = Transaction * * ### Security Policies * @@ -8021,7 +8355,7 @@ public function getSetting($companyId, $id) { * * * @param int $companyId The ID of the company that owns these settings - * @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 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:* modifiedDate, ModifiedUserId * @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. @@ -8059,7 +8393,7 @@ public function listSettingsByCompany($companyId, $filter=null, $include=null, $ * * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. * * - * @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 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:* modifiedDate, ModifiedUserId * @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. @@ -9490,7 +9824,7 @@ public function getTransactionById($id, $include=null) { * @param string $companyCode The company code of the company that recorded this transaction * @param int $dataSourceId Optionally filter transactions to those from a specific data source. * @param string $include Specifies objects to include in this fetch call - * @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:* exchangeRateCurrencyCode, totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, messages, invoiceMessages, isFakeTransaction + * @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:* exchangeRateCurrencyCode, totalDiscount, lines, addresses, locationTypes, summary, taxDetailsByTaxType, parameters, userDefinedFields, messages, invoiceMessages, isFakeTransaction, deliveryTerms * @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`. @@ -10217,7 +10551,7 @@ public function getUserEntitlements($id, $accountId) { * * @param int $accountId The accountID of the user you wish to list. * @param string $include Optional fetch commands. - * @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 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:* SuppressNewUserEmail * @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`. @@ -10256,7 +10590,7 @@ public function listUsersByAccount($accountId, $include=null, $filter=null, $top * * * @param string $include Optional fetch commands. - * @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 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:* SuppressNewUserEmail * @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`. diff --git a/src/Models.php b/src/Models.php index 4862525..8090456 100644 --- a/src/Models.php +++ b/src/Models.php @@ -121,6 +121,10 @@ class UserModel * @var string Matches the subjectId of corresponding user record in AI. */ public $subjectId; + /** + * @var boolean Suppress new user email + */ + public $suppressNewUserEmail; } /** * An AvaTax account. @@ -179,6 +183,10 @@ class AccountModel * @var UserModel[] Optional: A list of all the users belonging to this account. To fetch this list, add the query string "?$include=Users" to your URL. */ public $users; + /** + * @var boolean Is Saml based authentication used by this account for user to login via AI. + */ + public $isSamlEnabled; } /** * @@ -1191,6 +1199,44 @@ class ItemParameterModel * @var int The item id */ public $itemId; + /** + * @var boolean This field identifies if parameter is needed for calculation + */ + public $isNeededForCalculation; + /** + * @var boolean This field identifies if parameter is needed for returns + */ + public $isNeededForReturns; + /** + * @var boolean This field identifies if parameter is needed for classification + */ + public $isNeededForClassification; +} +/** + * Represents a tag for an item in your company's product catalog. + */ +class ItemTagDetailModel +{ + /** + * @var int The unique ID number of the item-tag relation. + */ + public $itemTagDetailId; + /** + * @var int The unique tag Id for the tags. + */ + public $tagId; + /** + * @var string The tag name. + */ + public $tagName; + /** + * @var int The unique ID number of this item. + */ + public $itemId; + /** + * @var int The unique ID number of the company that owns this item. + */ + public $companyId; } /** * Represents an item in your company's product catalog. @@ -1225,6 +1271,10 @@ class ItemModel * @var string A way to group similar items. */ public $itemGroup; + /** + * @var string A category of product + */ + public $category; /** * @var string The date when this record was created. */ @@ -1249,6 +1299,10 @@ class ItemModel * @var ItemParameterModel[] List of item parameters. */ public $parameters; + /** + * @var ItemTagDetailModel[] List of item tags. + */ + public $tags; } /** * Represents the answer to one local jurisdiction question for a location. @@ -1618,6 +1672,14 @@ class SettingModel * @var string The value of this name-value pair. */ public $value; + /** + * @var string The value when the entry was last modified. + */ + public $modifiedDate; + /** + * @var int The value identifying who last modified the entry. + */ + public $modifiedUserId; } /** * Represents a tax code that can be applied to items on a transaction. @@ -2808,6 +2870,20 @@ class TransactionLineParameterModel */ public $unit; } +/** + * User Defined fields/Flex Fields at Transaction Line level. + */ +class TransactionLineUserDefinedFieldModel +{ + /** + * @var string The name of the user defined field. + */ + public $name; + /** + * @var string The value of the user defined field. + */ + public $value; +} /** * Represents one line item in a transaction */ @@ -2885,14 +2961,22 @@ class LineItemModel * @var TransactionLineParameterModel[] Special parameters that apply to this line within this transaction. To get a full list of available parameters, please use the `ListParameters` API. */ public $parameters; + /** + * @var TransactionLineUserDefinedFieldModel[] Custom user fields/flex fields for this line. + */ + public $userDefinedFields; /** * @var string The Item code for Custom Duty / Global Import tax determination Harmonized Tariff System code for this transaction. For a list of harmonized tariff codes, see the Definitions API for harmonized tariff codes. */ public $hsCode; /** - * @var int ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. + * @var int DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead. ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. */ public $merchantSellerId; + /** + * @var string ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. + */ + public $merchantSellerIdentifier; /** * @var string This field will identify who is remitting Marketplace or Seller. This field must be populated by Marketplace. (See MarketplaceLiabilityType::* for a list of allowable values) */ @@ -2905,6 +2989,14 @@ class LineItemModel * @var string Synonym of Marketplace Origination. Name of the Marketplace where the transaction originated from. */ public $originationSite; + /** + * @var string Product category breadcrumbs. This is the full path to the category where item is included. Categories should be separated by “ > “. Multiple category paths per item are accepted. In this case, category paths should be separated by “;”. + */ + public $category; + /** + * @var string A long description of the product. + */ + public $summary; } /** * Represents a transaction parameter. @@ -2924,6 +3016,20 @@ class TransactionParameterModel */ public $unit; } +/** + * User Defined fields/Flex Fields at Transaction level. + */ +class TransactionUserDefinedFieldModel +{ + /** + * @var string The name of the user defined field. + */ + public $name; + /** + * @var string The value of the user defined field. + */ + public $value; +} /** * Create a transaction */ @@ -2985,6 +3091,10 @@ class CreateTransactionModel * @var TransactionParameterModel[] Special parameters for this transaction. To get a full list of available parameters, please use the [ListParameters](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListParameters/) endpoint. */ public $parameters; + /** + * @var TransactionUserDefinedFieldModel[] Custom user fields/flex fields for this transaction. + */ + public $userDefinedFields; /** * @var string Customer-provided Reference Code with information about this transaction. This field could be used to reference the original document for a return invoice, or for any other reference purpose. */ @@ -3057,6 +3167,10 @@ class CreateTransactionModel * @var int The Id of the datasource from which this transaction originated. This value will be overridden by the system to take the datasource Id from the call header. */ public $dataSourceId; + /** + * @var string The Delivery Terms is a field used in conjunction with Importer of Record to influence whether AvaTax includes Import Duty and Tax values in the transaction totals or not. Delivered at Place (DAP) and Delivered Duty Paid (DDP) are two delivery terms that indicate that Import Duty and Tax should be included in the transaction total. This field is also used for reports. This field is used for future feature support. This field is not currently in use. (See DeliveryTerms::* for a list of allowable values) + */ + public $deliveryTerms; } /** * Replace an existing transaction recorded in AvaTax with a new one. @@ -4478,1943 +4592,2193 @@ class ComplianceJurisdictionRateModel public $taxAuthorityId; } /** - * SER code fixup + * Represents a customer to whom you sell products and/or services. */ -class LineDetailSERCodeModel +class LinkCertificatesModel { /** - * @var int Transaction line detail Id - */ - public $transactionLineDetailId; - /** - * @var string Updated SER code + * @var int[] An array of certificate ID numbers to link */ - public $serCode; + public $certificates; } /** - * Represents a fixup change + * Indicates the customer's exemption status in a specific country and region. */ -class TransactionReferenceFieldModel +class ExemptionStatusModel { /** - * @var int The id of the transaction - */ - public $documentId; - /** - * @var string Sets the sale location code (Outlet ID) for reporting this document to the tax authority. This value is used by Avalara Managed Returns to group documents together by reporting locations for tax authorities that require location-based reporting. + * @var string The exemption status of this customer in this country/region. */ - public $reportingLocationCode; + public $status; /** - * @var LineDetailSERCodeModel[] Reference field of the line details + * @var CertificateModel Certificate if the customer is exempted */ - public $lineDetailSerCodes; + public $certificate; } /** - * An individual tax detail element. Represents the amount of tax calculated for a particular jurisdiction, for a particular line in an invoice. + * Data source object */ -class TransactionLineDetailModel +class DataSourceModel { /** - * @var int The unique ID number of this tax detail. + * @var int The id of the datasource. */ public $id; /** - * @var int The unique ID number of the line within this transaction. - */ - public $transactionLineId; - /** - * @var int The unique ID number of this transaction. + * @var int The id of the company to which the datasource belongs to. */ - public $transactionId; + public $companyId; /** - * @var int The unique ID number of the address used for this tax detail. + * @var string The extractor/connector id. */ - public $addressId; + public $source; /** - * @var string The two character ISO 3166 country code of the country where this tax detail is assigned. + * @var string The unique ID number of this connection. */ - public $country; + public $instance; /** - * @var string The two-or-three character ISO region code for the region where this tax detail is assigned. + * @var boolean The connection using the connection_id is enabled. The customer is responsible to enable or disable. */ - public $region; + public $isEnabled; /** - * @var string For U.S. transactions, the Federal Information Processing Standard (FIPS) code for the county where this tax detail is assigned. + * @var boolean If all the information has been transferred from the extractor to the database. */ - public $countyFIPS; + public $isSynced; /** - * @var string For U.S. transactions, the Federal Information Processing Standard (FIPS) code for the state where this tax detail is assigned. + * @var boolean True if this data source is authorized. */ - public $stateFIPS; + public $isAuthorized; /** - * @var float The amount of this line that was considered exempt in this tax detail. + * @var string The date when the information was last synched. */ - public $exemptAmount; + public $lastSyncedDate; /** - * @var int The unique ID number of the exemption reason for this tax detail. + * @var int The User ID of the user who created this record. */ - public $exemptReasonId; + public $createdUserId; /** - * @var boolean True if this detail element represented an in-state transaction. + * @var string The date when this record was created. */ - public $inState; + public $createdDate; /** - * @var string The code of the jurisdiction to which this tax detail applies. + * @var int The user ID of the user who last modified this record. */ - public $jurisCode; + public $modifiedUserId; /** - * @var string The name of the jurisdiction to which this tax detail applies. + * @var string The date/time when this record was last modified. */ - public $jurisName; + public $modifiedDate; /** - * @var int The unique ID number of the jurisdiction to which this tax detail applies. + * @var string The date when this record was deleted. */ - public $jurisdictionId; + public $deletedDate; /** - * @var string The Avalara-specified signature code of the jurisdiction to which this tax detail applies. + * @var boolean Specifies whether transactions created by this data source needs to re-calculate tax or not */ - public $signatureCode; + public $recalculate; /** - * @var string The state assigned number of the jurisdiction to which this tax detail applies. + * @var string Specifies the name of the extractor */ - public $stateAssignedNo; + public $name; /** - * @var string DEPRECATED - Date: 12/20/2017, Version: 18.1, Message: Use jurisdictionTypeId instead. The type of the jurisdiction to which this tax detail applies. (See JurisTypeId::* for a list of allowable values) + * @var string Specifies any implementation-specific information along with the DataSource.This field has no internal meaning in AvaTax and is purely for the convenience of the DataSource API user */ - public $jurisType; + public $externalState; +} +/** + * Identifies all nexus that match a particular tax form + */ +class NexusByTaxFormModel +{ /** - * @var string The type of the jurisdiction in which this tax detail applies. (See JurisdictionType::* for a list of allowable values) + * @var string The code of the tax form that was requested */ - public $jurisdictionType; + public $formCode; /** - * @var float The amount of this line item that was considered nontaxable in this tax detail. + * @var int The company ID of the company that was used to load the companyNexus array. If this value is null, no company data was loaded. */ - public $nonTaxableAmount; + public $companyId; /** - * @var int The rule according to which portion of this detail was considered nontaxable. + * @var NexusModel[] A list of all Avalara-defined nexus that are relevant to this tax form */ - public $nonTaxableRuleId; + public $nexusDefinitions; /** - * @var string The type of nontaxability that was applied to this tax detail. (See TaxRuleTypeId::* for a list of allowable values) + * @var NexusModel[] A list of all currently-defined company nexus that are related to this tax form */ - public $nonTaxableType; + public $companyNexus; +} +/** + * Information about Avalara-defined tax code types. + * This list is used when creating tax codes and tax rules. + */ +class TaxCodeTypesModel +{ /** - * @var float The rate at which this tax detail was calculated. + * @var object The list of Avalara-defined tax code types. */ - public $rate; + public $types; +} +/** + * Represents a service or a subscription type. + */ +class SubscriptionTypeModel +{ /** - * @var int The unique ID number of the rule according to which this tax detail was calculated. + * @var int The unique ID number of this subscription type. */ - public $rateRuleId; + public $id; /** - * @var int The unique ID number of the source of the rate according to which this tax detail was calculated. + * @var string The friendly name of the service this subscription type represents. */ - public $rateSourceId; + public $description; +} +/** + * Represents a single security role. + */ +class SecurityRoleModel +{ /** - * @var string For Streamlined Sales Tax customers, the SST Electronic Return code under which this tax detail should be applied. + * @var int The unique ID number of this security role. */ - public $serCode; + public $id; /** - * @var string Indicates whether this tax detail applies to the origin or destination of the transaction. (See Sourcing::* for a list of allowable values) + * @var string A description of this security role */ - public $sourcing; + public $description; +} +/** + * Tax Authority Model + */ +class TaxAuthorityModel +{ /** - * @var float The amount of tax for this tax detail. + * @var int The unique ID number of this tax authority. */ - public $tax; + public $id; /** - * @var float The taxable amount of this tax detail. + * @var string The friendly name of this tax authority. */ - public $taxableAmount; + public $name; /** - * @var string The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. + * @var int The type of this tax authority. */ - public $taxType; + public $taxAuthorityTypeId; /** - * @var string The id of the tax subtype. + * @var int The unique ID number of the jurisdiction for this tax authority. */ - public $taxSubTypeId; + public $jurisdictionId; +} +/** + * Represents a form that can be filed with a tax authority. + */ +class TaxAuthorityFormModel +{ /** - * @var string The id of the tax type group. + * @var int The unique ID number of the tax authority. */ - public $taxTypeGroupId; + public $taxAuthorityId; /** - * @var string The name of the tax against which this tax amount was calculated. + * @var string The form name of the form for this tax authority. */ - public $taxName; - /** - * @var int The type of the tax authority to which this tax will be remitted. - */ - public $taxAuthorityTypeId; - /** - * @var int The unique ID number of the tax region. - */ - public $taxRegionId; - /** - * @var float The amount of tax that AvaTax calculated. If an override for tax amount is used, there may be a difference between the tax field which applies your override, and the this amount that is calculated without override. - */ - public $taxCalculated; + public $formName; +} +/** + * usage of system defined parameters. + */ +class ParameterUsageModel +{ /** - * @var float The amount of tax override that was specified for this tax line. + * @var int The unique ID number of this property. */ - public $taxOverride; + public $id; /** - * @var string DEPRECATED - Date: 12/20/2017, Version: 18.1, Message: Please use rateTypeCode instead. The rate type for this tax detail. (See RateType::* for a list of allowable values) + * @var int The id of the parameter. */ - public $rateType; + public $parameterId; /** - * @var string Indicates the code of the rate type that was used to calculate this tax detail. Use [ListRateTypesByCountry](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListRateTypesByCountry/) API for a full list of rate type codes. + * @var string Product code for the parameter usage item. */ - public $rateTypeCode; + public $productCode; /** - * @var float Number of units in this line item that were calculated to be taxable according to this rate detail. + * @var string The country for the parameter usage item. */ - public $taxableUnits; + public $country; /** - * @var float Number of units in this line item that were calculated to be nontaxable according to this rate detail. + * @var string The state for the parameter usage item. */ - public $nonTaxableUnits; + public $region; /** - * @var float Number of units in this line item that were calculated to be exempt according to this rate detail. + * @var int System Id for the parameter usage item */ - public $exemptUnits; + public $systemId; /** - * @var string When calculating units, what basis of measurement did we use for calculating the units? + * @var string tax type for the parameter usage item. */ - public $unitOfBasis; + public $taxTypeId; /** - * @var boolean True if this value is a non-passthrough tax. A non-passthrough tax is a tax that may not be charged to a customer; it must be paid directly by the company. + * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ - public $isNonPassThru; + public $attributeType; /** - * @var boolean The Taxes/Fee component. True if the fee is applied. + * @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. */ - public $isFee; + public $name; /** - * @var float Number of units in this line item that were calculated to be taxable according to this rate detail in the reporting currency. + * @var string The data type of the property. */ - public $reportingTaxableUnits; + public $dataType; /** - * @var float Number of units in this line item that were calculated to be nontaxable according to this rate detail in the reporting currency. + * @var string Help text to be shown to the user when they are filling out this parameter. Help text may include HTML links to additional content with more information about a parameter. */ - public $reportingNonTaxableUnits; + public $helpText; /** - * @var float Number of units in this line item that were calculated to be exempt according to this rate detail in the reporting currency. + * @var string Label that helps the user to identify a parameter */ - public $reportingExemptUnits; + public $label; /** - * @var float The amount of tax for this tax detail in the reporting currency. + * @var string A help url that provides more information about the parameter */ - public $reportingTax; + public $helpUrl; /** - * @var float The amount of tax that AvaTax calculated in the reporting currency. If an override for tax amount is used, there may be a difference between the tax field which applies your override, and the this amount that is calculated without override. + * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. */ - public $reportingTaxCalculated; + public $values; /** - * @var string LiabilityType identifies the party liable to file the tax. This field is used to filter taxes from reports and tax filings as appropriate. (See LiabilityType::* for a list of allowable values) + * @var string The unit of measurement type of the parameter */ - public $liabilityType; + public $measurementType; } /** - * Represents information about location types stored in a line + * usage of system defined parameters. */ -class TransactionLineLocationTypeModel +class ClassificationParameterUsageMapModel { /** - * @var int The unique ID number of this line location address model + * @var int The unique ID number of this property. */ - public $documentLineLocationTypeId; + public $id; /** - * @var int The unique ID number of the document line associated with this line location address model + * @var int The id of the parameter. */ - public $documentLineId; + public $parameterId; /** - * @var int The address ID corresponding to this model + * @var string tax type group id for the classification parameter usage item. */ - public $documentAddressId; + public $taxTypeGroupId; /** - * @var string The location type code corresponding to this model + * @var string This defines if the parameter is recommeded ,optional or mandatory (See Visibility::* for a list of allowable values) */ - public $locationTypeCode; -} -/** - * One line item on this transaction. - */ -class TransactionLineModel -{ + public $visibility; /** - * @var int The unique ID number of this transaction line item. + * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ - public $id; + public $attributeType; /** - * @var int The unique ID number of the transaction to which this line item belongs. + * @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. */ - public $transactionId; + public $name; /** - * @var string The line number or code indicating the line on this invoice or receipt or document. + * @var string The data type of the property. */ - public $lineNumber; + public $dataType; /** - * @var int The unique ID number of the boundary override applied to this line item. + * @var string Help text to be shown to the user when they are filling out this parameter. Help text may include HTML links to additional content with more information about a parameter. */ - public $boundaryOverrideId; + public $helpText; /** - * @var string DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use entityUseCode instead. The customer usage type for this line item. Usage type often affects taxability rules. + * @var string Label that helps the user to identify a parameter */ - public $customerUsageType; + public $label; /** - * @var string The entity use code for this line item. Usage type often affects taxability rules. + * @var string A help url that provides more information about the parameter */ - public $entityUseCode; + public $helpUrl; /** - * @var string A description of the item or service represented by this line. + * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. */ - public $description; + public $values; /** - * @var int The unique ID number of the destination address where this line was delivered or sold. In the case of a point-of-sale transaction, the destination address and origin address will be the same. In the case of a shipped transaction, they will be different. + * @var string The unit of measurement type of the parameter */ - public $destinationAddressId; + public $measurementType; +} +/** + * usage of system defined parameters for returns. + */ +class ReturnsParameterUsageModel +{ /** - * @var int The unique ID number of the origin address where this line was delivered or sold. In the case of a point-of-sale transaction, the origin address and destination address will be the same. In the case of a shipped transaction, they will be different. + * @var int The unique ID number of this property. */ - public $originAddressId; + public $id; /** - * @var float The amount of discount that was applied to this line item. This represents the difference between list price and sale price of the item. In general, a discount represents money that did not change hands; tax is calculated on only the amount of money that changed hands. + * @var int The id of the parameter. */ - public $discountAmount; + public $parameterId; /** - * @var int The type of discount, if any, that was applied to this line item. + * @var string Product code for the return parameter usage item. */ - public $discountTypeId; + public $productCode; /** - * @var float The amount of this line item that was exempt. + * @var string tax type for the returns parameter usage item. */ - public $exemptAmount; + public $taxTypeId; /** - * @var int The unique ID number of the exemption certificate that applied to this line item. It is the calc_id associated with a certificate in CertCapture. + * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ - public $exemptCertId; + public $attributeType; /** - * @var string The CertCapture Certificate ID + * @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. */ - public $certificateId; + public $name; /** - * @var string The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing. If no applicable ECMS entry is available, the AvaTax service will determine if an Exemption Number field is populated or an Entity/Use Code is included in the sales tax calculation request, and will perform exemption processing using either of those two options. + * @var string The data type of the property. */ - public $exemptNo; + public $dataType; /** - * @var boolean True if this item is taxable. + * @var string Help text to be shown to the user when they are filling out this parameter. Help text may include HTML links to additional content with more information about a parameter. */ - public $isItemTaxable; + public $helpText; /** - * @var boolean True if this item is a Streamlined Sales Tax line item. + * @var string Label that helps the user to identify a parameter */ - public $isSSTP; + public $label; /** - * @var string The code string of the item represented by this line item. + * @var string A help url that provides more information about the parameter */ - public $itemCode; + public $helpUrl; /** - * @var float The total amount of the transaction, including both taxable and exempt. This is the total price for all items. To determine the individual item price, divide this by quantity. + * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. */ - public $lineAmount; + public $values; /** - * @var float The quantity of products sold on this line item. + * @var string The unit of measurement type of the parameter */ - public $quantity; + public $measurementType; +} +/** + * An extra property that can change the behavior of tax transactions. + */ +class ParameterModel +{ /** - * @var string A user-defined reference identifier for this transaction line item. + * @var int The unique ID number of this property. */ - public $ref1; + public $id; /** - * @var string A user-defined reference identifier for this transaction line item. + * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null. The category grouping of this parameter. When your user interface displays a large number of parameters, they should be grouped by their category value. */ - public $ref2; + public $category; /** - * @var string The date when this transaction should be reported. By default, all transactions are reported on the date when the actual transaction took place. In some cases, line items may be reported later due to delayed shipments or other business reasons. + * @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. */ - public $reportingDate; + public $name; /** - * @var string The revenue account number for this line item. + * @var string The data type of the property. */ - public $revAccount; + public $dataType; /** - * @var string Indicates whether this line item was taxed according to the origin or destination. (See Sourcing::* for a list of allowable values) + * @var string Help text to be shown to the user when they are filling out this parameter. Help text may include HTML links to additional content with more information about a parameter. */ - public $sourcing; + public $helpText; /** - * @var float The tax for this line in this transaction. If you used a `taxOverride` of type `taxAmount` for this line, this value will represent the amount of your override. AvaTax will still attempt to calculate the correct tax for this line and will store that calculated value in the `taxCalculated` field. You can compare the `tax` and `taxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. + * @var string[] A list of service types to which this parameter applies. */ - public $tax; + public $serviceTypes; /** - * @var float The taxable amount of this line item. + * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null. The prompt you should use when displaying this parameter to a user. For example, if your user interface displays a parameter in a text box, this is the label you should use to identify that text box. */ - public $taxableAmount; + public $prompt; /** - * @var float The amount of tax that AvaTax calculated for the transaction. If you used a `taxOverride` of type `taxAmount`, there may be a difference between the `tax` field which applies your override, and the `taxCalculated` field which represents the amount of tax that AvaTax calculated without the override. You can compare the `tax` and `taxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. + * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null. If your user interface permits client-side validation of parameters, this string is a regular expression you can use to validate the user's data entry prior to submitting a tax request. */ - public $taxCalculated; + public $regularExpression; /** - * @var string The code string for the tax code that was used to calculate this line item. + * @var string Label that helps the user to identify a parameter */ - public $taxCode; + public $label; /** - * @var int The unique ID number for the tax code that was used to calculate this line item. + * @var string A help url that provides more information about the parameter */ - public $taxCodeId; + public $helpUrl; /** - * @var string The date that was used for calculating tax amounts for this line item. By default, this date should be the same as the document date. In some cases, for example when a consumer returns a product purchased previously, line items may be calculated using a tax date in the past so that the consumer can receive a refund for the correct tax amount that was charged when the item was originally purchased. + * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated */ - public $taxDate; + public $attributeType; /** - * @var string The tax engine identifier that was used to calculate this line item. + * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. */ - public $taxEngine; + public $values; /** - * @var string If a tax override was specified, this indicates the type of tax override. (See TaxOverrideType::* for a list of allowable values) + * @var string The unit of measurement type of the parameter */ - public $taxOverrideType; + public $measurementType; /** - * @var string VAT business identification number used for this transaction. + * @var boolean This field identifies if parameter is needed for calculation */ - public $businessIdentificationNo; + public $isNeededForCalculation; /** - * @var float If a tax override was specified, this indicates the amount of tax that was requested. + * @var boolean This field identifies if parameter is needed for returns */ - public $taxOverrideAmount; + public $isNeededForReturns; /** - * @var string If a tax override was specified, represents the reason for the tax override. + * @var boolean This field identifies if parameter is needed for classification */ - public $taxOverrideReason; + public $isNeededForClassification; +} +/** + * Information about questions that the local jurisdictions require for each location + */ +class LocationQuestionModel +{ /** - * @var boolean Indicates whether the `amount` for this line already includes tax. If this value is `true`, the final price of this line including tax will equal the value in `amount`. If this value is `null` or `false`, the final price will equal `amount` plus whatever taxes apply to this line. + * @var int The unique ID number of this location setting type */ - public $taxIncluded; + public $id; /** - * @var int ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. + * @var string This is the prompt for this question */ - public $merchantSellerId; + public $question; /** - * @var string This field will identify who is remitting Marketplace or Seller. This field must be populated by Marketplace. (See MarketplaceLiabilityType::* for a list of allowable values) + * @var string If additional information is available about the location setting, this contains descriptive text to help you identify the correct value to provide in this setting. */ - public $marketplaceLiabilityType; + public $description; /** - * @var string The transaction's original ID in its origination system + * @var string If available, this regular expression will verify that the input from the user is in the expected format. */ - public $originationDocumentId; + public $regularExpression; /** - * @var string Synonym of Marketplace Origination. Name of the Marketplace where the transaction originated from. + * @var string If available, this is an example value that you can demonstrate to the user to show what is expected. */ - public $originationSite; + public $exampleValue; /** - * @var TransactionLineDetailModel[] Optional: A list of tax details for this line item. Tax details represent taxes being charged by various tax authorities. Taxes that appear in the `details` collection are intended to be displayed to the customer and charged as a 'tax' on the invoice. To fetch this list, add the query string `?$include=Details` to your URL. + * @var string Indicates which jurisdiction requires this question */ - public $details; + public $jurisdictionName; /** - * @var TransactionLineDetailModel[] Optional: A list of non-passthrough tax details for this line item. Tax details represent taxes being charged by various tax authorities. Taxes that appear in the `nonPassthroughDetails` collection are taxes that must be paid directly by the company and not shown to the customer. + * @var string Indicates which type of jurisdiction requires this question (See JurisdictionType::* for a list of allowable values) */ - public $nonPassthroughDetails; + public $jurisdictionType; /** - * @var TransactionLineLocationTypeModel[] Optional: A list of location types for this line item. To fetch this list, add the query string "?$include=LineLocationTypes" to your URL. + * @var string Indicates the country that this jurisdiction belongs to */ - public $lineLocationTypes; + public $jurisdictionCountry; /** - * @var TransactionLineParameterModel[] Contains a list of extra parameters that were set when the transaction was created. + * @var string Indicates the state, region, or province that this jurisdiction belongs to */ - public $parameters; + public $jurisdictionRegion; /** - * @var string The cross-border harmonized system code (HSCode) used to calculate tariffs and duties for this line item. For a full list of HS codes, see `ListCrossBorderCodes()`. + * @var string Help and guidance for this specific question */ - public $hsCode; + public $helpText; /** - * @var float Indicates the cost of insurance and freight for this line. + * @var int Maximum length of the answer string */ - public $costInsuranceFreight; + public $maxLength; /** - * @var string Indicates the VAT code for this line item. + * @var boolean True if this question must be answered for this filing calendar */ - public $vatCode; + public $required; /** - * @var int Indicates the VAT number type for this line item. + * @var string Data type of the answer */ - public $vatNumberTypeId; + public $dataType; /** - * @var TransactionLineTaxAmountByTaxTypeModel[] Contains a list of TaxType that are to be overridden with their respective TaxOverrideAmount. + * @var string */ - public $taxAmountByTaxTypes; + public $staticOptions; /** - * @var string Deemed Supplier field indicates which party on the marketplace transaction is liable for collecting and reporting the VAT. This is based on the 2021 E-commerce legislative reforms in EU and UK. This field will not be used until after July 1, 2021. (See DeemedSellerType::* for a list of allowable values) + * @var boolean */ - public $deemedSupplier; + public $unique; } /** - * An address used within this transaction. + * Represents a language-specific localized name of a particular geographic entity such + * as a country or a region. */ -class TransactionAddressModel +class IsoLocalizedName { /** - * @var int The unique ID number of this address. + * @var string The two-character alphanumeric code identifying the language in which this name is used. Note that languageAlpha2Code and language3AlphaCode refer to the same language. */ - public $id; + public $languageAlpha2Code; /** - * @var int The unique ID number of the document to which this address belongs. + * @var string The three-character alphanumeric code identifying the language in which this name is used. Note that languageAlpha2Code and language3AlphaCode refer to the same language. */ - public $transactionId; + public $languageAlpha3Code; /** - * @var string The boundary level at which this address was validated. (See BoundaryLevel::* for a list of allowable values) + * @var string The name of this geographic entity as known in this language. */ - public $boundaryLevel; + public $name; +} +/** + * Represents an ISO 3166 recognized country + */ +class IsoCountryModel +{ /** - * @var string The first line of the address. + * @var string The two character ISO 3166 country code */ - public $line1; + public $code; /** - * @var string The second line of the address. + * @var string The three character ISO 3166 country code */ - public $line2; + public $alpha3Code; /** - * @var string The third line of the address. + * @var string The full name of this country in uppercase. For names in proper or formal case, or for names in other languages, please examine the `localizedNames` element for an appropriate name. */ - public $line3; + public $name; /** - * @var string The city for the address. + * @var boolean True if this country is a member of the European Union */ - public $city; + public $isEuropeanUnion; /** - * @var string The ISO 3166 region code. E.g., the second part of ISO 3166-2. + * @var IsoLocalizedName[] A list of localized names in a variety of languages. This list is maintained by the International Standards Organization. */ - public $region; + public $localizedNames; /** - * @var string The postal code or zip code for the address. + * @var boolean Whether or not this country requires a region in postal addresses. */ - public $postalCode; + public $addressesRequireRegion; +} +/** + * Represents a region, province, or state within a country + */ +class IsoRegionModel +{ /** - * @var string The ISO 3166 country code + * @var string The two-character ISO 3166 country code this region belongs to */ - public $country; + public $countryCode; /** - * @var int The unique ID number of the tax region for this address. + * @var string The three character ISO 3166 region code */ - public $taxRegionId; + public $code; /** - * @var string Latitude for this address + * @var string The full name, using localized characters, for this region, in uppercase. For names in proper or formal case, or for names in other languages, please examine the `localizedNames` element for an appropriate name. */ - public $latitude; + public $name; /** - * @var string Longitude for this address + * @var string The word in the local language that classifies what type of a region this represents */ - public $longitude; + public $classification; + /** + * @var boolean For the United States, this flag indicates whether a U.S. State participates in the Streamlined Sales Tax program. For countries other than the US, this flag is null. + */ + public $streamlinedSalesTax; + /** + * @var IsoLocalizedName[] A list of localized names in a variety of languages. This list is maintained by the International Standards Organization. + */ + public $localizedNames; + /** + * @var boolean Whether the region collects tax or not. This field will be populated for US country only and will be null for all the other countries. + */ + public $isRegionTaxable; } /** - * Information about a location type + * Represents a code describing the intended use for a product that may affect its taxability */ -class TransactionLocationTypeModel +class EntityUseCodeModel { /** - * @var int Location type ID for this location type in transaction + * @var string The Avalara-recognized entity use code for this definition */ - public $documentLocationTypeId; + public $code; /** - * @var int Transaction ID + * @var string The name of this entity use code */ - public $documentId; + public $name; /** - * @var int Address ID for the transaction + * @var string Text describing the meaning of this use code */ - public $documentAddressId; + public $description; /** - * @var string Location type code + * @var string[] A list of countries where this use code is valid */ - public $locationTypeCode; + public $validCountries; } /** - * Summary information about an overall transaction. + * A preferred program is a customs and/or duty program that can be used to handle cross-border transactions. + * Customers who sign up for a preferred program may obtain better terms for their customs and duty payments. + * + * To indicate that your company has signed up for a preferred program, specify the `code` value from this + * object as the value for the `AvaTax.LC.PreferredProgram` parameter in your transaction. */ -class TransactionSummary +class PreferredProgramModel { /** - * @var string Two character ISO-3166 country code. + * @var int The unique ID number representing this preferred program. */ - public $country; + public $id; /** - * @var string Two or three character ISO region, state or province code, if applicable. + * @var string A code that identifies this preferred program. To select this program, specify this code value in the `AvaTax.LC.PreferredProgram` parameter. */ - public $region; + public $code; /** - * @var string The type of jurisdiction that collects this tax. (See JurisdictionType::* for a list of allowable values) + * @var string The ISO 3166 country code for the origin permitted by this program */ - public $jurisType; + public $originCountry; /** - * @var string Jurisdiction Code for the taxing jurisdiction + * @var string The ISO 3166 country code for the destination permitted by this program */ - public $jurisCode; + public $destinationCountry; /** - * @var string The name of the jurisdiction that collects this tax. + * @var string The earliest date for which this preferred program can be used in AvaTax. If `null`, this preferred program is valid for all dates earlier than `endDate`. */ - public $jurisName; + public $effectiveDate; /** - * @var int The unique ID of the Tax Authority Type that collects this tax. + * @var string The latest date for which this preferred program can be used in AvaTax. If `null`, this preferred program is valid for all dates later than `effectiveDate`. */ - public $taxAuthorityType; + public $endDate; +} +/** + * Represents an ISO 4217 currency code used for designating the currency of a transaction. + */ +class CurrencyModel +{ /** - * @var string The state assigned number of the jurisdiction that collects this tax. + * @var string The ISO 4217 currency code for this currency. */ - public $stateAssignedNo; + public $code; /** - * @var string The tax type of this tax. + * @var string A friendly human-readable name representing this currency. */ - public $taxType; + public $description; /** - * @var string The tax subtype of this tax. + * @var int The number of decimal digits to use when formatting a currency value for display. */ - public $taxSubType; + public $decimalDigits; +} +/** + * Represents a System Country. + */ +class ProductSystemCountryModel +{ /** - * @var string The name of the tax. + * @var int Its Integer SystemCountryId value for SystemCountry */ - public $taxName; + public $systemCountryId; /** - * @var string Group code when special grouping is enabled. + * @var int Its Integer SystemId value for SystemCountry */ - public $taxGroup; + public $systemId; /** - * @var string DEPRECATED - Date: 3/1/2018, Version: 18.3, Message: Please use rateTypeCode instead. Indicates the tax rate type. (See RateType::* for a list of allowable values) + * @var string string value of country code for SystemCountry */ - public $rateType; + public $country; /** - * @var string Indicates the code of the rate type. Use [ListRateTypesByCountry](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListRateTypesByCountry/) API for a full list of rate type codes. + * @var string DateTime as EffDate for SystemCountry */ - public $rateTypeCode; + public $effDate; /** - * @var float Tax Base - The adjusted taxable amount. + * @var string DateTime as EffDate for SystemCountry */ - public $taxable; + public $endDate; +} +/** + * Represents a product classification system. + */ +class ProductClassificationSystemModel +{ /** - * @var float Tax Rate - The rate of taxation, as a fraction of the amount. + * @var int Its Integer SystemId value for System */ - public $rate; + public $systemId; /** - * @var float Tax amount - The calculated tax (Base * Rate). + * @var string The System code for this System. */ - public $tax; + public $systemCode; /** - * @var float The amount of tax that AvaTax calculated for the transaction. If you used a `taxOverride` of type `taxAmount`, there may be a difference between the `tax` field which applies your override, and the `TaxCalculated` field which represents the amount of tax that AvaTax calculated for this transaction without override. You can use this for comparison. + * @var string A friendly human-readable name representing this System. */ - public $taxCalculated; + public $description; /** - * @var float The amount of the transaction that was non-taxable. + * @var string custom value set for the system */ - public $nonTaxable; + public $customsValue; /** - * @var float The amount of the transaction that was exempt. + * @var ProductSystemCountryModel[] List of all countries that belong to the system including */ - public $exemption; + public $countries; } /** - * Tax Details by Tax subtype + * Tax Authority Type Model */ -class TaxDetailsByTaxSubType +class TaxAuthorityTypeModel { /** - * @var string Tax subtype + * @var int The unique ID number of this tax Authority customer type. */ - public $taxSubType; + public $id; /** - * @var float Total taxable amount by tax type + * @var string The description name of this tax authority type. */ - public $totalTaxable; + public $description; /** - * @var float Total exempt by tax type + * @var string Tax Authority Group */ - public $totalExempt; + public $taxAuthorityGroup; +} +/** + * Tax Notice Status Model + */ +class NoticeStatusModel +{ /** - * @var float Total non taxable by tax type + * @var int The unique ID number of this tax authority type. */ - public $totalNonTaxable; + public $id; /** - * @var float Total tax by tax type + * @var string The description name of this tax authority type. */ - public $totalTax; + public $description; + /** + * @var boolean True if a tax notice in this status is considered 'open' and has more work expected to be done before it is closed. + */ + public $isOpen; + /** + * @var int If a list of status values is to be displayed in a dropdown, they should be displayed in this numeric order. + */ + public $sortOrder; } /** - * Tax Details by Tax Type + * Tax Authority Model */ -class TaxDetailsByTaxType +class NoticeCustomerTypeModel { /** - * @var string Tax Type + * @var int The unique ID number of this tax notice customer type. */ - public $taxType; + public $id; /** - * @var float Total taxable amount by tax type + * @var string The description name of this tax authority type. */ - public $totalTaxable; + public $description; /** - * @var float Total exempt by tax type + * @var boolean A flag if the type is active */ - public $totalExempt; + public $activeFlag; /** - * @var float Total non taxable by tax type + * @var int sort order of the types */ - public $totalNonTaxable; + public $sortOrder; +} +/** + * Tax Notice Reason Model + */ +class NoticeReasonModel +{ /** - * @var float Total tax by tax type + * @var int The unique ID number of this tax notice customer type. */ - public $totalTax; + public $id; /** - * @var TaxDetailsByTaxSubType[] Tax subtype details + * @var string The description name of this tax authority type. */ - public $taxSubTypeDetails; + public $description; + /** + * @var boolean A flag if the type is active + */ + public $activeFlag; + /** + * @var int sort order of the types + */ + public $sortOrder; } /** - * Represents a message to be displayed on an invoice. + * FilingFrequency Model */ -class InvoiceMessageModel +class FilingFrequencyModel { /** - * @var string The content of the invoice message. + * @var int The unique ID number of this filing frequency. */ - public $content; + public $id; /** - * @var string[] The applicable tax line numbers and codes. + * @var string The description name of this filing frequency */ - public $lineNumbers; + public $description; } /** - * This object represents a single transaction; for example, a sales invoice or purchase order. + * Tax Notice FilingType Model */ -class TransactionModel +class NoticeFilingTypeModel { /** - * @var int The unique ID number of this transaction. + * @var int The unique ID number of this tax notice customer type. */ public $id; /** - * @var string A unique customer-provided code identifying this transaction. + * @var string The description name of this tax authority type. */ - public $code; + public $description; /** - * @var int The unique ID number of the company that recorded this transaction. + * @var boolean A flag if the type is active */ - public $companyId; + public $activeFlag; /** - * @var string The date on which this transaction occurred. + * @var int sort order of the types */ - public $date; + public $sortOrder; +} +/** + * Tax Notice Type Model + */ +class NoticeTypeModel +{ /** - * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null till its removed. The date when payment was made on this transaction. By default, this should be the same as the date of the transaction. + * @var int The unique ID number of this tax notice customer type. */ - public $paymentDate; + public $id; /** - * @var string The status of the transaction. (See DocumentStatus::* for a list of allowable values) + * @var string The description name of this tax authority type. */ - public $status; + public $description; /** - * @var string The type of the transaction. Transactions of type `SalesOrder`, `ReturnOrder`, and so on are temporary estimates and will not be saved. Transactions of type `SalesInvoice, `ReturnInvoice`, and so on are permanent transactions that can be reported to tax authorities if they are in status `Committed`. A sales transaction represents a sale from the company to a customer. A purchase transaction represents a purchase made by the company. A return transaction represents a customer who decided to request a refund after purchasing a product from the company. An inventory transfer transaction represents goods that were moved from one location of the company to another location without changing ownership. (See DocumentType::* for a list of allowable values) + * @var boolean A flag if the type is active */ - public $type; + public $activeFlag; /** - * @var string If this transaction was created as part of a batch, this code indicates which batch. + * @var int sort order of the types */ - public $batchCode; + public $sortOrder; +} +/** + * Tax Authority Model + */ +class NoticeCustomerFundingOptionModel +{ /** - * @var string The three-character ISO 4217 currency code that was used for payment for this transaction. + * @var int The unique ID number of this tax notice customer FundingOption. */ - public $currencyCode; + public $id; /** - * @var string The three-character ISO 4217 exchange rate currency code that was used for payment for this transaction. + * @var string The description name of this tax authority FundingOption. */ - public $exchangeRateCurrencyCode; + public $description; /** - * @var string DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use entityUseCode instead. The customer usage type for this transaction. Customer usage types often affect exemption or taxability rules. + * @var boolean A flag if the FundingOption is active */ - public $customerUsageType; + public $activeFlag; /** - * @var string The entity use code for this transaction. Entity use codes often affect exemption or taxability rules. + * @var int sort order of the FundingOptions */ - public $entityUseCode; + public $sortOrder; +} +/** + * Tax Notice Priority Model + */ +class NoticePriorityModel +{ /** - * @var string DEPRECATED - Date: 3/1/2018, Version: 18.3, Message: Please use `customerCode` This field has been renamed to `customerCode` to match documentation for other APIs related to exemption customers. + * @var int The unique ID number of this tax notice customer Priority. */ - public $customerVendorCode; + public $id; /** - * @var string Unique code identifying the customer that requested this transaction. When you specify a `customerCode`, AvaTax will look to see if a customer exists with this code in the exemption certificate system. If that customer exists, and if that customer has uploaded an exemption certificate that applies to this transaction, the relevant parts of this transaction that can use the exemption certificate will be treated as exempt. + * @var string The description name of this tax authority Priority. */ - public $customerCode; + public $description; /** - * @var string The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing. If no applicable ECMS entry is available, the AvaTax service will determine if an Exemption Number field is populated or an Entity/Use Code is included in the sales tax calculation request, and will perform exemption processing using either of those two options. + * @var boolean A flag if the Priority is active */ - public $exemptNo; + public $activeFlag; /** - * @var boolean If this transaction has been reconciled against the company's ledger, this value is set to true. + * @var int sort order of the Prioritys */ - public $reconciled; + public $sortOrder; +} +/** + * NoticeResponsibility Model + */ +class NoticeResponsibilityModel +{ /** - * @var string DEPRECATED - Date: 3/1/2018, Version: 18.3, Message: In order to ensure consistency of field names, Please use reportingLocationCode instead. This field has been replaced by the reportingLocationCode field + * @var int The unique ID number of this notice responsibility. */ - public $locationCode; + public $id; /** - * @var string For customers who use [location-based tax reporting](https://developer.avalara.com/avatax/dev-guide/locations/location-based-reporting), this field controls how this transaction will be filed for multi-location tax filings. If you specify a non-null value for this field, AvaTax will ensure that this transaction is reported on the tax return associated with the [LocationModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LocationModel/) identified by this code. This field does not affect any addresses for the transaction. It only controls the tax filing behavior of this transaction. If you are looking for information about how to set up addresses for a transaction, please see [Using Address Types](https://developer.avalara.com/avatax/dev-guide/customizing-transaction/address-types/) in the AvaTax Developer Guide. + * @var string The description name of this notice responsibility */ - public $reportingLocationCode; + public $description; /** - * @var string The customer-supplied purchase order number of this transaction. + * @var boolean Defines if the responsibility is active */ - public $purchaseOrderNo; + public $isActive; /** - * @var string A user-defined reference code for this transaction. + * @var int The sort order of this responsibility */ - public $referenceCode; + public $sortOrder; +} +/** + * NoticeRootCause Model + */ +class NoticeRootCauseModel +{ /** - * @var string The salesperson who provided this transaction. Not required. + * @var int The unique ID number of this notice RootCause. */ - public $salespersonCode; + public $id; /** - * @var string If a tax override was applied to this transaction, indicates what type of tax override was applied. (See TaxOverrideType::* for a list of allowable values) + * @var string The description name of this notice RootCause */ - public $taxOverrideType; + public $description; /** - * @var float If a tax override was applied to this transaction, indicates the amount of tax that was requested by the customer. + * @var boolean Defines if the RootCause is active */ - public $taxOverrideAmount; + public $isActive; /** - * @var string If a tax override was applied to this transaction, indicates the reason for the tax override. + * @var int The sort order of this RootCause */ - public $taxOverrideReason; + public $sortOrder; +} +/** + * Represents a verification request using Skyscraper for a company + */ +class requiredFilingCalendarDataFieldModel +{ /** - * @var float The total amount of this transaction. + * @var string Region of the verification request */ - public $totalAmount; + public $name; /** - * @var float The amount of this transaction that was exempt. + * @var string Username that we are using for verification */ - public $totalExempt; + public $description; +} +/** + * Represents a list of statuses of returns available in skyscraper + */ +class SkyscraperStatusModel +{ /** - * @var float The total amount of discounts applied to all lines within this transaction. + * @var string The specific name of the returns available in skyscraper */ - public $totalDiscount; + public $name; /** - * @var float The total tax for all lines in this transaction. If you used a `taxOverride` of type `taxAmount` for any lines in this transaction, this value may be different than the amount of tax calculated by AvaTax. The amount of tax calculated by AvaTax will be stored in the `totalTaxCalculated` field, whereas this field will contain the total tax that was charged on the transaction. You can compare the `totalTax` and `totalTaxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. + * @var string[] The tax form codes available to file through skyscrper */ - public $totalTax; + public $taxFormCodes; /** - * @var float The portion of the total amount of this transaction that was taxable. + * @var string The country of the returns */ - public $totalTaxable; + public $country; /** - * @var float The amount of tax that AvaTax calculated for the transaction. If you used a `taxOverride` of type `taxAmount` for any lines in this transaction, this value will represent the amount that AvaTax calculated for this transaction without applying the override. The field `totalTax` will be the total amount of tax after all overrides are applied. You can compare the `totalTax` and `totalTaxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. - */ - public $totalTaxCalculated; - /** - * @var string If this transaction was adjusted, indicates the unique ID number of the reason why the transaction was adjusted. (See AdjustmentReason::* for a list of allowable values) - */ - public $adjustmentReason; - /** - * @var string If this transaction was adjusted, indicates a description of the reason why the transaction was adjusted. - */ - public $adjustmentDescription; - /** - * @var boolean If this transaction has been reported to a tax authority, this transaction is considered locked and may not be adjusted after reporting. - */ - public $locked; - /** - * @var string The two-or-three character ISO region code of the region for this transaction. - */ - public $region; - /** - * @var string The two-character ISO 3166 code of the country for this transaction. - */ - public $country; - /** - * @var int If this transaction was adjusted, this indicates the version number of this transaction. Incremented each time the transaction is adjusted. + * @var string The Scraper type (See ScraperType::* for a list of allowable values) */ - public $version; + public $scraperType; /** - * @var string The software version used to calculate this transaction. + * @var boolean Indicates if the return is currently available */ - public $softwareVersion; + public $isAvailable; /** - * @var int The unique ID number of the origin address for this transaction. + * @var string The expected response time of the call */ - public $originAddressId; + public $expectedResponseTime; /** - * @var int The unique ID number of the destination address for this transaction. + * @var string Message on the returns */ - public $destinationAddressId; + public $message; /** - * @var string If this transaction included foreign currency exchange, this is the date as of which the exchange rate was calculated. + * @var requiredFilingCalendarDataFieldModel[] A list of required fields to file */ - public $exchangeRateEffectiveDate; + public $requiredFilingCalendarDataFields; +} +/** + * Represents information about a single legal taxing jurisdiction + */ +class JurisdictionModel +{ /** - * @var float If this transaction included foreign currency exchange, this is the exchange rate that was used. + * @var string The code that is used to identify this jurisdiction */ - public $exchangeRate; + public $code; /** - * @var boolean By default, the value is null, when the value is null, the value can be set at nexus level and used. If the value is not null, it will override the value at nexus level. If true, this seller was considered the importer of record of a product shipped internationally. If this transaction is not an international transaction, this field may be left blank. The "importer of record" is liable to pay customs and import duties for products shipped internationally. If you specify that the seller is the importer of record, then estimates of customs and import duties will be added as tax details to the transaction. Otherwise, the buyer is considered the importer of record, and customs and import duties will not be added to the tax details for this transaction. + * @var string The name of this jurisdiction */ - public $isSellerImporterOfRecord; + public $name; /** - * @var string Description of this transaction. Field permits unicode values. + * @var string The type of the jurisdiction, indicating whether it is a country, state/region, city, for example. (See JurisdictionType::* for a list of allowable values) */ - public $description; + public $type; /** - * @var string Email address associated with this transaction. + * @var float The base rate of tax specific to this jurisdiction. */ - public $email; + public $rate; /** - * @var string VAT business identification number used for this transaction. + * @var float The "Sales" tax rate specific to this jurisdiction. */ - public $businessIdentificationNo; + public $salesRate; /** - * @var string The date/time when this record was last modified. + * @var string The Avalara-supplied signature code for this jurisdiction. */ - public $modifiedDate; + public $signatureCode; /** - * @var int The user ID of the user who last modified this record. + * @var string Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. */ - public $modifiedUserId; + public $region; /** - * @var string Tax date for this transaction + * @var float The "Seller's Use" tax rate specific to this jurisdiction. */ - public $taxDate; + public $useRate; /** - * @var TransactionLineModel[] A list of line items in this transaction. To fetch this list, add the query string `?$include=Lines` or `?$include=Details` to your URL. + * @var string The city name of this jurisdiction */ - public $lines; + public $city; /** - * @var TransactionAddressModel[] A list of line items in this transaction. To fetch this list, add the query string `?$include=Addresses` to your URL. For more information about transaction addresses, please see [Using Address Types](https://developer.avalara.com/avatax/dev-guide/customizing-transaction/address-types/) in the AvaTax Developer Guide. + * @var string The county name of this jurisdiction */ - public $addresses; + public $county; /** - * @var TransactionLocationTypeModel[] A list of location types in this transaction. To fetch this list, add the query string `?$include=Addresses` to your URL. + * @var string Name or ISO 3166 code identifying the country of this jurisdiction. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. */ - public $locationTypes; + public $country; /** - * @var TransactionSummary[] Contains a summary of tax on this transaction. + * @var string A short name of the jurisidiction */ - public $summary; + public $shortName; /** - * @var TaxDetailsByTaxType[] Contains the tax details per tax type + * @var string State FIPS code */ - public $taxDetailsByTaxType; + public $stateFips; /** - * @var TransactionParameterModel[] Contains a list of extra parameters that were set when the transaction was created. + * @var string County FIPS code */ - public $parameters; + public $countyFips; /** - * @var AvaTaxMessage[] List of informational and warning messages regarding this API call. These messages are only relevant to the current API call. + * @var string City FIPS code */ - public $messages; + public $placeFips; /** - * @var InvoiceMessageModel[] Invoice messages associated with this document. Currently, this stores legally-required VAT messages. + * @var int Unique AvaTax Id of this Jurisdiction */ - public $invoiceMessages; + public $id; /** - * @var string The name of the supplier / exporter / seller. For sales doctype this will be the name of your own company for which you are reporting. For purchases doctype this will be the name of the supplier you have purchased from. + * @var string The date this jurisdiction starts to take effect on tax calculations */ - public $customerSupplierName; + public $effectiveDate; /** - * @var int The Id of the datasource from which this transaction originated. This value will be overridden by the system to take the datasource Id from the call header. + * @var string The date this jurisdiction stops to take effect on tax calculations */ - public $dataSourceId; + public $endDate; } /** - * Represents a customer to whom you sell products and/or services. + * Represents an override of tax jurisdictions for a specific address. + * + * During the time period represented by EffDate through EndDate, all tax decisions for addresses matching + * this override object will be assigned to the list of jurisdictions designated in this object. */ -class LinkCertificatesModel +class JurisdictionOverrideModel { /** - * @var int[] An array of certificate ID numbers to link + * @var int The unique ID number of this override. */ - public $certificates; -} -/** - * Indicates the customer's exemption status in a specific country and region. - */ -class ExemptionStatusModel -{ + public $id; /** - * @var string The exemption status of this customer in this country/region. + * @var int The unique ID number assigned to this account. */ - public $status; + public $accountId; /** - * @var CertificateModel Certificate if the customer is exempted + * @var string A description of why this jurisdiction override was created. */ - public $certificate; -} -/** - * Data source object - */ -class DataSourceModel -{ + public $description; /** - * @var int The id of the datasource. + * @var string The street address of the physical location affected by this override. */ - public $id; + public $line1; /** - * @var int The id of the company to which the datasource belongs to. + * @var string The city address of the physical location affected by this override. */ - public $companyId; + public $city; /** - * @var string The extractor/connector id. + * @var string Name or ISO 3166 code identifying the region within the country to be affected by this override. Note that only United States addresses are affected by the jurisdiction override system. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. */ - public $source; + public $region; /** - * @var string The unique ID number of this connection. + * @var string The two character ISO-3166 country code of the country affected by this override. Note that only United States addresses are affected by the jurisdiction override system. */ - public $instance; + public $country; /** - * @var boolean The connection using the connection_id is enabled. The customer is responsible to enable or disable. + * @var string The postal code of the physical location affected by this override. */ - public $isEnabled; + public $postalCode; /** - * @var boolean If all the information has been transferred from the extractor to the database. + * @var string The date when this override first takes effect. Set this value to null to affect all dates up to the end date. */ - public $isSynced; + public $effectiveDate; /** - * @var boolean True if this data source is authorized. + * @var string The date when this override will cease to take effect. Set this value to null to never expire. */ - public $isAuthorized; + public $endDate; /** - * @var string The date when the information was last synched. + * @var string The date when this record was created. */ - public $lastSyncedDate; + public $createdDate; /** * @var int The User ID of the user who created this record. */ public $createdUserId; /** - * @var string The date when this record was created. + * @var string The date/time when this record was last modified. */ - public $createdDate; + public $modifiedDate; /** * @var int The user ID of the user who last modified this record. */ public $modifiedUserId; /** - * @var string The date/time when this record was last modified. - */ - public $modifiedDate; - /** - * @var string The date when this record was deleted. + * @var JurisdictionModel[] A list of the tax jurisdictions that will be assigned to this overridden address. */ - public $deletedDate; + public $jurisdictions; /** - * @var boolean Specifies whether transactions created by this data source needs to re-calculate tax or not + * @var int The TaxRegionId of the new location affected by this jurisdiction override. */ - public $recalculate; + public $taxRegionId; /** - * @var string Specifies the name of the extractor + * @var string The boundary level of this override (See BoundaryLevel::* for a list of allowable values) */ - public $name; + public $boundaryLevel; /** - * @var string Specifies any implementation-specific information along with the DataSource.This field has no internal meaning in AvaTax and is purely for the convenience of the DataSource API user + * @var boolean True if this is a default boundary */ - public $externalState; + public $isDefault; } /** - * Identifies all nexus that match a particular tax form + * Resource File Type Model */ -class NexusByTaxFormModel +class ResourceFileTypeModel { /** - * @var string The code of the tax form that was requested - */ - public $formCode; - /** - * @var int The company ID of the company that was used to load the companyNexus array. If this value is null, no company data was loaded. - */ - public $companyId; - /** - * @var NexusModel[] A list of all Avalara-defined nexus that are relevant to this tax form - */ - public $nexusDefinitions; - /** - * @var NexusModel[] A list of all currently-defined company nexus that are related to this tax form + * @var int The resource file type id */ - public $companyNexus; -} -/** - * Information about Avalara-defined tax code types. - * This list is used when creating tax codes and tax rules. - */ -class TaxCodeTypesModel -{ + public $resourceFileTypeId; /** - * @var object The list of Avalara-defined tax code types. + * @var string The name of the file type */ - public $types; + public $name; } /** - * Represents a service or a subscription type. + * Rate type Model */ -class SubscriptionTypeModel +class RateTypeModel { /** - * @var int The unique ID number of this subscription type. + * @var string The unique ID number of this rate type. */ public $id; /** - * @var string The friendly name of the service this subscription type represents. + * @var string Description of this rate type. */ public $description; + /** + * @var string Country code for this rate type + */ + public $country; } /** - * Represents a single security role. + * Represents information about a tax form known to Avalara */ -class SecurityRoleModel +class FormMasterModel { /** - * @var int The unique ID number of this security role. + * @var int Unique ID number of this form master object */ public $id; /** - * @var string A description of this security role + * @var int The type of the form being submitted */ - public $description; -} -/** - * Tax Authority Model - */ -class TaxAuthorityModel -{ + public $formTypeId; /** - * @var int The unique ID number of this tax authority. + * @var string Unique tax form code representing this tax form */ - public $id; + public $taxFormCode; /** - * @var string The friendly name of this tax authority. + * @var string Legacy return name as known in the AvaFileForm table */ - public $name; + public $legacyReturnName; /** - * @var int The type of this tax authority. + * @var string Human readable form summary name */ - public $taxAuthorityTypeId; + public $taxFormName; /** - * @var int The unique ID number of the jurisdiction for this tax authority. + * @var string Description of this tax form */ - public $jurisdictionId; -} -/** - * Represents a form that can be filed with a tax authority. - */ -class TaxAuthorityFormModel -{ + public $description; /** - * @var int The unique ID number of the tax authority. + * @var boolean True if this form is available for use */ - public $taxAuthorityId; + public $isEffective; /** - * @var string The form name of the form for this tax authority. + * @var string ISO 3166 code of the country that issued this tax form */ - public $formName; -} -/** - * usage of system defined parameters. - */ -class ParameterUsageModel -{ + public $country; /** - * @var int The unique ID number of this property. + * @var string The region within which this form was issued */ - public $id; + public $region; /** - * @var int The id of the parameter. + * @var string Tax authority that issued the form */ - public $parameterId; + public $authorityName; /** - * @var string Product code for the parameter usage item. + * @var string DEPRECATED */ - public $productCode; + public $shortCode; /** - * @var string The country for the parameter usage item. + * @var int Day of the month when the form is due */ - public $country; + public $dueDay; /** - * @var string The state for the parameter usage item. + * @var int Day of the month on which the form is considered delinquent. Almost always the same as DueDay */ - public $region; + public $delinquentDay; /** - * @var int System Id for the parameter usage item + * @var int Month of the year the state considers as the first fiscal month */ - public $systemId; + public $fiscalYearStartMonth; /** - * @var string tax type for the parameter usage item. + * @var boolean Can form support multi frequencies */ - public $taxTypeId; + public $hasMultiFrequencies; /** - * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated + * @var boolean Does this tax authority require a power of attorney in order to speak to Avalara */ - public $attributeType; + public $isPOARequired; /** - * @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. + * @var boolean True if this form requires that the customer register with the authority */ - public $name; + public $isRegistrationRequired; /** - * @var string The data type of the property. + * @var boolean Unused */ - public $dataType; + public $hasMultiRegistrationMethods; /** - * @var string Help text to be shown to the user when they are filling out this parameter. Help text may include HTML links to additional content with more information about a parameter. + * @var boolean Unused */ - public $helpText; + public $hasSchedules; /** - * @var string Label that helps the user to identify a parameter + * @var boolean Unused */ - public $label; + public $hasMultiFilingMethods; /** - * @var string A help url that provides more information about the parameter + * @var boolean Unused */ - public $helpUrl; + public $hasMultiPayMethods; /** - * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. + * @var boolean Unused */ - public $values; + public $isEFTRequired; /** - * @var string The unit of measurement type of the parameter + * @var boolean Unused */ - public $measurementType; -} -/** - * An extra property that can change the behavior of tax transactions. - */ -class ParameterModel -{ + public $isFilePayMethodLinked; /** - * @var int The unique ID number of this property. + * @var int Unused */ - public $id; + public $mailingReceivedRuleId; /** - * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null. The category grouping of this parameter. When your user interface displays a large number of parameters, they should be grouped by their category value. + * @var int Unused */ - public $category; + public $proofOfMailingId; /** - * @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. + * @var boolean True if you can report a negative amount in a single jurisdiction on the form */ - public $name; + public $isNegAmountAllowed; /** - * @var string The data type of the property. + * @var boolean True if the form overall can go negative */ - public $dataType; + public $allowNegativeOverallTax; /** - * @var string Help text to be shown to the user when they are filling out this parameter. Help text may include HTML links to additional content with more information about a parameter. + * @var boolean Unused */ - public $helpText; + public $isNettingRequired; /** - * @var string[] A list of service types to which this parameter applies. + * @var int Unused */ - public $serviceTypes; + public $roundingMethodId; /** - * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null. The prompt you should use when displaying this parameter to a user. For example, if your user interface displays a parameter in a text box, this is the label you should use to identify that text box. + * @var float Total amount of discounts that can be received by a vendor each year */ - public $prompt; + public $vendorDiscountAnnualMax; /** - * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null. If your user interface permits client-side validation of parameters, this string is a regular expression you can use to validate the user's data entry prior to submitting a tax request. + * @var boolean Unused */ - public $regularExpression; + public $versionsRequireAuthorityApproval; /** - * @var string Label that helps the user to identify a parameter + * @var int Type of outlet reporting for this form */ - public $label; + public $outletReportingMethodId; /** - * @var string A help url that provides more information about the parameter + * @var boolean Unused */ - public $helpUrl; + public $hasReportingCodes; /** - * @var string The type of parameter as determined by its application, e.g. Product, Transaction, Calculated + * @var boolean Not sure if used */ - public $attributeType; + public $hasPrepayments; /** - * @var string[] If the parameter is of enumeration data type, then this list will be populated with all of the possible enumeration values. + * @var boolean Unused */ - public $values; + public $grossIncludesInterstateSales; /** - * @var string The unit of measurement type of the parameter + * @var string Unused */ - public $measurementType; -} -/** - * Information about questions that the local jurisdictions require for each location - */ -class LocationQuestionModel -{ + public $grossIncludesTax; /** - * @var int The unique ID number of this location setting type + * @var boolean Unused */ - public $id; + public $hasEfileFee; /** - * @var string This is the prompt for this question + * @var boolean Unused */ - public $question; + public $hasEpayFee; /** - * @var string If additional information is available about the location setting, this contains descriptive text to help you identify the correct value to provide in this setting. + * @var boolean Unused */ - public $description; + public $hasDependencies; /** - * @var string If available, this regular expression will verify that the input from the user is in the expected format. + * @var string Unused */ - public $regularExpression; + public $requiredEfileTrigger; /** - * @var string If available, this is an example value that you can demonstrate to the user to show what is expected. + * @var string Unused */ - public $exampleValue; + public $requiredEftTrigger; /** - * @var string Indicates which jurisdiction requires this question + * @var boolean Unused */ - public $jurisdictionName; + public $vendorDiscountEfile; /** - * @var string Indicates which type of jurisdiction requires this question (See JurisdictionType::* for a list of allowable values) + * @var boolean Unused */ - public $jurisdictionType; + public $vendorDiscountPaper; /** - * @var string Indicates the country that this jurisdiction belongs to + * @var string Unused */ - public $jurisdictionCountry; + public $peerReviewed; /** - * @var string Indicates the state, region, or province that this jurisdiction belongs to + * @var string Unused */ - public $jurisdictionRegion; + public $peerReviewedId; /** - * @var string Help and guidance for this specific question + * @var string Unused */ - public $helpText; + public $peerReviewedDate; /** - * @var int Maximum length of the answer string + * @var int ID of the Avalara user who created the form */ - public $maxLength; + public $createdUserId; /** - * @var boolean True if this question must be answered for this filing calendar + * @var string Date when form was created */ - public $required; + public $createdDate; /** - * @var string Data type of the answer + * @var int ID of the Avalara user who modified the form */ - public $dataType; + public $modifiedUserId; /** - * @var string + * @var string Date when form was modified */ - public $staticOptions; + public $modifiedDate; /** - * @var boolean + * @var string Mailing address of the department of revenue */ - public $unique; -} -/** - * Represents a language-specific localized name of a particular geographic entity such - * as a country or a region. - */ -class IsoLocalizedName -{ + public $dorAddressMailTo; /** - * @var string The two-character alphanumeric code identifying the language in which this name is used. Note that languageAlpha2Code and language3AlphaCode refer to the same language. + * @var string Mailing address of the department of revenue */ - public $languageAlpha2Code; + public $dorAddress1; /** - * @var string The three-character alphanumeric code identifying the language in which this name is used. Note that languageAlpha2Code and language3AlphaCode refer to the same language. + * @var string Mailing address of the department of revenue */ - public $languageAlpha3Code; + public $dorAddress2; /** - * @var string The name of this geographic entity as known in this language. + * @var string Mailing address of the department of revenue */ - public $name; -} -/** - * Represents an ISO 3166 recognized country - */ -class IsoCountryModel -{ + public $dorAddressCity; /** - * @var string The two character ISO 3166 country code + * @var string Mailing address of the department of revenue */ - public $code; + public $dorAddressRegion; /** - * @var string The three character ISO 3166 country code + * @var string Mailing address of the department of revenue */ - public $alpha3Code; + public $dorAddressPostalCode; /** - * @var string The full name of this country in uppercase. For names in proper or formal case, or for names in other languages, please examine the `localizedNames` element for an appropriate name. + * @var string Mailing address of the department of revenue */ - public $name; + public $dorAddressCountry; /** - * @var boolean True if this country is a member of the European Union + * @var string Mailing address to use when a zero dollar form is filed */ - public $isEuropeanUnion; + public $zeroAddressMailTo; /** - * @var IsoLocalizedName[] A list of localized names in a variety of languages. This list is maintained by the International Standards Organization. + * @var string Mailing address to use when a zero dollar form is filed */ - public $localizedNames; + public $zeroAddress1; /** - * @var boolean Whether or not this country requires a region in postal addresses. + * @var string Mailing address to use when a zero dollar form is filed */ - public $addressesRequireRegion; + public $zeroAddress2; + /** + * @var string Mailing address to use when a zero dollar form is filed + */ + public $zeroAddressCity; + /** + * @var string Mailing address to use when a zero dollar form is filed + */ + public $zeroAddressRegion; + /** + * @var string Mailing address to use when a zero dollar form is filed + */ + public $zeroAddressPostalCode; + /** + * @var string Mailing address to use when a zero dollar form is filed + */ + public $zeroAddressCountry; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddressMailTo; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddress1; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddress2; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddressCity; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddressRegion; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddressPostalCode; + /** + * @var string Mailing address to use when filing an amended return + */ + public $amendedAddressCountry; + /** + * @var boolean Unused + */ + public $onlineBackFiling; + /** + * @var boolean Unused + */ + public $onlineAmendedReturns; + /** + * @var string --Need Further Clarification + */ + public $prepaymentFrequency; + /** + * @var boolean Unused + */ + public $outletLocationIdentifiersRequired; + /** + * @var string --Need Further Clarification + */ + public $listingSortOrder; + /** + * @var string Link to the state department of revenue website, if available + */ + public $dorWebsite; + /** + * @var boolean --Need Further Clarification + */ + public $fileForAllOutlets; + /** + * @var boolean --Need Further Clarification + */ + public $paperFormsDoNotHaveDiscounts; + /** + * @var boolean Internal behavior + */ + public $stackAggregation; + /** + * @var string --Need Further Clarification + */ + public $roundingPrecision; + /** + * @var string --Need Further Clarification + */ + public $inconsistencyTolerance; + /** + * @var string Date when this form became effective + */ + public $effDate; + /** + * @var string Date when this form expired + */ + public $endDate; + /** + * @var boolean True if this form can be shown to customers + */ + public $visibleToCustomers; + /** + * @var boolean True if this form requires that you set up outlets in the state + */ + public $requiresOutletSetup; + /** + * @var boolean True if this state permits payment by ACH Credit + */ + public $achCreditAllowed; + /** + * @var string Jurisdiction level of the state + */ + public $reportLevel; + /** + * @var boolean True if this form is verified filed via email + */ + public $postOfficeValidated; + /** + * @var string Internal Avalara flag + */ + public $stackAggregationOption; + /** + * @var string Internal Avalara flag + */ + public $sstBehavior; + /** + * @var string Internal Avalara flag + */ + public $nonSstBehavior; + /** + * @var string Phone number of the department of revenue + */ + public $dorPhoneNumber; + /** + * @var string Unused + */ + public $averageCheckClearDays; + /** + * @var boolean Unused + */ + public $filterZeroRatedLineDetails; + /** + * @var boolean Unused + */ + public $allowsBulkFilingAccounts; + /** + * @var string Unused + */ + public $bulkAccountInstructionLink; + /** + * @var string Unused + */ + public $registrationIdFormat; + /** + * @var string Unused + */ + public $thresholdTrigger; + /** + * @var string Unused + */ + public $transactionSortingOption; + /** + * @var int Unused + */ + public $contentReviewFrequencyId; + /** + * @var string Unused + */ + public $aliasForFormMasterId; } /** - * Represents a region, province, or state within a country + * Represents a tax type group */ -class IsoRegionModel +class TaxTypeGroupModel { /** - * @var string The two-character ISO 3166 country code this region belongs to + * @var int The unique ID number of this tax type group. */ - public $countryCode; + public $id; /** - * @var string The three character ISO 3166 region code + * @var string The unique human readable Id of this tax type group. */ - public $code; + public $taxTypeGroup; /** - * @var string The full name, using localized characters, for this region, in uppercase. For names in proper or formal case, or for names in other languages, please examine the `localizedNames` element for an appropriate name. + * @var string The description of this tax type group. */ - public $name; + public $description; /** - * @var string The word in the local language that classifies what type of a region this represents + * @var int If this tax type group requires a subscription, this contains the ID number of the subscription type required to use it. */ - public $classification; + public $subscriptionTypeId; /** - * @var boolean For the United States, this flag indicates whether a U.S. State participates in the Streamlined Sales Tax program. For countries other than the US, this flag is null. + * @var string If this tax type group requires a subscription, this contains the friendly name of the subscription type required to use it. */ - public $streamlinedSalesTax; + public $subscriptionDescription; /** - * @var IsoLocalizedName[] A list of localized names in a variety of languages. This list is maintained by the International Standards Organization. + * @var string The name of the tab in the AvaTax website corresponding to this tax type group. */ - public $localizedNames; + public $tabName; /** - * @var boolean Whether the region collects tax or not. This field will be populated for US country only and will be null for all the other countries. + * @var boolean True if this tax type group is displayed in the user interface of the AvaTax website. */ - public $isRegionTaxable; + public $showColumn; + /** + * @var int The order this record is being returned in the response + */ + public $displaySequence; } /** - * Represents a code describing the intended use for a product that may affect its taxability + * Represents a tax subtype */ -class EntityUseCodeModel +class TaxSubTypeModel { /** - * @var string The Avalara-recognized entity use code for this definition + * @var int The unique ID number of this tax sub-type. */ - public $code; + public $id; /** - * @var string The name of this entity use code + * @var string The unique human readable Id of this tax sub-type. */ - public $name; + public $taxSubType; /** - * @var string Text describing the meaning of this use code + * @var string The description of this tax sub-type. */ public $description; /** - * @var string[] A list of countries where this use code is valid + * @var string The upper level group of tax types. */ - public $validCountries; + public $taxTypeGroup; } /** - * A preferred program is a customs and/or duty program that can be used to handle cross-border transactions. - * Customers who sign up for a preferred program may obtain better terms for their customs and duty payments. - * - * To indicate that your company has signed up for a preferred program, specify the `code` value from this - * object as the value for the `AvaTax.LC.PreferredProgram` parameter in your transaction. + * Represents a group of tax types */ -class PreferredProgramModel +class NexusTaxTypeGroupModel { /** - * @var int The unique ID number representing this preferred program. + * @var int The unique ID number of this nexus tax type group. */ public $id; /** - * @var string A code that identifies this preferred program. To select this program, specify this code value in the `AvaTax.LC.PreferredProgram` parameter. + * @var string The unique human readable Id of this nexus tax type group. + */ + public $nexusTaxTypeGroupId; + /** + * @var string The description of this nexus tax type group. + */ + public $description; + /** + * @var int If this tax type group requires a subscription, this contains the ID number of the subscription type required to use it. + */ + public $subscriptionTypeId; + /** + * @var string If this tax type group requires a subscription, this contains the friendly name of the subscription type required to use it. + */ + public $subscriptionDescription; + /** + * @var string The name of the tab in the AvaTax website corresponding to this tax type group. + */ + public $tabName; + /** + * @var boolean True if this tax type group is displayed in the user interface of the AvaTax website. + */ + public $showColumn; +} +/** + * Represents a transaction/service type pair for telecommunications tax + */ +class CommunicationsTSPairModel +{ + /** + * @var int The numeric Id of the transaction type. + */ + public $transactionTypeId; + /** + * @var int The numeric Id of the service type. */ - public $code; + public $serviceTypeId; /** - * @var string The ISO 3166 country code for the origin permitted by this program + * @var string The name of the transaction type. */ - public $originCountry; + public $AvaTax_Communications_TransactionType; /** - * @var string The ISO 3166 country code for the destination permitted by this program + * @var string The name of the service type. */ - public $destinationCountry; + public $AvaTax_Communications_ServiceType; /** - * @var string The earliest date for which this preferred program can be used in AvaTax. If `null`, this preferred program is valid for all dates earlier than `endDate`. + * @var string The description of the transaction/service type pair. */ - public $effectiveDate; + public $description; /** - * @var string The latest date for which this preferred program can be used in AvaTax. If `null`, this preferred program is valid for all dates later than `effectiveDate`. + * @var string[] List of the parameters (among Charge, Minutes and Lines) that will be used for calculation for this T/S pair. */ - public $endDate; + public $requiredParameters; } /** - * Represents an ISO 4217 currency code used for designating the currency of a transaction. + * Represents information about a type of telecommunications transaction */ -class CurrencyModel +class CommunicationsTransactionTypeModel { /** - * @var string The ISO 4217 currency code for this currency. - */ - public $code; - /** - * @var string A friendly human-readable name representing this currency. + * @var int The numeric Id of the transaction type. */ - public $description; + public $transactionTypeId; /** - * @var int The number of decimal digits to use when formatting a currency value for display. + * @var string The name of the transaction type. */ - public $decimalDigits; + public $AvaTax_Communications_TransactionType; } /** - * Represents a System Country. + * The "Unit of Measurement" model captures information about a type of measurement. Types of measurement refer to + * different scales for the same dimension. For example, measurements of type "Distance" may include units of measurement + * such as meters, feet, inches, and miles. */ -class ProductSystemCountryModel +class UomModel { /** - * @var int Its Integer SystemCountryId value for SystemCountry - */ - public $systemCountryId; - /** - * @var int Its Integer SystemId value for SystemCountry + * @var int The unique ID number of this unit of measurement. */ - public $systemId; + public $id; /** - * @var string string value of country code for SystemCountry + * @var string The code that refers to this unit of measurement. */ - public $country; + public $code; /** - * @var string DateTime as EffDate for SystemCountry + * @var string A short description of this unit of measurement. */ - public $effDate; + public $shortDesc; /** - * @var string DateTime as EffDate for SystemCountry + * @var string A longer description of this unit of measurement. */ - public $endDate; -} -/** - * Represents a product classification system. - */ -class ProductClassificationSystemModel -{ + public $description; /** - * @var int Its Integer SystemId value for System + * @var int The ID number of the measurement type, such as "Distance" or "Mass". */ - public $systemId; + public $measurementTypeId; /** - * @var string The System code for this System. + * @var string The code describing the measurement type. */ - public $systemCode; + public $measurementTypeCode; /** - * @var string A friendly human-readable name representing this System. + * @var string For a particular measurement type, this is the ID number of the unit of measurement object corresponding to the International System of Units (abbreviated SI) unit of measurement standard. This pointer allows you to select the SI unit of measurement for a particular measurement type. */ - public $description; + public $siUOM; /** - * @var string custom value set for the system + * @var string A description of the measurement type system. */ - public $customsValue; + public $measurementTypeDescription; /** - * @var ProductSystemCountryModel[] List of all countries that belong to the system including + * @var boolean True if this measurement is an International System of Units (abbreviated SI) defined standard. */ - public $countries; + public $isSiUom; } /** - * Tax Authority Type Model + * Describes an element in the harmonized tariff system. + * + * According to the [United States International Trade Commission](https://www.usitc.gov), the harmonized tariff schedule is defined as follows: + * + * The HTS is a U.S. nomenclature system used to classify traded goods based on their material composition, product name, and/or intended + * function. The HTS is designed so that each article falls into only one category. It is divided into chapters, each of which has a 2-digit + * number. Each product category within the various chapters is designated by 4, 6, 8, or 10 digits. The 4-digit categories are called + * "headings." The 6-, 8- and 10-digit classifications are called "subheadings." + * + * Within AvaTax, the `HsCodeModel` object can refer to sections, chapters, headings, subheadings, or articles. Each object represents one + * classification. Many of these objects have child objects underneath them; these child objects are more specific than their parent objects. */ -class TaxAuthorityTypeModel +class HsCodeModel { /** - * @var int The unique ID number of this tax Authority customer type. + * @var string The harmonized tariff system code for this section and chapter. A full HS code contains more than six characters. Partial HS codes with two, four, or six characters may have child codes underneath them. A child code is one that contains greater specificity than a parent code. It is recommended that when you identify a product you use the most detailed code available to identify it. Top level sections do not have HS Codes. + */ + public $hsCode; + /** + * @var int A unique identifier for this harmonized tariff system code. To search for a list of child codes underneath a specific HS code, search for codes where the child's `parentHsCodeId` value matches the parent's `id` value. */ public $id; /** - * @var string The description name of this tax authority type. + * @var int The unique ID number of the parent HS code or HS code prefix. To search for a list of child codes underneath a specific HS code, search for codes where the child's `parentHsCodeId` value matches the parent's `id` value. */ - public $description; + public $parentHsCodeId; /** - * @var string Tax Authority Group + * @var string A human readable description that identifies Code descriptive text for this Section, Chapter, Heading, or Subheading. */ - public $taxAuthorityGroup; -} -/** - * Tax Notice Status Model - */ -class NoticeStatusModel -{ + public $description; /** - * @var int The unique ID number of this tax authority type. + * @var string The system to which this HS code belongs. */ - public $id; + public $system; /** - * @var string The description name of this tax authority type. + * @var string The destination country identified with this HS Code. This value applies when certain products are classified in specific ways by bilateral trade agreements. */ - public $description; + public $destinationCountry; /** - * @var boolean True if a tax notice in this status is considered 'open' and has more work expected to be done before it is closed. + * @var string For codes that have been expired or defined on specific dates, this value indicates the earliest date for which this code is considered valid. If this value is null, this code can be used for any valid date earlier than its end date. */ - public $isOpen; + public $effDate; /** - * @var int If a list of status values is to be displayed in a dropdown, they should be displayed in this numeric order. + * @var string For codes that have been expired or defined on specific dates, this value indicates the latest date for which this code is considered valid. If this value is null, this code can be used for any valid date later than its effective date. */ - public $sortOrder; + public $endDate; } /** - * Tax Authority Model + * Represents a PostalCode and its associated data like: country, region, effective dates, etc. */ -class NoticeCustomerTypeModel +class PostalCodeModel { /** - * @var int The unique ID number of this tax notice customer type. + * @var string Country this PostalCode locates in */ - public $id; + public $country; /** - * @var string The description name of this tax authority type. + * @var string The Region/State/Province this PostalCode locates in */ - public $description; + public $region; /** - * @var boolean A flag if the type is active + * @var int An Avalara assigned TaxRegion Id associated to the PostalCode */ - public $activeFlag; + public $taxRegionId; /** - * @var int sort order of the types + * @var string The date when the PostalCode becomes effective */ - public $sortOrder; + public $effDate; + /** + * @var string The date when the PostalCode becomes expired + */ + public $endDate; + /** + * @var string The postalCode + */ + public $postalCode; } /** - * Tax Notice Reason Model + * Marketplace Location Output model */ -class NoticeReasonModel +class MarketplaceLocationModel { /** - * @var int The unique ID number of this tax notice customer type. + * @var string Marketplace Location State */ - public $id; + public $region; /** - * @var string The description name of this tax authority type. + * @var string Marketplace Location Country */ - public $description; + public $country; /** - * @var boolean A flag if the type is active + * @var string Marketplace Location Id */ - public $activeFlag; + public $marketplaceId; /** - * @var int sort order of the types + * @var string Marketplace Location */ - public $sortOrder; -} -/** - * FilingFrequency Model - */ -class FilingFrequencyModel -{ + public $marketplace; /** - * @var int The unique ID number of this filing frequency. + * @var string Marketplace Location Adoption Date */ - public $id; + public $marketplaceAdoptionDate; /** - * @var string The description name of this filing frequency + * @var string Marketplace Location End Date */ - public $description; -} -/** - * Tax Notice FilingType Model - */ -class NoticeFilingTypeModel -{ + public $marketplaceEndDate; /** - * @var int The unique ID number of this tax notice customer type. + * @var string Marketplace Location Legislative Effective Date */ - public $id; + public $legislativeEffectiveDate; /** - * @var string The description name of this tax authority type. + * @var string Marketplace Location Enforcement Date */ - public $description; + public $enforcementDate; /** - * @var boolean A flag if the type is active + * @var string Marketplace Location Created Date */ - public $activeFlag; + public $createdDate; /** - * @var int sort order of the types + * @var string Marketplace Location Modified Date */ - public $sortOrder; + public $modifiedDate; } /** - * Tax Notice Type Model + * Represents a tag for an item in your company's product catalog. */ -class NoticeTypeModel +class TagsModel { /** - * @var int The unique ID number of this tax notice customer type. + * @var int The unique ID number of the tag. */ public $id; /** - * @var string The description name of this tax authority type. - */ - public $description; - /** - * @var boolean A flag if the type is active - */ - public $activeFlag; - /** - * @var int sort order of the types + * @var string The tag name. */ - public $sortOrder; + public $tagName; } /** - * Tax Authority Model + * A company-distance-threshold model indicates the distance between a company + * and the taxing borders of various countries. Distance thresholds are necessary + * to correctly calculate some value-added taxes. + * + * Distance thresholds only apply to sales of goods in certain countries. A distance threshold + * is applied for each ship-from/ship-to combination of countries. The threshold amount is defined by + * the ship-to country. + * + * Generally, if you have exceeded a distance threshold for taxes between a pair of countries, your tax calculation + * will be determined to be the rate in the destination country. If you have not exceeded the threshold, + * your tax calculation will be determined to be the rate in the origin country. + * + * The amount of a threshold is not tracked or managed in AvaTax, but the decision of your tax compliance department + * as to whether you have exceeded this threshold is maintained in this object. + * + * By default, you are considered to have exceeded tax thresholds. If you wish to change this default, you can create + * a company-distance-threshold object to select the correct behavior for this origin/destination tax calculation process. */ -class NoticeCustomerFundingOptionModel +class CompanyDistanceThresholdModel { /** - * @var int The unique ID number of this tax notice customer FundingOption. + * @var int A unique ID number representing this distance threshold object. */ public $id; /** - * @var string The description name of this tax authority FundingOption. + * @var int The ID number of the company that defined this distance threshold. */ - public $description; + public $companyId; /** - * @var boolean A flag if the FundingOption is active + * @var string The origin country for this threshold. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. */ - public $activeFlag; + public $originCountry; /** - * @var int sort order of the FundingOptions + * @var string The destination country for this threshold. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. */ - public $sortOrder; -} -/** - * Tax Notice Priority Model - */ -class NoticePriorityModel -{ + public $destinationCountry; /** - * @var int The unique ID number of this tax notice customer Priority. + * @var string For distance threshold values that change over time, this is the earliest date for which this distance threshold is valid. If null, this distance threshold is valid for all dates earlier than the `endDate` field. */ - public $id; + public $effDate; /** - * @var string The description name of this tax authority Priority. + * @var string For distance threshold values that change over time, this is the latest date for which this distance threshold is valid. If null, this distance threshold is valid for all dates later than the `effDate` field. */ - public $description; + public $endDate; /** - * @var boolean A flag if the Priority is active + * @var boolean True if your tax professional has determined that the value-added tax distance threshold is exceeded for this pair of countries. If you set this value to `false`, your value added taxes will be calculated using the origin country. Otherwise, value added taxes will be calculated on the destination country. */ - public $activeFlag; + public $thresholdExceeded; /** - * @var int sort order of the Prioritys + * @var string Indicates the distance threshold type. This value can be either `Sale` or `Purchase`. */ - public $sortOrder; + public $type; } /** - * NoticeResponsibility Model + * A model used to initialize a new CertCapture eCommerce token. */ -class NoticeResponsibilityModel +class CreateECommerceTokenInputModel { /** - * @var int The unique ID number of this notice responsibility. - */ - public $id; - /** - * @var string The description name of this notice responsibility - */ - public $description; - /** - * @var boolean Defines if the responsibility is active - */ - public $isActive; - /** - * @var int The sort order of this responsibility + * @var string The customer's number that the token will be issued for. */ - public $sortOrder; + public $customerNumber; } /** - * NoticeRootCause Model + * The resource model returned by the ECommerceTokenController's endpoints. */ -class NoticeRootCauseModel +class ECommerceTokenOutputModel { /** - * @var int The unique ID number of this notice RootCause. + * @var string The JWT token that authorizes the gencert tool to operate. */ - public $id; + public $token; /** - * @var string The description name of this notice RootCause + * @var int[] The list of clients that the token is valid for. */ - public $description; + public $clientIds; /** - * @var boolean Defines if the RootCause is active + * @var string The date the token was created. */ - public $isActive; + public $createdDate; /** - * @var int The sort order of this RootCause + * @var string The date that the token will expire. */ - public $sortOrder; + public $expirationDate; } /** - * Represents a verification request using Skyscraper for a company + * A model used to request the refresh of a CertCapture eCommerce token. */ -class requiredFilingCalendarDataFieldModel +class RefreshECommerceTokenInputModel { /** - * @var string Region of the verification request - */ - public $name; - /** - * @var string Username that we are using for verification + * @var string The token that requires its expiration to be extended. */ - public $description; + public $token; } /** - * Represents a list of statuses of returns available in skyscraper + * Error Transaction Model */ -class SkyscraperStatusModel +class ErrorTransactionOutputModel { /** - * @var string The specific name of the returns available in skyscraper - */ - public $name; - /** - * @var string[] The tax form codes available to file through skyscrper - */ - public $taxFormCodes; - /** - * @var string The country of the returns + * @var string Error code of the error result from transaction creation */ - public $country; + public $errorCode; /** - * @var string The Scraper type (See ScraperType::* for a list of allowable values) + * @var string Error message of the error result from transaction creation */ - public $scraperType; + public $errorMessage; /** - * @var boolean Indicates if the return is currently available + * @var string The full JSON of the error result from transaction creation */ - public $isAvailable; + public $avataxErrorJson; /** - * @var string The expected response time of the call + * @var string The full JSON of the transaction creation request */ - public $expectedResponseTime; + public $avataxCreateTransactionJson; /** - * @var string Message on the returns + * @var string The datasource instance that made the transaction creation call */ - public $message; + public $datasource; /** - * @var requiredFilingCalendarDataFieldModel[] A list of required fields to file + * @var string The date of the document */ - public $requiredFilingCalendarDataFields; -} -/** - * Represents information about a single legal taxing jurisdiction - */ -class JurisdictionModel -{ + public $documentDate; /** - * @var string The code that is used to identify this jurisdiction + * @var string The date that this ErrorTransaction will be automatically purged from the detabase. */ - public $code; + public $expiresAt; /** - * @var string The name of this jurisdiction + * @var float The amount of the transaction. */ - public $name; + public $amount; /** - * @var string The type of the jurisdiction, indicating whether it is a country, state/region, city, for example. (See JurisdictionType::* for a list of allowable values) + * @var string The Datasource source of the transaction creation call. */ - public $type; + public $datasourceSource; /** - * @var float The base rate of tax specific to this jurisdiction. + * @var string The country of the ship to address for the transaction creation call. */ - public $rate; + public $shipToCountry; /** - * @var float The "Sales" tax rate specific to this jurisdiction. + * @var string The region of the ship to address for the transaction creation call. */ - public $salesRate; + public $shipToRegion; /** - * @var string The Avalara-supplied signature code for this jurisdiction. + * @var string Type of transaction of the error transaction (See DocumentType::* for a list of allowable values) */ - public $signatureCode; + public $documentType; /** - * @var string Name or ISO 3166 code identifying the region within the country. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. + * @var string The internal reference code (used by the client application) of the error transaction */ - public $region; + public $documentCode; +} +/** + * + */ +class CappedFetchResult +{ /** - * @var float The "Seller's Use" tax rate specific to this jurisdiction. + * @var boolean */ - public $useRate; + public $_isRecordsetCountCapped; /** - * @var string The city name of this jurisdiction + * @var int */ - public $city; + public $_recordsetCount; /** - * @var string The county name of this jurisdiction + * @var object[] */ - public $county; + public $value; /** - * @var string Name or ISO 3166 code identifying the country of this jurisdiction. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. + * @var string */ - public $country; + public $_nextLink; /** - * @var string A short name of the jurisidiction + * @var string */ - public $shortName; + public $pageKey; +} +/** + * Base model class for single error transaction delete request + */ +class ErrorTransactionModelBase +{ /** - * @var string State FIPS code + * @var string Type of transaction of the error transaction (See DocumentType::* for a list of allowable values) */ - public $stateFips; + public $documentType; /** - * @var string County FIPS code + * @var string The internal reference code (used by the client application) of the error transaction */ - public $countyFips; + public $documentCode; +} +/** + * Request model for when a user is deleting multiple error transaction + */ +class DeleteErrorTransactionsRequestModel +{ /** - * @var string City FIPS code + * @var ErrorTransactionModelBase[] List of error transactions to be deleted */ - public $placeFips; + public $models; +} +/** + * Response model of a single error transaction delete + */ +class DeleteErrorTransactionResponseModel +{ /** - * @var int Unique AvaTax Id of this Jurisdiction + * @var string Result of the deletion (See AvataxDeleteErrorTransactionStatus::* for a list of allowable values) */ - public $id; + public $result; /** - * @var string The date this jurisdiction starts to take effect on tax calculations + * @var string Type of transaction of the error transaction (See DocumentType::* for a list of allowable values) */ - public $effectiveDate; + public $documentType; /** - * @var string The date this jurisdiction stops to take effect on tax calculations + * @var string The internal reference code (used by the client application) of the error transaction */ - public $endDate; + public $documentCode; } /** - * Represents an override of tax jurisdictions for a specific address. - * - * During the time period represented by EffDate through EndDate, all tax decisions for addresses matching - * this override object will be assigned to the list of jurisdictions designated in this object. + * Response model of error transaction batch delete */ -class JurisdictionOverrideModel +class DeleteErrorTransactionsResponseModel { /** - * @var int The unique ID number of this override. - */ - public $id; - /** - * @var int The unique ID number assigned to this account. - */ - public $accountId; - /** - * @var string A description of why this jurisdiction override was created. + * @var DeleteErrorTransactionResponseModel[] The individual result of each error transaction in the request batch */ - public $description; + public $results; +} +/** + * Model that has the matching count for an errorcode + */ +class ErrorCodeOutputModel +{ /** - * @var string The street address of the physical location affected by this override. + * @var string Name of the error code */ - public $line1; + public $errorCode; /** - * @var string The city address of the physical location affected by this override. + * @var int Number of error code recorded */ - public $city; + public $count; +} +/** + * + */ +class CompanyReturnSettingModel +{ /** - * @var string Name or ISO 3166 code identifying the region within the country to be affected by this override. Note that only United States addresses are affected by the jurisdiction override system. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. + * @var int The unique ID of this CompanyReturnsSetting */ - public $region; + public $id; /** - * @var string The two character ISO-3166 country code of the country affected by this override. Note that only United States addresses are affected by the jurisdiction override system. + * @var int The CompanyReturn Id */ - public $country; + public $companyReturnId; /** - * @var string The postal code of the physical location affected by this override. + * @var int The TaxFormCatalog filingQuestionId. */ - public $postalCode; + public $filingQuestionId; /** - * @var string The date when this override first takes effect. Set this value to null to affect all dates up to the end date. + * @var string Filing question code as defined in TaxFormCatalog. */ - public $effectiveDate; + public $filingQuestionCode; /** - * @var string The date when this override will cease to take effect. Set this value to null to never expire. + * @var string The value of this setting */ - public $endDate; + public $value; /** * @var string The date when this record was created. */ @@ -6431,1046 +6795,1019 @@ class JurisdictionOverrideModel * @var int The user ID of the user who last modified this record. */ public $modifiedUserId; +} +/** + * Represents a commitment to file a tax return on a recurring basis. + * Only used if you subscribe to Avalara Returns. + */ +class FilingCalendarModel +{ /** - * @var JurisdictionModel[] A list of the tax jurisdictions that will be assigned to this overridden address. + * @var int The unique ID number of this filing calendar. */ - public $jurisdictions; + public $id; /** - * @var int The TaxRegionId of the new location affected by this jurisdiction override. + * @var int The unique ID number of the company to which this filing calendar belongs. */ - public $taxRegionId; + public $companyId; /** - * @var string The boundary level of this override (See BoundaryLevel::* for a list of allowable values) + * @var string DEPRECATED - Date: 9/13/2018, Version: 18.10, Message: Please use `taxFormCode` instead. The legacy return name of the tax form to file. */ - public $boundaryLevel; + public $returnName; /** - * @var boolean True if this is a default boundary + * @var string Name or ISO 3166 code identifying the country that issued the tax form for this filing calendar. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. */ - public $isDefault; -} -/** - * Resource File Type Model - */ -class ResourceFileTypeModel -{ + public $formCountry; /** - * @var int The resource file type id + * @var string Name or ISO 3166 code identifying the region that issued the tax form for this filing calendar. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. */ - public $resourceFileTypeId; + public $formRegion; /** - * @var string The name of the file type + * @var string The Avalara standard tax form code of the tax form for this filing calendar. The first two characters of the tax form code are the ISO 3166 country code of the country that issued this form. */ - public $name; -} -/** - * Rate type Model - */ -class RateTypeModel -{ + public $taxFormCode; /** - * @var string The unique ID number of this rate type. + * @var int The start period of a fiscal year for this form/company */ - public $id; + public $fiscalYearStartMonth; /** - * @var string Description of this rate type. + * @var string If this calendar is for a location-specific tax return, specify the location code here. To file for all locations, leave this value NULL. */ - public $description; + public $locationCode; /** - * @var string Country code for this rate type + * @var string If this calendar is for a location-specific tax return, specify the location-specific behavior here. (See OutletTypeId::* for a list of allowable values) */ - public $country; -} -/** - * Represents information about a tax form known to Avalara - */ -class FormMasterModel -{ + public $outletTypeId; /** - * @var int Unique ID number of this form master object + * @var string Specify the ISO 4217 currency code for the currency to remit for this tax return. For all tax returns in the United States, specify "USD". */ - public $id; + public $paymentCurrency; /** - * @var int The type of the form being submitted + * @var string The frequency on which this tax form is filed. (See FilingFrequencyId::* for a list of allowable values) */ - public $formTypeId; + public $filingFrequencyId; /** - * @var string Unique tax form code representing this tax form + * @var int A 16-bit bitmap containing a 1 for each month when the return should be filed. */ - public $taxFormCode; + public $months; /** - * @var string Legacy return name as known in the AvaFileForm table + * @var string Tax Registration ID for this Region - in the U.S., this is for your state. */ - public $legacyReturnName; + public $stateRegistrationId; /** - * @var string Human readable form summary name + * @var string Tax Registration ID for the local jurisdiction, if any. */ - public $taxFormName; + public $localRegistrationId; /** - * @var string Description of this tax form + * @var string The Employer Identification Number or Taxpayer Identification Number that is to be used when filing this return. */ - public $description; + public $employerIdentificationNumber; /** - * @var boolean True if this form is available for use + * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The first line of the mailing address that will be used when filling out this tax return. */ - public $isEffective; + public $line1; /** - * @var string ISO 3166 code of the country that issued this tax form + * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The second line of the mailing address that will be used when filling out this tax return. Please note that some tax forms do not support multiple address lines. */ - public $country; + public $line2; /** - * @var string The region within which this form was issued + * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The city name of the mailing address that will be used when filling out this tax return. */ - public $region; + public $city; /** - * @var string Tax authority that issued the form + * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The state, region, or province of the mailing address that will be used when filling out this tax return. */ - public $authorityName; + public $region; /** - * @var string DEPRECATED + * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The postal code or zip code of the mailing address that will be used when filling out this tax return. */ - public $shortCode; + public $postalCode; /** - * @var int Day of the month when the form is due + * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The two character ISO-3166 country code of the mailing address that will be used when filling out this tax return. */ - public $dueDay; + public $country; /** - * @var int Day of the month on which the form is considered delinquent. Almost always the same as DueDay + * @var string The first line of the mailing address that will be used when filling out this tax return. */ - public $delinquentDay; + public $mailingAddressLine1; /** - * @var int Month of the year the state considers as the first fiscal month + * @var string The second line of the mailing address that will be used when filling out this tax return. Please note that some tax forms do not support multiple address lines. */ - public $fiscalYearStartMonth; + public $mailingAddressLine2; /** - * @var boolean Can form support multi frequencies + * @var string The city name of the mailing address that will be used when filling out this tax return. */ - public $hasMultiFrequencies; + public $mailingAddressCity; /** - * @var boolean Does this tax authority require a power of attorney in order to speak to Avalara + * @var string Name or ISO 3166 code identifying the region of the mailing address that will be used when filling out this tax return. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. */ - public $isPOARequired; + public $mailingAddressRegion; /** - * @var boolean True if this form requires that the customer register with the authority + * @var string The postal code or zip code of the mailing address that will be used when filling out this tax return. */ - public $isRegistrationRequired; + public $mailingAddressPostalCode; /** - * @var boolean Unused + * @var string Name or ISO 3166 code identifying the country of the mailing address that will be used when filling out this tax return. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. */ - public $hasMultiRegistrationMethods; + public $mailingAddressCountry; /** - * @var boolean Unused + * @var string The phone number to be used when filing this return. */ - public $hasSchedules; + public $phone; /** - * @var boolean Unused + * @var string Special filing instructions to be used when filing this return. Please note that requesting special filing instructions may incur additional costs. */ - public $hasMultiFilingMethods; + public $customerFilingInstructions; /** - * @var boolean Unused + * @var string The legal entity name to be used when filing this return. */ - public $hasMultiPayMethods; + public $legalEntityName; /** - * @var boolean Unused + * @var string The earliest date for the tax period when this return should be filed. This date specifies the earliest date for tax transactions that should be reported on this filing calendar. Please note that tax is usually filed one month in arrears: for example, tax for January transactions is typically filed during the month of February. */ - public $isEFTRequired; + public $effectiveDate; /** - * @var boolean Unused + * @var string The last date for the tax period when this return should be filed. This date specifies the last date for tax transactions that should be reported on this filing calendar. Please note that tax is usually filed one month in arrears: for example, tax for January transactions is typically filed during the month of February. */ - public $isFilePayMethodLinked; + public $endDate; /** - * @var int Unused + * @var string The method to be used when filing this return. (See FilingTypeId::* for a list of allowable values) */ - public $mailingReceivedRuleId; + public $filingTypeId; /** - * @var int Unused + * @var string If you file electronically, this is the username you use to log in to the tax authority's website. */ - public $proofOfMailingId; + public $eFileUsername; /** - * @var boolean True if you can report a negative amount in a single jurisdiction on the form + * @var string If you file electronically, this is the password or pass code you use to log in to the tax authority's website. */ - public $isNegAmountAllowed; + public $eFilePassword; /** - * @var boolean True if the form overall can go negative + * @var int If you are required to prepay a percentage of taxes for future periods, please specify the percentage in whole numbers; for example, the value 90 would indicate 90%. */ - public $allowNegativeOverallTax; + public $prepayPercentage; /** - * @var boolean Unused + * @var boolean Determines if a prepayment is required for this filing calendar */ - public $isNettingRequired; + public $prePaymentRequired; /** - * @var int Unused + * @var float If your company is required to make a prepayment that is designated by a fixed amount each period, please specify the amount here. */ - public $roundingMethodId; + public $fixedPrepaymentAmount; /** - * @var float Total amount of discounts that can be received by a vendor each year + * @var string The type of tax to report on this return. (See MatchingTaxType::* for a list of allowable values) */ - public $vendorDiscountAnnualMax; + public $taxTypeId; /** - * @var boolean Unused + * @var string Internal filing notes. */ - public $versionsRequireAuthorityApproval; + public $internalNotes; /** - * @var int Type of outlet reporting for this form + * @var string Custom filing information field for Alabama. */ - public $outletReportingMethodId; + public $alSignOn; /** - * @var boolean Unused + * @var string Custom filing information field for Alabama. */ - public $hasReportingCodes; + public $alAccessCode; /** - * @var boolean Not sure if used + * @var string Custom filing information field for Maine. */ - public $hasPrepayments; + public $meBusinessCode; /** - * @var boolean Unused + * @var string Custom filing information field for Iowa. */ - public $grossIncludesInterstateSales; + public $iaBen; /** - * @var string Unused + * @var string Custom filing information field for Connecticut. */ - public $grossIncludesTax; + public $ctReg; /** - * @var boolean Unused + * @var string Custom filing information field. Leave blank. */ - public $hasEfileFee; + public $other1Name; /** - * @var boolean Unused + * @var string Custom filing information field. Leave blank. */ - public $hasEpayFee; + public $other1Value; /** - * @var boolean Unused + * @var string Custom filing information field. Leave blank. */ - public $hasDependencies; + public $other2Name; /** - * @var string Unused + * @var string Custom filing information field. Leave blank. */ - public $requiredEfileTrigger; + public $other2Value; /** - * @var string Unused + * @var string Custom filing information field. Leave blank. */ - public $requiredEftTrigger; + public $other3Name; /** - * @var boolean Unused + * @var string Custom filing information field. Leave blank. */ - public $vendorDiscountEfile; + public $other3Value; /** - * @var boolean Unused + * @var int The unique ID of the tax authority of this return. */ - public $vendorDiscountPaper; + public $taxAuthorityId; /** - * @var string Unused + * @var string The name of the tax authority of this return. */ - public $peerReviewed; + public $taxAuthorityName; /** - * @var string Unused + * @var string The type description of the tax authority of this return. */ - public $peerReviewedId; + public $taxAuthorityType; /** - * @var string Unused + * @var string The date when this record was created. */ - public $peerReviewedDate; + public $createdDate; /** - * @var int ID of the Avalara user who created the form + * @var int The User ID of the user who created this record. */ public $createdUserId; /** - * @var string Date when form was created + * @var string The date/time when this record was last modified. */ - public $createdDate; + public $modifiedDate; /** - * @var int ID of the Avalara user who modified the form + * @var int The user ID of the user who last modified this record. */ public $modifiedUserId; /** - * @var string Date when form was modified + * @var string User name of bulk account. */ - public $modifiedDate; + public $bulkAccountId; /** - * @var string Mailing address of the department of revenue + * @var string The bulk account site code. */ - public $dorAddressMailTo; + public $siteCode; /** - * @var string Mailing address of the department of revenue + * @var string The status of the bulk account's validation. (See BulkAccountValidationStatus::* for a list of allowable values) */ - public $dorAddress1; + public $bulkAccountValidationStatus; /** - * @var string Mailing address of the department of revenue + * @var CompanyReturnSettingModel[] CompanyReturn settings for complext filing calendar */ - public $dorAddress2; + public $settings; +} +/** + * Represents a complex query request to parse using query filter guidelines from Microsoft REST standards + */ +class QueryRequestModel +{ /** - * @var string Mailing address of the department of revenue + * @var string A list of conditions to filter objects. */ - public $dorAddressCity; + public $filter; /** - * @var string Mailing address of the department of revenue + * @var string A list of included commands for this fetch operation. */ - public $dorAddressRegion; + public $include; /** - * @var string Mailing address of the department of revenue + * @var int For pagination: This is the maximum number of results to return. */ - public $dorAddressPostalCode; + public $maxResults; /** - * @var string Mailing address of the department of revenue + * @var int For pagination: This is the index of the first result. */ - public $dorAddressCountry; + public $startIndex; /** - * @var string Mailing address to use when a zero dollar form is filed + * @var string Sorts the resulting objects in a specific manner. */ - public $zeroAddressMailTo; + public $sortBy; +} +/** + * Model with options for adding a new filing calendar + */ +class CycleAddOptionModel +{ /** - * @var string Mailing address to use when a zero dollar form is filed + * @var boolean True if this form can be added and filed for the current cycle. "Current cycle" is considered one month before the month of today's date. */ - public $zeroAddress1; + public $available; /** - * @var string Mailing address to use when a zero dollar form is filed + * @var string The period start date for the customer's first transaction in the jurisdiction being added */ - public $zeroAddress2; + public $transactionalPeriodStart; /** - * @var string Mailing address to use when a zero dollar form is filed + * @var string The period end date for the customer's last transaction in the jurisdiction being added */ - public $zeroAddressCity; + public $transactionalPeriodEnd; /** - * @var string Mailing address to use when a zero dollar form is filed + * @var string The jurisdiction-assigned due date for the form */ - public $zeroAddressRegion; + public $filingDueDate; /** - * @var string Mailing address to use when a zero dollar form is filed + * @var string A descriptive name of the cycle and due date of form. */ - public $zeroAddressPostalCode; + public $cycleName; /** - * @var string Mailing address to use when a zero dollar form is filed + * @var string The filing frequency of the form */ - public $zeroAddressCountry; + public $frequencyName; /** - * @var string Mailing address to use when filing an amended return + * @var string A code assigned to the filing frequency */ - public $amendedAddressMailTo; + public $filingFrequencyCode; /** - * @var string Mailing address to use when filing an amended return + * @var string The filing frequency of the request (See FilingFrequencyId::* for a list of allowable values) */ - public $amendedAddress1; + public $filingFrequencyId; /** - * @var string Mailing address to use when filing an amended return + * @var string An explanation for why this form cannot be added for the current cycle */ - public $amendedAddress2; + public $cycleUnavailableReason; /** - * @var string Mailing address to use when filing an amended return + * @var string[] A list of outlet codes that can be assigned to this form for the current cycle */ - public $amendedAddressCity; + public $availableLocationCodes; +} +/** + * Options for expiring a filing calendar. + */ +class CycleExpireOptionModel +{ /** - * @var string Mailing address to use when filing an amended return + * @var string The period start date for the customer's first transaction in the jurisdiction being expired. */ - public $amendedAddressRegion; + public $transactionalPeriodStart; /** - * @var string Mailing address to use when filing an amended return + * @var string The period end date for the customer's last transaction in the jurisdiction being expired. */ - public $amendedAddressPostalCode; + public $transactionalPeriodEnd; /** - * @var string Mailing address to use when filing an amended return + * @var string The jurisdiction-assigned due date for the form. */ - public $amendedAddressCountry; + public $filingDueDate; /** - * @var boolean Unused + * @var string A descriptive name of the cycle and due date of the form. */ - public $onlineBackFiling; + public $cycleName; +} +/** + * Cycle Safe Expiration results. + */ +class CycleExpireModel +{ /** - * @var boolean Unused + * @var boolean Whether or not the filing calendar can be expired. e.g. if user makes end date of a calendar earlier than latest filing, this would be set to false. */ - public $onlineAmendedReturns; + public $success; /** - * @var string --Need Further Clarification + * @var string The message to present to the user if expiration is successful or unsuccessful. */ - public $prepaymentFrequency; + public $message; /** - * @var boolean Unused + * @var CycleExpireOptionModel[] A list of options for expiring the filing calendar. */ - public $outletLocationIdentifiersRequired; + public $cycleExpirationOptions; +} +/** + * An edit to be made on a filing calendar. + */ +class FilingCalendarEditModel +{ /** - * @var string --Need Further Clarification + * @var string The name of the field to be modified. */ - public $listingSortOrder; + public $fieldName; /** - * @var string Link to the state department of revenue website, if available + * @var int The unique ID of the filing calendar question. "Filing calendar question" is the wording displayed to users for a given field. */ - public $dorWebsite; + public $questionId; /** - * @var boolean --Need Further Clarification + * @var object The current value of the field. */ - public $fileForAllOutlets; + public $oldValue; /** - * @var boolean --Need Further Clarification + * @var object The new/proposed value of the field. */ - public $paperFormsDoNotHaveDiscounts; + public $newValue; +} +/** + * Model with options for actual filing calendar output based on user edits to filing calendar. + */ +class CycleEditOptionModel +{ /** - * @var boolean Internal behavior + * @var boolean Whether or not changes can be made to the filing calendar. */ - public $stackAggregation; + public $success; /** - * @var string --Need Further Clarification + * @var string The message to present to the user when calendar is successfully or unsuccessfully changed. */ - public $roundingPrecision; + public $message; /** - * @var string --Need Further Clarification + * @var boolean Whether or not the user should be warned of a change, because some changes are risky and may be being done not in accordance with jurisdiction rules. For example, user would be warned if user changes filing frequency to new frequency with a start date during an accrual month of the existing frequency. */ - public $inconsistencyTolerance; + public $customerMustApprove; /** - * @var string Date when this form became effective + * @var boolean True if the filing calendar must be cloned to allow this change; false if the existing filing calendar can be changed itself. */ - public $effDate; + public $mustCloneFilingCalendar; /** - * @var string Date when this form expired + * @var string The effective date of the filing calendar (only applies if cloning). */ - public $endDate; + public $clonedCalendarEffDate; /** - * @var boolean True if this form can be shown to customers + * @var string The expired end date of the old filing calendar (only applies if cloning). */ - public $visibleToCustomers; + public $expiredCalendarEndDate; +} +/** + * Filing Calendar Edit + */ +class CycleSafeFilingCalendarEditModel +{ /** - * @var boolean True if this form requires that you set up outlets in the state + * @var string Field To Edit */ - public $requiresOutletSetup; + public $fieldName; /** - * @var boolean True if this state permits payment by ACH Credit + * @var string Destination is used to identify filing questions' type Other or Settings. */ - public $achCreditAllowed; + public $destination; /** - * @var string Jurisdiction level of the state + * @var int Question */ - public $reportLevel; + public $questionId; /** - * @var boolean True if this form is verified filed via email + * @var string The filing question code. */ - public $postOfficeValidated; + public $questionCode; /** - * @var string Internal Avalara flag + * @var object Old Value */ - public $stackAggregationOption; + public $oldValue; /** - * @var string Internal Avalara flag + * @var object New Value */ - public $sstBehavior; + public $newValue; +} +/** + * Options for expiring a filing calendar. + */ +class CycleSafeEditRequestModel +{ /** - * @var string Internal Avalara flag + * @var int Company Identifier */ - public $nonSstBehavior; + public $companyId; /** - * @var string Phone number of the department of revenue + * @var string Tax Form Code */ - public $dorPhoneNumber; + public $taxFormCode; /** - * @var string Unused + * @var int Filing Calendar Identifier + */ + public $filingCalendarId; + /** + * @var CycleSafeFilingCalendarEditModel[] Filing calendar edits */ - public $averageCheckClearDays; + public $edits; +} +/** + * Available Cycle object + */ +class AvailableCycleModel +{ /** - * @var boolean Unused + * @var string Transactional Period Start */ - public $filterZeroRatedLineDetails; + public $transactionalPeriodStart; /** - * @var boolean Unused + * @var string Transactional Period End */ - public $allowsBulkFilingAccounts; + public $transactionalPeriodEnd; /** - * @var string Unused + * @var string Filing Due Date */ - public $bulkAccountInstructionLink; + public $filingDueDate; /** - * @var string Unused + * @var string Cycle Name */ - public $registrationIdFormat; + public $cycleName; +} +/** + * Frequency Available object + */ +class FrequencyAvailableModel +{ /** - * @var string Unused + * @var string Frequency Code */ - public $thresholdTrigger; + public $frequencyCode; /** - * @var string Unused + * @var string Frequency Name */ - public $transactionSortingOption; + public $frequencyName; /** - * @var int Unused + * @var string Reason */ - public $contentReviewFrequencyId; + public $reason; /** - * @var string Unused + * @var AvailableCycleModel[] Expired Calendar End Date */ - public $aliasForFormMasterId; + public $availableCycles; } /** - * Represents a tax type group + * CycleSafe Option Result */ -class TaxTypeGroupModel +class CycleSafeOptionResultModel { /** - * @var int The unique ID number of this tax type group. - */ - public $id; - /** - * @var string The unique human readable Id of this tax type group. + * @var string Tax Form Code */ - public $taxTypeGroup; + public $taxFormCode; /** - * @var string The description of this tax type group. + * @var boolean Boolean if the Filing Calendar must be cloned */ - public $description; + public $mustCloneFilingCalendar; /** - * @var int If this tax type group requires a subscription, this contains the ID number of the subscription type required to use it. + * @var string Cloned Calendar Effective Date */ - public $subscriptionTypeId; + public $clonedCalendarEffDate; /** - * @var string If this tax type group requires a subscription, this contains the friendly name of the subscription type required to use it. + * @var string Expired Calendar End Date */ - public $subscriptionDescription; + public $expiredCalendarEndDate; /** - * @var string The name of the tab in the AvaTax website corresponding to this tax type group. + * @var FrequencyAvailableModel[] Frequencies Available */ - public $tabName; + public $frequenciesAvailable; +} +/** + * + */ +class FilingAnswerModel +{ /** - * @var boolean True if this tax type group is displayed in the user interface of the AvaTax website. + * @var int The ID number for a filing question */ - public $showColumn; + public $filingQuestionId; /** - * @var int The order this record is being returned in the response + * @var object The value of the answer for the filing question identified by filingQuestionId */ - public $displaySequence; + public $answer; } /** - * Represents a tax subtype + * Represents a commitment to file a tax return on a recurring basis. + * Only used if you subscribe to Avalara Returns. */ -class TaxSubTypeModel +class FilingRequestDataModel { /** - * @var int The unique ID number of this tax sub-type. + * @var int The company return ID if requesting an update. */ - public $id; + public $companyReturnId; /** - * @var string The unique human readable Id of this tax sub-type. + * @var string DEPRECATED - Date: 9/13/2018, Version: 18.10, Message: Please use `taxFormCode` instead. The legacy return name of the requested calendar. */ - public $taxSubType; + public $returnName; /** - * @var string The description of this tax sub-type. + * @var string The Avalara standard tax form code of the tax form for this filing calendar. The first two characters of the tax form code are the ISO 3166 country code of the country that issued this form. */ - public $description; + public $taxFormCode; /** - * @var string The upper level group of tax types. + * @var string The filing frequency of the request (See FilingFrequencyId::* for a list of allowable values) */ - public $taxTypeGroup; -} -/** - * Represents a group of tax types - */ -class NexusTaxTypeGroupModel -{ + public $filingFrequencyId; /** - * @var int The unique ID number of this nexus tax type group. + * @var string State registration ID of the company requesting the filing calendar. */ - public $id; + public $registrationId; /** - * @var string The unique human readable Id of this nexus tax type group. + * @var int The months of the request */ - public $nexusTaxTypeGroupId; + public $months; /** - * @var string The description of this nexus tax type group. + * @var int The start period of a fiscal year for this form/company */ - public $description; + public $fiscalYearStartMonth; /** - * @var int If this tax type group requires a subscription, this contains the ID number of the subscription type required to use it. + * @var string The type of tax to report on this return. (See MatchingTaxType::* for a list of allowable values) */ - public $subscriptionTypeId; + public $taxTypeId; /** - * @var string If this tax type group requires a subscription, this contains the friendly name of the subscription type required to use it. + * @var string Location code of the request */ - public $subscriptionDescription; + public $locationCode; /** - * @var string The name of the tab in the AvaTax website corresponding to this tax type group. + * @var string Filing cycle effective date of the request */ - public $tabName; + public $effDate; /** - * @var boolean True if this tax type group is displayed in the user interface of the AvaTax website. + * @var string Filing cycle end date of the request */ - public $showColumn; -} -/** - * Represents a transaction/service type pair for telecommunications tax - */ -class CommunicationsTSPairModel -{ + public $endDate; /** - * @var int The numeric Id of the transaction type. + * @var boolean Flag if the request is a clone of a current filing calendar */ - public $transactionTypeId; + public $isClone; /** - * @var int The numeric Id of the service type. + * @var string The two character ISO 3166 country code of the country that issued the tax form for this filing calendar. */ - public $serviceTypeId; + public $country; /** - * @var string The name of the transaction type. + * @var string The two or three character ISO 3166 code of the region / state / province that issued the tax form for this filing calendar. */ - public $AvaTax_Communications_TransactionType; + public $region; /** - * @var string The name of the service type. + * @var int The tax authority id of the return */ - public $AvaTax_Communications_ServiceType; + public $taxAuthorityId; /** - * @var string The description of the transaction/service type pair. + * @var string The tax authority name on the return */ - public $description; + public $taxAuthorityName; /** - * @var string[] List of the parameters (among Charge, Minutes and Lines) that will be used for calculation for this T/S pair. + * @var FilingAnswerModel[] Filing question answers */ - public $requiredParameters; + public $answers; } /** - * Represents information about a type of telecommunications transaction + * Represents a commitment to file a tax return on a recurring basis. + * Only used if you subscribe to Avalara Returns. */ -class CommunicationsTransactionTypeModel +class FilingRequestModel { /** - * @var int The numeric Id of the transaction type. + * @var int The unique ID number of this filing request. */ - public $transactionTypeId; + public $id; /** - * @var string The name of the transaction type. + * @var int The unique ID number of the company to which this filing request belongs. */ - public $AvaTax_Communications_TransactionType; -} -/** - * The "Unit of Measurement" model captures information about a type of measurement. Types of measurement refer to - * different scales for the same dimension. For example, measurements of type "Distance" may include units of measurement - * such as meters, feet, inches, and miles. - */ -class UomModel -{ + public $companyId; /** - * @var int The unique ID number of this unit of measurement. + * @var string The current status of this request (See FilingRequestStatus::* for a list of allowable values) */ - public $id; + public $filingRequestStatusId; /** - * @var string The code that refers to this unit of measurement. + * @var FilingRequestDataModel The data model object of the request */ - public $code; + public $data; /** - * @var string A short description of this unit of measurement. + * @var string The date when this record was created. */ - public $shortDesc; + public $createdDate; /** - * @var string A longer description of this unit of measurement. + * @var int The User ID of the user who created this record. */ - public $description; + public $createdUserId; /** - * @var int The ID number of the measurement type, such as "Distance" or "Mass". + * @var string The date/time when this record was last modified. */ - public $measurementTypeId; + public $modifiedDate; /** - * @var string The code describing the measurement type. + * @var int The user ID of the user who last modified this record. */ - public $measurementTypeCode; + public $modifiedUserId; +} +/** + * This is the output model coming from skyscraper services + */ +class LoginVerificationOutputModel +{ /** - * @var string For a particular measurement type, this is the ID number of the unit of measurement object corresponding to the International System of Units (abbreviated SI) unit of measurement standard. This pointer allows you to select the SI unit of measurement for a particular measurement type. + * @var int The job Id returned from skyscraper */ - public $siUOM; + public $jobId; /** - * @var string A description of the measurement type system. + * @var string The operation status of the job */ - public $measurementTypeDescription; + public $operationStatus; /** - * @var boolean True if this measurement is an International System of Units (abbreviated SI) defined standard. + * @var string The message returned from the job */ - public $isSiUom; + public $message; + /** + * @var boolean Indicates if the login was successful + */ + public $loginSuccess; } /** - * Describes an element in the harmonized tariff system. - * - * According to the [United States International Trade Commission](https://www.usitc.gov), the harmonized tariff schedule is defined as follows: - * - * The HTS is a U.S. nomenclature system used to classify traded goods based on their material composition, product name, and/or intended - * function. The HTS is designed so that each article falls into only one category. It is divided into chapters, each of which has a 2-digit - * number. Each product category within the various chapters is designated by 4, 6, 8, or 10 digits. The 4-digit categories are called - * "headings." The 6-, 8- and 10-digit classifications are called "subheadings." - * - * Within AvaTax, the `HsCodeModel` object can refer to sections, chapters, headings, subheadings, or articles. Each object represents one - * classification. Many of these objects have child objects underneath them; these child objects are more specific than their parent objects. + * Represents a verification request using Skyscraper for a company */ -class HsCodeModel +class LoginVerificationInputModel { /** - * @var string The harmonized tariff system code for this section and chapter. A full HS code contains more than six characters. Partial HS codes with two, four, or six characters may have child codes underneath them. A child code is one that contains greater specificity than a parent code. It is recommended that when you identify a product you use the most detailed code available to identify it. Top level sections do not have HS Codes. + * @var int CompanyId that we are verifying the login information for + */ + public $companyId; + /** + * @var int AccountId of the login verification */ - public $hsCode; + public $accountId; /** - * @var int A unique identifier for this harmonized tariff system code. To search for a list of child codes underneath a specific HS code, search for codes where the child's `parentHsCodeId` value matches the parent's `id` value. + * @var string Region of the verification request */ - public $id; + public $region; /** - * @var int The unique ID number of the parent HS code or HS code prefix. To search for a list of child codes underneath a specific HS code, search for codes where the child's `parentHsCodeId` value matches the parent's `id` value. + * @var string TaxFormCode for the verification request */ - public $parentHsCodeId; + public $taxFormCode; /** - * @var string A human readable description that identifies Code descriptive text for this Section, Chapter, Heading, or Subheading. + * @var string Username that we are using for verification */ - public $description; + public $username; /** - * @var string The system to which this HS code belongs. + * @var string Password we are using for verification */ - public $system; + public $password; /** - * @var string The destination country identified with this HS Code. This value applies when certain products are classified in specific ways by bilateral trade agreements. + * @var object Additional options of the verification */ - public $destinationCountry; + public $additionalOptions; /** - * @var string For codes that have been expired or defined on specific dates, this value indicates the earliest date for which this code is considered valid. If this value is null, this code can be used for any valid date earlier than its end date. + * @var int Bulk Request Id of the verification */ - public $effDate; + public $bulkRequestId; /** - * @var string For codes that have been expired or defined on specific dates, this value indicates the latest date for which this code is considered valid. If this value is null, this code can be used for any valid date later than its effective date. + * @var int Priority of the verification request */ - public $endDate; + public $priority; } /** - * Represents a PostalCode and its associated data like: country, region, effective dates, etc. + * Represents everything downloaded from resource files */ -class PostalCodeModel +class ResourceFileDownloadResult { /** - * @var string Country this PostalCode locates in - */ - public $country; - /** - * @var string The Region/State/Province this PostalCode locates in - */ - public $region; - /** - * @var int An Avalara assigned TaxRegion Id associated to the PostalCode + * @var boolean True if this download succeeded */ - public $taxRegionId; + public $success; /** - * @var string The date when the PostalCode becomes effective + * @var string Bytes of the file (This value is encoded as a Base64 string) */ - public $effDate; + public $bytes; /** - * @var string The date when the PostalCode becomes expired + * @var string Original filename */ - public $endDate; + public $filename; /** - * @var string The postalCode + * @var string Mime content type */ - public $postalCode; + public $contentType; } /** - * Marketplace Location Output model + * Response when checking if a company has a POA on file with Avalara */ -class MarketplaceLocationModel +class PowerOfAttorneyCheckModel { /** - * @var string Marketplace Location State + * @var int companyId of the request */ - public $region; + public $companyId; /** - * @var string Marketplace Location Country + * @var string Country POA is for */ public $country; /** - * @var string Marketplace Location Id - */ - public $marketplaceId; - /** - * @var string Marketplace Location + * @var string Region POA is for */ - public $marketplace; + public $region; /** - * @var string Marketplace Location Adoption Date + * @var boolean Notes if there is an actice POA */ - public $marketplaceAdoptionDate; + public $activePoa; /** - * @var string Marketplace Location End Date + * @var string Effective Date of the POA */ - public $marketplaceEndDate; + public $effectiveDate; /** - * @var string Marketplace Location Legislative Effective Date + * @var string End Date of POA */ - public $legislativeEffectiveDate; + public $expirationDate; /** - * @var string Marketplace Location Enforcement Date + * @var ResourceFileDownloadResult POA download */ - public $enforcementDate; + public $availablePoa; +} +/** + * An attachment associated with a filing return + */ +class FilingAttachmentModel +{ /** - * @var string Marketplace Location Created Date + * @var int The resourceFileId used to retrieve the attachment */ - public $createdDate; + public $resourceFileId; /** - * @var string Marketplace Location Modified Date + * @var string The description of the attachment */ - public $modifiedDate; + public $description; } /** - * A company-distance-threshold model indicates the distance between a company - * and the taxing borders of various countries. Distance thresholds are necessary - * to correctly calculate some value-added taxes. - * - * Distance thresholds only apply to sales of goods in certain countries. A distance threshold - * is applied for each ship-from/ship-to combination of countries. The threshold amount is defined by - * the ship-to country. - * - * Generally, if you have exceeded a distance threshold for taxes between a pair of countries, your tax calculation - * will be determined to be the rate in the destination country. If you have not exceeded the threshold, - * your tax calculation will be determined to be the rate in the origin country. - * - * The amount of a threshold is not tracked or managed in AvaTax, but the decision of your tax compliance department - * as to whether you have exceeded this threshold is maintained in this object. - * - * By default, you are considered to have exceeded tax thresholds. If you wish to change this default, you can create - * a company-distance-threshold object to select the correct behavior for this origin/destination tax calculation process. + * Filing Returns Model */ -class CompanyDistanceThresholdModel +class FilingReturnModelBasic { /** - * @var int A unique ID number representing this distance threshold object. + * @var int The unique ID number of the company filing return. + */ + public $companyId; + /** + * @var int The unique ID number of this filing return. */ public $id; /** - * @var int The ID number of the company that defined this distance threshold. + * @var int The filing id that this return belongs too */ - public $companyId; + public $filingId; /** - * @var string The origin country for this threshold. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. + * @var int The resourceFileId of the return */ - public $originCountry; + public $resourceFileId; /** - * @var string The destination country for this threshold. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. + * @var int The region id that this return belongs too */ - public $destinationCountry; + public $filingRegionId; /** - * @var string For distance threshold values that change over time, this is the earliest date for which this distance threshold is valid. If null, this distance threshold is valid for all dates earlier than the `endDate` field. + * @var int The unique ID number of the filing calendar associated with this return. */ - public $effDate; + public $filingCalendarId; /** - * @var string For distance threshold values that change over time, this is the latest date for which this distance threshold is valid. If null, this distance threshold is valid for all dates later than the `effDate` field. + * @var string The country of the form. */ - public $endDate; + public $country; /** - * @var boolean True if your tax professional has determined that the value-added tax distance threshold is exceeded for this pair of countries. If you set this value to `false`, your value added taxes will be calculated using the origin country. Otherwise, value added taxes will be calculated on the destination country. + * @var string The region of the form. */ - public $thresholdExceeded; + public $region; /** - * @var string Indicates the distance threshold type. This value can be either `Sale` or `Purchase`. + * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $type; -} -/** - * A model used to initialize a new CertCapture eCommerce token. - */ -class CreateECommerceTokenInputModel -{ + public $endPeriodMonth; /** - * @var string The customer's number that the token will be issued for. + * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $customerNumber; -} -/** - * The resource model returned by the ECommerceTokenController's endpoints. - */ -class ECommerceTokenOutputModel -{ + public $endPeriodYear; /** - * @var string The JWT token that authorizes the gencert tool to operate. + * @var string The current status of the filing return. (See FilingStatusId::* for a list of allowable values) */ - public $token; + public $status; /** - * @var int[] The list of clients that the token is valid for. + * @var string The filing frequency of the return. (See FilingFrequencyId::* for a list of allowable values) */ - public $clientIds; + public $filingFrequency; /** - * @var string The date the token was created. + * @var string The date the return was filed by Avalara. */ - public $createdDate; + public $filedDate; /** - * @var string The date that the token will expire. + * @var float The sales amount. */ - public $expirationDate; -} -/** - * A model used to request the refresh of a CertCapture eCommerce token. - */ -class RefreshECommerceTokenInputModel -{ + public $salesAmount; /** - * @var string The token that requires its expiration to be extended. + * @var string The filing type of the return. (See FilingTypeId::* for a list of allowable values) */ - public $token; -} -/** - * Error Transaction Model - */ -class ErrorTransactionOutputModel -{ + public $filingType; /** - * @var string Error code of the error result from transaction creation + * @var string The name of the form. */ - public $errorCode; + public $formName; /** - * @var string Error message of the error result from transaction creation + * @var float The remittance amount of the return. */ - public $errorMessage; + public $remitAmount; /** - * @var string The full JSON of the error result from transaction creation + * @var string The unique code of the form. */ - public $avataxErrorJson; + public $formCode; /** - * @var string The full JSON of the transaction creation request + * @var string A description for the return. */ - public $avataxCreateTransactionJson; + public $description; /** - * @var string The datasource instance that made the transaction creation call + * @var float The taxable amount. */ - public $datasource; + public $taxableAmount; /** - * @var string The date of the document + * @var float The tax amount. */ - public $documentDate; + public $taxAmount; /** - * @var string The date that this ErrorTransaction will be automatically purged from the detabase. + * @var float The amount collected by avalara for this return */ - public $expiresAt; + public $collectAmount; /** - * @var float The amount of the transaction. + * @var float The tax due amount. */ - public $amount; + public $taxDueAmount; /** - * @var string The Datasource source of the transaction creation call. + * @var float The non-taxable amount. */ - public $datasourceSource; + public $nonTaxableAmount; /** - * @var string The country of the ship to address for the transaction creation call. + * @var float The non-taxable due amount. */ - public $shipToCountry; + public $nonTaxableDueAmount; + /** + * @var float Consumer use tax liability. + */ + public $consumerUseTaxAmount; /** - * @var string The region of the ship to address for the transaction creation call. + * @var float Consumer use non-taxable amount. */ - public $shipToRegion; + public $consumerUseNonTaxableAmount; /** - * @var string Type of transaction of the error transaction (See DocumentType::* for a list of allowable values) + * @var float Consumer use taxable amount. */ - public $documentType; + public $consumerUseTaxableAmount; /** - * @var string The internal reference code (used by the client application) of the error transaction + * @var float The amount of sales excluded from the liability calculation */ - public $documentCode; -} -/** - * - */ -class CappedFetchResult -{ + public $excludedSalesAmount; /** - * @var boolean + * @var float The amount of non-taxable sales excluded from the liability calculation */ - public $_isRecordsetCountCapped; + public $excludedNonTaxableAmount; /** - * @var int + * @var float The amount of tax excluded from the liability calculation */ - public $_recordsetCount; + public $excludedTaxAmount; /** - * @var object[] + * @var string Accrual type of the return (See AccrualType::* for a list of allowable values) */ - public $value; + public $accrualType; /** - * @var string + * @var FilingAttachmentModel[] The attachments for this return. */ - public $_nextLink; + public $attachments; /** - * @var string + * @var string The date when this record was created. */ - public $pageKey; -} -/** - * Base model class for single error transaction delete request - */ -class ErrorTransactionModelBase -{ + public $createdDate; /** - * @var string Type of transaction of the error transaction (See DocumentType::* for a list of allowable values) + * @var int The User ID of the user who created this record. */ - public $documentType; + public $createdUserId; /** - * @var string The internal reference code (used by the client application) of the error transaction + * @var string The date/time when this record was last modified. */ - public $documentCode; + public $modifiedDate; } /** - * Request model for when a user is deleting multiple error transaction + * Filing Returns Model */ -class DeleteErrorTransactionsRequestModel +class FiledReturnModel { /** - * @var ErrorTransactionModelBase[] List of error transactions to be deleted + * @var int The unique ID number of the company filing return. */ - public $models; -} -/** - * Response model of a single error transaction delete - */ -class DeleteErrorTransactionResponseModel -{ + public $companyId; /** - * @var string Result of the deletion (See AvataxDeleteErrorTransactionStatus::* for a list of allowable values) + * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $result; + public $endPeriodMonth; /** - * @var string Type of transaction of the error transaction (See DocumentType::* for a list of allowable values) + * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $documentType; + public $endPeriodYear; /** - * @var string The internal reference code (used by the client application) of the error transaction + * @var string The unique code of the form. */ - public $documentCode; + public $taxformCode; } /** - * Response model of error transaction batch delete + * A model for return adjustments. */ -class DeleteErrorTransactionsResponseModel +class FilingAdjustmentModel { /** - * @var DeleteErrorTransactionResponseModel[] The individual result of each error transaction in the request batch + * @var int The unique ID number for the adjustment. */ - public $results; -} -/** - * Model that has the matching count for an errorcode - */ -class ErrorCodeOutputModel -{ + public $id; /** - * @var string Name of the error code + * @var int The filing return id that this applies too */ - public $errorCode; + public $filingId; /** - * @var int Number of error code recorded + * @var float The adjustment amount. */ - public $count; -} -/** - * - */ -class CompanyReturnSettingModel -{ + public $amount; /** - * @var int The unique ID of this CompanyReturnsSetting + * @var string The filing period the adjustment is applied to. (See AdjustmentPeriodTypeId::* for a list of allowable values) */ - public $id; + public $period; /** - * @var int The CompanyReturn Id + * @var string The type of the adjustment. */ - public $companyReturnId; + public $type; /** - * @var int The TaxFormCatalog filingQuestionId. + * @var boolean Whether or not the adjustment has been calculated. */ - public $filingQuestionId; + public $isCalculated; /** - * @var string Filing question code as defined in TaxFormCatalog. + * @var string The account type of the adjustment. (See PaymentAccountTypeId::* for a list of allowable values) */ - public $filingQuestionCode; + public $accountType; /** - * @var string The value of this setting + * @var string A descriptive reason for creating this adjustment. */ - public $value; + public $reason; /** * @var string The date when this record was created. */ @@ -7489,657 +7826,620 @@ class CompanyReturnSettingModel public $modifiedUserId; } /** - * Represents a commitment to file a tax return on a recurring basis. - * Only used if you subscribe to Avalara Returns. + * A model for return augmentations. */ -class FilingCalendarModel +class FilingAugmentationModel { /** - * @var int The unique ID number of this filing calendar. + * @var int The unique ID number for the augmentation. */ public $id; /** - * @var int The unique ID number of the company to which this filing calendar belongs. - */ - public $companyId; - /** - * @var string DEPRECATED - Date: 9/13/2018, Version: 18.10, Message: Please use `taxFormCode` instead. The legacy return name of the tax form to file. - */ - public $returnName; - /** - * @var string Name or ISO 3166 code identifying the country that issued the tax form for this filing calendar. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. - */ - public $formCountry; - /** - * @var string Name or ISO 3166 code identifying the region that issued the tax form for this filing calendar. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. - */ - public $formRegion; - /** - * @var string The Avalara standard tax form code of the tax form for this filing calendar. The first two characters of the tax form code are the ISO 3166 country code of the country that issued this form. - */ - public $taxFormCode; - /** - * @var int The start period of a fiscal year for this form/company + * @var int The filing return id that this applies too */ - public $fiscalYearStartMonth; + public $filingId; /** - * @var string If this calendar is for a location-specific tax return, specify the location code here. To file for all locations, leave this value NULL. + * @var float The field amount. */ - public $locationCode; + public $fieldAmount; /** - * @var string If this calendar is for a location-specific tax return, specify the location-specific behavior here. (See OutletTypeId::* for a list of allowable values) + * @var string The field name. */ - public $outletTypeId; + public $fieldName; /** - * @var string Specify the ISO 4217 currency code for the currency to remit for this tax return. For all tax returns in the United States, specify "USD". + * @var string The date when this record was created. */ - public $paymentCurrency; + public $createdDate; /** - * @var string The frequency on which this tax form is filed. (See FilingFrequencyId::* for a list of allowable values) + * @var int The User ID of the user who created this record. */ - public $filingFrequencyId; + public $createdUserId; /** - * @var int A 16-bit bitmap containing a 1 for each month when the return should be filed. + * @var string The date/time when this record was last modified. */ - public $months; + public $modifiedDate; /** - * @var string Tax Registration ID for this Region - in the U.S., this is for your state. + * @var int The user ID of the user who last modified this record. */ - public $stateRegistrationId; + public $modifiedUserId; +} +/** + * A model for return payments. + */ +class FilingPaymentModel +{ /** - * @var string Tax Registration ID for the local jurisdiction, if any. + * @var int The unique ID number for the payment. */ - public $localRegistrationId; + public $id; /** - * @var string The Employer Identification Number or Taxpayer Identification Number that is to be used when filing this return. + * @var int The filing return id that this applies too */ - public $employerIdentificationNumber; + public $filingId; /** - * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The first line of the mailing address that will be used when filling out this tax return. + * @var float The payment amount. */ - public $line1; + public $paymentAmount; /** - * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The second line of the mailing address that will be used when filling out this tax return. Please note that some tax forms do not support multiple address lines. + * @var string The type of the payment. (See PaymentType::* for a list of allowable values) */ - public $line2; + public $type; /** - * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The city name of the mailing address that will be used when filling out this tax return. + * @var boolean Whether or not the payment has been calculated. */ - public $city; + public $isCalculated; /** - * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The state, region, or province of the mailing address that will be used when filling out this tax return. + * @var string The date when this record was created. */ - public $region; + public $createdDate; /** - * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The postal code or zip code of the mailing address that will be used when filling out this tax return. + * @var int The User ID of the user who created this record. */ - public $postalCode; + public $createdUserId; /** - * @var string DEPRECATED - Date: 9/1/2017, Version: 17.9, Message: Field will be no longer be available after the 17.9 release. The two character ISO-3166 country code of the mailing address that will be used when filling out this tax return. + * @var string The date/time when this record was last modified. */ - public $country; + public $modifiedDate; /** - * @var string The first line of the mailing address that will be used when filling out this tax return. + * @var int The user ID of the user who last modified this record. */ - public $mailingAddressLine1; + public $modifiedUserId; +} +/** + * + */ +class Message +{ /** - * @var string The second line of the mailing address that will be used when filling out this tax return. Please note that some tax forms do not support multiple address lines. + * @var string */ - public $mailingAddressLine2; + public $details; /** - * @var string The city name of the mailing address that will be used when filling out this tax return. + * @var string */ - public $mailingAddressCity; + public $helpLink; /** - * @var string Name or ISO 3166 code identifying the region of the mailing address that will be used when filling out this tax return. This field supports many different region identifiers: * Two and three character ISO 3166 region codes * Fully spelled out names of the region in ISO supported languages * Common alternative spellings for many regions For a full list of all supported codes and names, please see the Definitions API `ListRegions`. + * @var string */ - public $mailingAddressRegion; + public $name; /** - * @var string The postal code or zip code of the mailing address that will be used when filling out this tax return. + * @var string */ - public $mailingAddressPostalCode; + public $refersTo; /** - * @var string Name or ISO 3166 code identifying the country of the mailing address that will be used when filling out this tax return. This field supports many different country identifiers: * Two character ISO 3166 codes * Three character ISO 3166 codes * Fully spelled out names of the country in ISO supported languages * Common alternative spellings for many countries For a full list of all supported codes and names, please see the Definitions API `ListCountries`. + * @var string */ - public $mailingAddressCountry; + public $severity; /** - * @var string The phone number to be used when filing this return. + * @var string */ - public $phone; + public $source; /** - * @var string Special filing instructions to be used when filing this return. Please note that requesting special filing instructions may incur additional costs. + * @var string */ - public $customerFilingInstructions; + public $summary; +} +/** + * + */ +class WorksheetDocumentLine +{ /** - * @var string The legal entity name to be used when filing this return. + * @var string */ - public $legalEntityName; + public $reportingDate; /** - * @var string The earliest date for the tax period when this return should be filed. This date specifies the earliest date for tax transactions that should be reported on this filing calendar. Please note that tax is usually filed one month in arrears: for example, tax for January transactions is typically filed during the month of February. + * @var string */ - public $effectiveDate; + public $lineNo; /** - * @var string The last date for the tax period when this return should be filed. This date specifies the last date for tax transactions that should be reported on this filing calendar. Please note that tax is usually filed one month in arrears: for example, tax for January transactions is typically filed during the month of February. + * @var float */ - public $endDate; + public $lineAmount; /** - * @var string The method to be used when filing this return. (See FilingTypeId::* for a list of allowable values) + * @var float */ - public $filingTypeId; + public $exemptAmount; /** - * @var string If you file electronically, this is the username you use to log in to the tax authority's website. + * @var float */ - public $eFileUsername; + public $taxableAmount; /** - * @var string If you file electronically, this is the password or pass code you use to log in to the tax authority's website. + * @var float */ - public $eFilePassword; + public $taxAmount; /** - * @var int If you are required to prepay a percentage of taxes for future periods, please specify the percentage in whole numbers; for example, the value 90 would indicate 90%. + * @var Message[] */ - public $prepayPercentage; + public $messages; /** - * @var boolean Determines if a prepayment is required for this filing calendar + * @var string */ - public $prePaymentRequired; + public $resultCode; /** - * @var float If your company is required to make a prepayment that is designated by a fixed amount each period, please specify the amount here. + * @var string */ - public $fixedPrepaymentAmount; + public $transactionId; +} +/** + * + */ +class WorksheetDocument +{ /** - * @var string The type of tax to report on this return. (See MatchingTaxType::* for a list of allowable values) + * @var string */ - public $taxTypeId; + public $docCode; /** - * @var string Internal filing notes. + * @var string */ - public $internalNotes; + public $docDate; /** - * @var string Custom filing information field for Alabama. + * @var float */ - public $alSignOn; + public $totalExempt; /** - * @var string Custom filing information field for Alabama. + * @var float */ - public $alAccessCode; + public $totalTaxable; /** - * @var string Custom filing information field for Maine. + * @var float */ - public $meBusinessCode; + public $totalTax; /** - * @var string Custom filing information field for Iowa. + * @var WorksheetDocumentLine[] */ - public $iaBen; + public $lines; /** - * @var string Custom filing information field for Connecticut. + * @var Message[] */ - public $ctReg; + public $messages; /** - * @var string Custom filing information field. Leave blank. + * @var string */ - public $other1Name; + public $resultCode; /** - * @var string Custom filing information field. Leave blank. + * @var string */ - public $other1Value; + public $transactionId; +} +/** + * An attachment associated with a filing return + */ +class FilingReturnCreditModel +{ /** - * @var string Custom filing information field. Leave blank. + * @var float The resourceFileId used to retrieve the attachment */ - public $other2Name; + public $totalSales; /** - * @var string Custom filing information field. Leave blank. + * @var float The resourceFileId used to retrieve the attachment */ - public $other2Value; + public $totalExempt; /** - * @var string Custom filing information field. Leave blank. + * @var float The resourceFileId used to retrieve the attachment */ - public $other3Name; + public $totalTaxable; /** - * @var string Custom filing information field. Leave blank. + * @var float The resourceFileId used to retrieve the attachment */ - public $other3Value; + public $totalTax; /** - * @var int The unique ID of the tax authority of this return. + * @var WorksheetDocument[] The excluded carry over credit documents */ - public $taxAuthorityId; + public $transactionDetails; +} +/** + * Filing Returns Model + */ +class FilingReturnModel +{ /** - * @var string The name of the tax authority of this return. + * @var int The unique ID number of this filing return. */ - public $taxAuthorityName; + public $id; /** - * @var string The type description of the tax authority of this return. + * @var int The region id that this return belongs too */ - public $taxAuthorityType; + public $filingRegionId; /** - * @var string The date when this record was created. + * @var int The unique ID number of the filing calendar associated with this return. */ - public $createdDate; + public $filingCalendarId; /** - * @var int The User ID of the user who created this record. + * @var int The resourceFileId of the return. Will be null if not available. */ - public $createdUserId; + public $resourceFileId; /** - * @var string The date/time when this record was last modified. + * @var int Tax Authority ID of this return */ - public $modifiedDate; + public $taxAuthorityId; /** - * @var int The user ID of the user who last modified this record. + * @var string The current status of the filing return. (See FilingStatusId::* for a list of allowable values) */ - public $modifiedUserId; + public $status; /** - * @var string User name of bulk account. + * @var string The filing frequency of the return. (See FilingFrequencyId::* for a list of allowable values) */ - public $bulkAccountId; + public $filingFrequency; /** - * @var string The bulk account site code. + * @var string The date the return was filed by Avalara. */ - public $siteCode; + public $filedDate; /** - * @var string The status of the bulk account's validation. (See BulkAccountValidationStatus::* for a list of allowable values) + * @var string The start date of this return */ - public $bulkAccountValidationStatus; + public $startPeriod; /** - * @var CompanyReturnSettingModel[] CompanyReturn settings for complext filing calendar + * @var string The end date of this return */ - public $settings; -} -/** - * Represents a complex query request to parse using query filter guidelines from Microsoft REST standards - */ -class QueryRequestModel -{ + public $endPeriod; /** - * @var string A list of conditions to filter objects. + * @var float The sales amount. */ - public $filter; + public $salesAmount; /** - * @var string A list of included commands for this fetch operation. + * @var string The filing type of the return. (See FilingTypeId::* for a list of allowable values) */ - public $include; + public $filingType; /** - * @var int For pagination: This is the maximum number of results to return. + * @var string The name of the form. */ - public $maxResults; + public $formName; /** - * @var int For pagination: This is the index of the first result. + * @var float The remittance amount of the return. */ - public $startIndex; + public $remitAmount; /** - * @var string Sorts the resulting objects in a specific manner. + * @var string The unique code of the form. */ - public $sortBy; -} -/** - * Model with options for adding a new filing calendar - */ -class CycleAddOptionModel -{ + public $formCode; /** - * @var boolean True if this form can be added and filed for the current cycle. "Current cycle" is considered one month before the month of today's date. + * @var string A description for the return. */ - public $available; + public $description; /** - * @var string The period start date for the customer's first transaction in the jurisdiction being added + * @var float The taxable amount. */ - public $transactionalPeriodStart; + public $taxableAmount; /** - * @var string The period end date for the customer's last transaction in the jurisdiction being added + * @var float The tax amount. */ - public $transactionalPeriodEnd; + public $taxAmount; /** - * @var string The jurisdiction-assigned due date for the form + * @var float The amount collected by avalara for this return */ - public $filingDueDate; + public $collectAmount; /** - * @var string A descriptive name of the cycle and due date of form. + * @var float The tax due amount. */ - public $cycleName; + public $taxDueAmount; /** - * @var string The filing frequency of the form + * @var float The non-taxable amount. */ - public $frequencyName; + public $nonTaxableAmount; /** - * @var string A code assigned to the filing frequency + * @var float The non-taxable due amount. */ - public $filingFrequencyCode; + public $nonTaxableDueAmount; /** - * @var string The filing frequency of the request (See FilingFrequencyId::* for a list of allowable values) + * @var float Consumer use tax liability during the period. */ - public $filingFrequencyId; + public $consumerUseTaxAmount; /** - * @var string An explanation for why this form cannot be added for the current cycle + * @var float Consumer use tax liability accrued during the period. */ - public $cycleUnavailableReason; + public $consumerUseTaxDueAmount; /** - * @var string[] A list of outlet codes that can be assigned to this form for the current cycle + * @var float Consumer use non-taxable amount. */ - public $availableLocationCodes; -} -/** - * Options for expiring a filing calendar. - */ -class CycleExpireOptionModel -{ + public $consumerUseNonTaxableAmount; /** - * @var string The period start date for the customer's first transaction in the jurisdiction being expired. + * @var float Consumer use taxable amount. */ - public $transactionalPeriodStart; + public $consumerUseTaxableAmount; /** - * @var string The period end date for the customer's last transaction in the jurisdiction being expired. + * @var float Total amount of adjustments on this return */ - public $transactionalPeriodEnd; + public $totalAdjustments; /** - * @var string The jurisdiction-assigned due date for the form. + * @var float The amount of sales excluded from the liability calculation */ - public $filingDueDate; + public $excludedSalesAmount; /** - * @var string A descriptive name of the cycle and due date of the form. + * @var float The amount of non-taxable sales excluded from the liability calculation */ - public $cycleName; -} -/** - * Cycle Safe Expiration results. - */ -class CycleExpireModel -{ + public $excludedNonTaxableAmount; /** - * @var boolean Whether or not the filing calendar can be expired. e.g. if user makes end date of a calendar earlier than latest filing, this would be set to false. + * @var float The amount of tax excluded from the liability calculation */ - public $success; + public $excludedTaxAmount; /** - * @var string The message to present to the user if expiration is successful or unsuccessful. + * @var float The amount of carry over sales applied to the liability calculation */ - public $message; + public $carryOverSalesAmount; /** - * @var CycleExpireOptionModel[] A list of options for expiring the filing calendar. + * @var float The amount of carry over non taxable sales applied to the liability calculation */ - public $cycleExpirationOptions; -} -/** - * An edit to be made on a filing calendar. - */ -class FilingCalendarEditModel -{ + public $carryOverNonTaxableAmount; /** - * @var string The name of the field to be modified. + * @var float The amount of carry over sales tax applied to the liability calculation */ - public $fieldName; + public $carryOverTaxAmount; /** - * @var int The unique ID of the filing calendar question. "Filing calendar question" is the wording displayed to users for a given field. + * @var float The amount of carry over consumer use tax applied to the liability calculation */ - public $questionId; + public $carryOverConsumerUseTaxAmount; /** - * @var object The current value of the field. + * @var float The total amount of total tax accrued in the current active period */ - public $oldValue; + public $taxAccrualAmount; /** - * @var object The new/proposed value of the field. + * @var float The total amount of sales accrued in the current active period */ - public $newValue; -} -/** - * Model with options for actual filing calendar output based on user edits to filing calendar. - */ -class CycleEditOptionModel -{ + public $salesAccrualAmount; /** - * @var boolean Whether or not changes can be made to the filing calendar. + * @var float The total amount of nontaxable sales accrued in the current active period */ - public $success; + public $nonTaxableAccrualAmount; /** - * @var string The message to present to the user when calendar is successfully or unsuccessfully changed. + * @var float The total amount of taxable sales accrued in the current active period */ - public $message; + public $taxableAccrualAmount; /** - * @var boolean Whether or not the user should be warned of a change, because some changes are risky and may be being done not in accordance with jurisdiction rules. For example, user would be warned if user changes filing frequency to new frequency with a start date during an accrual month of the existing frequency. + * @var float The total amount of sales tax accrued in the current active period */ - public $customerMustApprove; + public $salesTaxAccrualAmount; /** - * @var boolean True if the filing calendar must be cloned to allow this change; false if the existing filing calendar can be changed itself. + * @var float The total amount of sellers use tax accrued in the current active period */ - public $mustCloneFilingCalendar; + public $sellersUseTaxAccrualAmount; /** - * @var string The effective date of the filing calendar (only applies if cloning). + * @var float The total amount of consumer use tax accrued in the current active period */ - public $clonedCalendarEffDate; + public $consumerUseTaxAccrualAmount; /** - * @var string The expired end date of the old filing calendar (only applies if cloning). + * @var float The total amount of consumer use taxable sales accrued in the current active period */ - public $expiredCalendarEndDate; -} -/** - * Filing Calendar Edit - */ -class CycleSafeFilingCalendarEditModel -{ + public $consumerUseTaxableAccrualAmount; /** - * @var string Field To Edit + * @var float The total amount of consumer use non taxable sales accrued in the current active period */ - public $fieldName; + public $consumerUseNonTaxableAccrualAmount; /** - * @var string Destination is used to identify filing questions' type Other or Settings. + * @var FilingAdjustmentModel[] The Adjustments for this return. */ - public $destination; + public $adjustments; /** - * @var int Question + * @var float Total amount of augmentations on this return */ - public $questionId; + public $totalAugmentations; /** - * @var string The filing question code. + * @var FilingAugmentationModel[] The Augmentations for this return. */ - public $questionCode; + public $augmentations; /** - * @var object Old Value + * @var float Total amount of payments on this return */ - public $oldValue; + public $totalPayments; /** - * @var object New Value + * @var FilingPaymentModel[] The payments for this return. */ - public $newValue; -} -/** - * Options for expiring a filing calendar. - */ -class CycleSafeEditRequestModel -{ + public $payments; /** - * @var int Company Identifier + * @var string Accrual type of the return (See AccrualType::* for a list of allowable values) */ - public $companyId; + public $accrualType; /** - * @var string Tax Form Code + * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $taxFormCode; + public $month; /** - * @var int Filing Calendar Identifier + * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $filingCalendarId; + public $year; /** - * @var CycleSafeFilingCalendarEditModel[] Filing calendar edits + * @var FilingAttachmentModel[] The attachments for this return. */ - public $edits; -} -/** - * Available Cycle object - */ -class AvailableCycleModel -{ + public $attachments; /** - * @var string Transactional Period Start + * @var FilingReturnCreditModel The excluded carry over credit documents */ - public $transactionalPeriodStart; + public $excludedCarryOverCredits; /** - * @var string Transactional Period End + * @var FilingReturnCreditModel The applied carry over credit documents */ - public $transactionalPeriodEnd; + public $appliedCarryOverCredits; /** - * @var string Filing Due Date + * @var string The date when this record was created. */ - public $filingDueDate; + public $createdDate; /** - * @var string Cycle Name + * @var int The User ID of the user who created this record. */ - public $cycleName; + public $createdUserId; + /** + * @var string The date/time when this record was last modified. + */ + public $modifiedDate; } /** - * Frequency Available object + * Worksheet Checkup Report Suggested Form Model */ -class FrequencyAvailableModel +class FilingsCheckupSuggestedFormModel { /** - * @var string Frequency Code + * @var int Tax Authority ID of the suggested form returned */ - public $frequencyCode; + public $taxAuthorityId; /** - * @var string Frequency Name + * @var string Country of the suggested form returned */ - public $frequencyName; + public $country; /** - * @var string Reason + * @var string Region of the suggested form returned */ - public $reason; + public $region; /** - * @var AvailableCycleModel[] Expired Calendar End Date + * @var string Name of the suggested form returned */ - public $availableCycles; + public $taxFormCode; + /** + * @var string Legacy Name of the suggested form returned + */ + public $returnName; } /** - * CycleSafe Option Result + * Regions */ -class CycleSafeOptionResultModel +class FilingRegionModel { /** - * @var string Tax Form Code + * @var int The unique ID number of this filing region. */ - public $taxFormCode; + public $id; /** - * @var boolean Boolean if the Filing Calendar must be cloned + * @var int The filing id that this region belongs too */ - public $mustCloneFilingCalendar; + public $filingId; /** - * @var string Cloned Calendar Effective Date + * @var string The two-character ISO-3166 code for the country. */ - public $clonedCalendarEffDate; + public $country; /** - * @var string Expired Calendar End Date + * @var string The two or three character region code for the region. */ - public $expiredCalendarEndDate; + public $region; /** - * @var FrequencyAvailableModel[] Frequencies Available + * @var float The sales amount. */ - public $frequenciesAvailable; -} -/** - * - */ -class FilingAnswerModel -{ + public $salesAmount; /** - * @var int The ID number for a filing question + * @var float The taxable amount. */ - public $filingQuestionId; + public $taxableAmount; /** - * @var object The value of the answer for the filing question identified by filingQuestionId + * @var float The tax amount. */ - public $answer; -} -/** - * Represents a commitment to file a tax return on a recurring basis. - * Only used if you subscribe to Avalara Returns. - */ -class FilingRequestDataModel -{ + public $taxAmount; /** - * @var int The company return ID if requesting an update. + * @var float The tax amount due. */ - public $companyReturnId; + public $taxDueAmount; /** - * @var string DEPRECATED - Date: 9/13/2018, Version: 18.10, Message: Please use `taxFormCode` instead. The legacy return name of the requested calendar. + * @var float The amount collected by Avalara for this region */ - public $returnName; + public $collectAmount; /** - * @var string The Avalara standard tax form code of the tax form for this filing calendar. The first two characters of the tax form code are the ISO 3166 country code of the country that issued this form. + * @var float Total remittance amount of all returns in region */ - public $taxFormCode; + public $totalRemittanceAmount; /** - * @var string The filing frequency of the request (See FilingFrequencyId::* for a list of allowable values) + * @var float The non-taxable amount. */ - public $filingFrequencyId; + public $nonTaxableAmount; /** - * @var string State registration ID of the company requesting the filing calendar. + * @var float Consumer use tax liability. */ - public $registrationId; + public $consumerUseTaxAmount; /** - * @var int The months of the request + * @var float Consumer use non-taxable amount. */ - public $months; + public $consumerUseNonTaxableAmount; /** - * @var int The start period of a fiscal year for this form/company + * @var float Consumer use taxable amount. */ - public $fiscalYearStartMonth; + public $consumerUseTaxableAmount; /** - * @var string The type of tax to report on this return. (See MatchingTaxType::* for a list of allowable values) + * @var string The date the filing region was approved. */ - public $taxTypeId; + public $approveDate; /** - * @var string Location code of the request + * @var string The start date for the filing cycle. */ - public $locationCode; + public $startDate; /** - * @var string Filing cycle effective date of the request + * @var string The end date for the filing cycle. */ - public $effDate; + public $endDate; + /** + * @var boolean Whether or not you have nexus in this region. + */ + public $hasNexus; /** - * @var string Filing cycle end date of the request + * @var string The current status of the filing region. (See FilingStatusId::* for a list of allowable values) */ - public $endDate; + public $status; /** - * @var boolean Flag if the request is a clone of a current filing calendar + * @var FilingReturnModel[] A list of tax returns in this region. */ - public $isClone; + public $returns; /** - * @var string The two character ISO 3166 country code of the country that issued the tax form for this filing calendar. + * @var FilingsCheckupSuggestedFormModel[] A list of tax returns in this region. */ - public $country; + public $suggestReturns; /** - * @var string The two or three character ISO 3166 code of the region / state / province that issued the tax form for this filing calendar. + * @var string The date when this record was created. */ - public $region; + public $createdDate; /** - * @var int The tax authority id of the return + * @var int The User ID of the user who created this record. */ - public $taxAuthorityId; + public $createdUserId; /** - * @var string The tax authority name on the return + * @var string The date/time when this record was last modified. */ - public $taxAuthorityName; + public $modifiedDate; /** - * @var FilingAnswerModel[] Filing question answers + * @var int The user ID of the user who last modified this record. */ - public $answers; + public $modifiedUserId; } /** - * Represents a commitment to file a tax return on a recurring basis. - * Only used if you subscribe to Avalara Returns. + * Represents a listing of all tax calculation data for filings and for accruing to future filings. */ -class FilingRequestModel +class FilingModel { /** - * @var int The unique ID number of this filing request. + * @var int The unique ID number of this filing. */ public $id; /** - * @var int The unique ID number of the company to which this filing request belongs. + * @var int The unique ID number of the company for this filing. */ public $companyId; /** - * @var string The current status of this request (See FilingRequestStatus::* for a list of allowable values) + * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $filingRequestStatusId; + public $month; /** - * @var FilingRequestDataModel The data model object of the request + * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $data; + public $year; + /** + * @var string Indicates whether this is an original or an amended filing. (See WorksheetTypeId::* for a list of allowable values) + */ + public $type; /** * @var string The date when this record was created. */ @@ -8156,1586 +8456,1572 @@ class FilingRequestModel * @var int The user ID of the user who last modified this record. */ public $modifiedUserId; + /** + * @var FilingRegionModel[] A listing of regional tax filings within this time period. + */ + public $filingRegions; } /** - * This is the output model coming from skyscraper services + * Represents a listing of all tax calculation data for filings and for accruing to future filings. */ -class LoginVerificationOutputModel +class FilingsTaxSummaryModel { /** - * @var int The job Id returned from skyscraper + * @var float The total sales amount */ - public $jobId; + public $salesAmount; /** - * @var string The operation status of the job + * @var float The taxable amount */ - public $operationStatus; + public $taxableAmount; /** - * @var string The message returned from the job + * @var float The nontaxable amount */ - public $message; + public $nonTaxableAmount; /** - * @var boolean Indicates if the login was successful + * @var float The tax amount */ - public $loginSuccess; -} -/** - * Represents a verification request using Skyscraper for a company - */ -class LoginVerificationInputModel -{ + public $taxAmount; /** - * @var int CompanyId that we are verifying the login information for + * @var float The remittance amount */ - public $companyId; + public $remittanceAmount; /** - * @var int AccountId of the login verification + * @var float The collect amount */ - public $accountId; + public $collectAmount; /** - * @var string Region of the verification request + * @var float The sales accrual amount */ - public $region; + public $salesAccrualAmount; /** - * @var string TaxFormCode for the verification request + * @var float The taxable sales accrual amount */ - public $taxFormCode; + public $taxableAccrualAmount; /** - * @var string Username that we are using for verification + * @var float The nontaxable accrual amount */ - public $username; + public $nonTaxableAccrualAmount; /** - * @var string Password we are using for verification + * @var float The tax accrual amount */ - public $password; + public $taxAccrualAmount; /** - * @var object Additional options of the verification + * @var float reportableSalesAmount */ - public $additionalOptions; + public $reportableSalesAmount; /** - * @var int Bulk Request Id of the verification + * @var float reportableNonTaxableAmount */ - public $bulkRequestId; + public $reportableNonTaxableAmount; /** - * @var int Priority of the verification request + * @var float reportableTaxableAmount */ - public $priority; + public $reportableTaxableAmount; + /** + * @var float reportableTaxAmount + */ + public $reportableTaxAmount; } /** - * Represents everything downloaded from resource files + * Represents a listing of all tax calculation data for filings and for accruing to future filings. */ -class ResourceFileDownloadResult +class FilingsTaxDetailsModel { /** - * @var boolean True if this download succeeded + * @var string The tax type associated with the summary */ - public $success; + public $taxType; /** - * @var string Bytes of the file (This value is encoded as a Base64 string) + * @var float The total sales amount */ - public $bytes; + public $salesAmount; /** - * @var string Original filename + * @var float The nontaxable amount */ - public $filename; + public $nonTaxableAmount; /** - * @var string Mime content type + * @var float The tax amount */ - public $contentType; + public $taxAmount; + /** + * @var int The number of nights + */ + public $numberOfNights; } /** - * Response when checking if a company has a POA on file with Avalara + * Filing Returns Model */ -class PowerOfAttorneyCheckModel +class MultiTaxFilingReturnModel { /** - * @var int companyId of the request + * @var int The unique ID number of this filing return. */ - public $companyId; + public $id; /** - * @var string Country POA is for + * @var int The unique ID number of the filing calendar associated with this return. */ - public $country; + public $filingCalendarId; /** - * @var string Region POA is for + * @var string The current status of the filing return. (See FilingStatusId::* for a list of allowable values) */ - public $region; + public $status; /** - * @var boolean Notes if there is an actice POA + * @var string The filing frequency of the return. (See FilingFrequencyId::* for a list of allowable values) */ - public $activePoa; + public $filingFrequency; /** - * @var string Effective Date of the POA + * @var string The filing type of the return. (See FilingTypeId::* for a list of allowable values) */ - public $effectiveDate; + public $filingType; /** - * @var string End Date of POA + * @var string The name of the form. */ - public $expirationDate; + public $formName; /** - * @var ResourceFileDownloadResult POA download + * @var string The unique code of the form. */ - public $availablePoa; -} -/** - * An attachment associated with a filing return - */ -class FilingAttachmentModel -{ + public $formCode; /** - * @var int The resourceFileId used to retrieve the attachment + * @var string A description for the return. */ - public $resourceFileId; + public $description; /** - * @var string The description of the attachment + * @var int Tax Authority ID of this return */ - public $description; -} -/** - * Filing Returns Model - */ -class FilingReturnModelBasic -{ + public $taxAuthorityId; /** - * @var int The unique ID number of the company filing return. + * @var string The date the return was filed by Avalara. */ - public $companyId; + public $filedDate; /** - * @var int The unique ID number of this filing return. + * @var string Accrual type of the return (See AccrualType::* for a list of allowable values) */ - public $id; + public $accrualType; /** - * @var int The filing id that this return belongs too + * @var string The start date of this return */ - public $filingId; + public $startPeriod; /** - * @var int The resourceFileId of the return + * @var string The end date of this return */ - public $resourceFileId; + public $endPeriod; /** - * @var int The region id that this return belongs too + * @var FilingsTaxSummaryModel A summary of all taxes compbined for this period */ - public $filingRegionId; + public $returnTaxSummary; /** - * @var int The unique ID number of the filing calendar associated with this return. + * @var FilingsTaxDetailsModel[] A detailed breakdown of the taxes in this filing */ - public $filingCalendarId; + public $returnTaxDetails; /** - * @var string The country of the form. + * @var FilingReturnCreditModel The excluded carry over credit documents */ - public $country; + public $excludedCarryOverCredits; /** - * @var string The region of the form. + * @var FilingReturnCreditModel The applied carry over credit documents */ - public $region; + public $appliedCarryOverCredits; /** - * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var float Total amount of adjustments on this return */ - public $endPeriodMonth; + public $totalAdjustments; /** - * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var FilingAdjustmentModel[] The Adjustments for this return. */ - public $endPeriodYear; + public $adjustments; + /** + * @var float Total amount of augmentations on this return + */ + public $totalAugmentations; + /** + * @var FilingAugmentationModel[] The Augmentations for this return. + */ + public $augmentations; + /** + * @var float Total amount of payments on this return + */ + public $totalPayments; + /** + * @var FilingPaymentModel[] The payments for this return. + */ + public $payments; + /** + * @var FilingAttachmentModel[] The attachments for this return. + */ + public $attachments; +} +/** + * Regions + */ +class MultiTaxFilingRegionModel +{ /** - * @var string The current status of the filing return. (See FilingStatusId::* for a list of allowable values) + * @var string The two-character ISO-3166 code for the country. */ - public $status; + public $country; /** - * @var string The filing frequency of the return. (See FilingFrequencyId::* for a list of allowable values) + * @var string The two or three character region code for the region. */ - public $filingFrequency; + public $region; /** - * @var string The date the return was filed by Avalara. + * @var boolean Whether or not you have nexus in this region. */ - public $filedDate; + public $hasNexus; /** - * @var float The sales amount. + * @var string The current status of the filing region. (See FilingStatusId::* for a list of allowable values) */ - public $salesAmount; + public $status; /** - * @var string The filing type of the return. (See FilingTypeId::* for a list of allowable values) + * @var FilingsTaxSummaryModel A summary of all taxes compbined for this period */ - public $filingType; + public $regionTaxSummary; /** - * @var string The name of the form. + * @var FilingsTaxDetailsModel[] A detailed breakdown of the taxes in this filing */ - public $formName; + public $regionTaxDetails; /** - * @var float The remittance amount of the return. + * @var FilingsCheckupSuggestedFormModel[] A list of tax returns in this region. */ - public $remitAmount; + public $suggestReturns; /** - * @var string The unique code of the form. + * @var MultiTaxFilingReturnModel[] A list of tax returns in this region. */ - public $formCode; + public $returns; +} +/** + * Represents a listing of all tax calculation data for filings and for accruing to future filings. + */ +class MultiTaxFilingModel +{ /** - * @var string A description for the return. + * @var int The unique ID number of this filing. */ - public $description; + public $id; /** - * @var float The taxable amount. + * @var int The unique ID number of the company for this filing. */ - public $taxableAmount; + public $companyId; /** - * @var float The tax amount. + * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $taxAmount; + public $month; /** - * @var float The amount collected by avalara for this return + * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. */ - public $collectAmount; + public $year; /** - * @var float The tax due amount. + * @var string Indicates whether this is an original or an amended filing. (See WorksheetTypeId::* for a list of allowable values) */ - public $taxDueAmount; + public $type; /** - * @var float The non-taxable amount. + * @var FilingsTaxSummaryModel A summary of all taxes combined for this period */ - public $nonTaxableAmount; + public $taxSummary; /** - * @var float The non-taxable due amount. + * @var FilingsTaxDetailsModel[] A detailed breakdown of the taxes in this filing */ - public $nonTaxableDueAmount; + public $taxDetails; /** - * @var float Consumer use tax liability. + * @var MultiTaxFilingRegionModel[] A listing of regional tax filings within this time period. */ - public $consumerUseTaxAmount; + public $filingRegions; +} +/** + * Rebuild a set of filings. + */ +class RebuildFilingsModel +{ /** - * @var float Consumer use non-taxable amount. + * @var boolean Set this value to true in order to rebuild the filings. */ - public $consumerUseNonTaxableAmount; + public $rebuild; +} +/** + * Approve a set of filings. + */ +class ApproveFilingsModel +{ /** - * @var float Consumer use taxable amount. + * @var boolean Set this value to true in order to approve the filings. */ - public $consumerUseTaxableAmount; + public $approve; +} +/** + * Cycle Safe Expiration results. + */ +class FilingsCheckupAuthorityModel +{ /** - * @var float The amount of sales excluded from the liability calculation + * @var int Unique ID of the tax authority */ - public $excludedSalesAmount; + public $taxAuthorityId; /** - * @var float The amount of non-taxable sales excluded from the liability calculation + * @var string Location Code of the tax authority */ - public $excludedNonTaxableAmount; + public $locationCode; /** - * @var float The amount of tax excluded from the liability calculation + * @var string Name of the tax authority */ - public $excludedTaxAmount; + public $taxAuthorityName; /** - * @var string Accrual type of the return (See AccrualType::* for a list of allowable values) + * @var int Type Id of the tax authority */ - public $accrualType; + public $taxAuthorityTypeId; /** - * @var FilingAttachmentModel[] The attachments for this return. + * @var int Jurisdiction Id of the tax authority */ - public $attachments; + public $jurisdictionId; /** - * @var string The date when this record was created. + * @var float Amount of tax collected in this tax authority */ - public $createdDate; + public $tax; /** - * @var int The User ID of the user who created this record. + * @var string Tax Type collected in the tax authority */ - public $createdUserId; + public $taxTypeId; /** - * @var string The date/time when this record was last modified. + * @var FilingsCheckupSuggestedFormModel[] Suggested forms to file due to tax collected */ - public $modifiedDate; + public $suggestedForms; } /** - * Filing Returns Model + * Results of the Worksheet Checkup report */ -class FiledReturnModel +class FilingsCheckupModel { /** - * @var int The unique ID number of the company filing return. + * @var FilingsCheckupAuthorityModel[] A collection of authorities in the report */ - public $companyId; + public $authorities; +} +/** + * Account Linkage output model + */ +class FirmClientLinkageOutputModel +{ /** - * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var int The unique ID number of firm-client linkage. */ - public $endPeriodMonth; + public $id; /** - * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var int Firm Account to be linked with the firm */ - public $endPeriodYear; + public $firmAccountId; /** - * @var string The unique code of the form. + * @var string FIrm Account name */ - public $taxformCode; -} -/** - * A model for return adjustments. - */ -class FilingAdjustmentModel -{ + public $firmAccountName; /** - * @var int The unique ID number for the adjustment. + * @var int Client Account to be linked with the firm */ - public $id; + public $clientAccountId; /** - * @var int The filing return id that this applies too + * @var string Client Account name */ - public $filingId; + public $clientAccountName; /** - * @var float The adjustment amount. + * @var string Created date of the linkage */ - public $amount; + public $createdDate; /** - * @var string The filing period the adjustment is applied to. (See AdjustmentPeriodTypeId::* for a list of allowable values) + * @var int User who created the linkage */ - public $period; + public $createdUserId; /** - * @var string The type of the adjustment. + * @var string Modified date of the linkage */ - public $type; + public $modifiedDate; /** - * @var boolean Whether or not the adjustment has been calculated. + * @var int User who modified the linkage */ - public $isCalculated; + public $modifiedUserId; /** - * @var string The account type of the adjustment. (See PaymentAccountTypeId::* for a list of allowable values) + * @var string The status of the account linkage. The following are the available statuses * Requested - When a linkage is requested * Approved - When the linkage is approved * Rejected - When the linkage is rejected * Revoked - When the linkage is revoked. (See FirmClientLinkageStatus::* for a list of allowable values) */ - public $accountType; + public $status; /** - * @var string A descriptive reason for creating this adjustment. + * @var boolean This is set to 1 if the linkage is deleted. */ - public $reason; + public $isDeleted; /** - * @var string The date when this record was created. + * @var string Name of the firm's point of contact person for the client */ - public $createdDate; + public $firmContactName; /** - * @var int The User ID of the user who created this record. + * @var string Email of the firm's point of contact person for the client */ - public $createdUserId; + public $firmContactEmail; +} +/** + * Account Linkage Input model + */ +class FirmClientLinkageInputModel +{ /** - * @var string The date/time when this record was last modified. + * @var int Client AccountId that needs to be linked to the firm */ - public $modifiedDate; + public $clientAccountId; /** - * @var int The user ID of the user who last modified this record. + * @var string Client AccountName that needs to be linked to the firm */ - public $modifiedUserId; + public $clientAccountName; } /** - * A model for return augmentations. + * Represents a request for a new account with Avalara for a new Firm client. */ -class FilingAugmentationModel +class NewFirmClientAccountRequestModel { /** - * @var int The unique ID number for the augmentation. + * @var string The name of the account to create */ - public $id; + public $accountName; /** - * @var int The filing return id that this applies too + * @var string First name of the primary contact person for this account */ - public $filingId; + public $firstName; /** - * @var float The field amount. + * @var string Last name of the primary contact person for this account */ - public $fieldAmount; + public $lastName; /** - * @var string The field name. + * @var string Title of the primary contact person for this account */ - public $fieldName; + public $title; /** - * @var string The date when this record was created. + * @var string Phone number of the primary contact person for this account + */ + public $phoneNumber; + /** + * @var string Email of the primary contact person for this account + */ + public $email; + /** + * @var string Company code to be assigned to the company created for this account. If no company code is provided, this will be defaulted to "DEFAULT" company code. + */ + public $companyCode; + /** + * @var CompanyAddress Address information of the account being created. + */ + public $companyAddress; + /** + * @var string United States Taxpayer ID number, usually your Employer Identification Number if you are a business or your Social Security Number if you are an individual. This value is required if the address provided is inside the US. Otherwise it is optional. */ - public $createdDate; + public $taxPayerIdNumber; /** - * @var int The User ID of the user who created this record. + * @var string[] Properties of the primary contact person for this account */ - public $createdUserId; + public $properties; +} +/** + * Product classification input model. + */ +class ItemClassificationInputModel +{ /** - * @var string The date/time when this record was last modified. + * @var string The product code of an item in a given system. */ - public $modifiedDate; + public $productCode; /** - * @var int The user ID of the user who last modified this record. + * @var string The system code in which the product belongs. */ - public $modifiedUserId; + public $systemCode; } /** - * A model for return payments. + * Product classification output model. */ -class FilingPaymentModel +class ItemClassificationOutputModel { /** - * @var int The unique ID number for the payment. + * @var int The unique ID number of this product. */ public $id; /** - * @var int The filing return id that this applies too + * @var int The unique ID number of the item this product belongs to. */ - public $filingId; + public $itemId; /** - * @var float The payment amount. + * @var int The system id which the product belongs. */ - public $paymentAmount; + public $systemId; /** - * @var string The type of the payment. (See PaymentType::* for a list of allowable values) + * @var string A unique code representing this item. */ - public $type; + public $productCode; /** - * @var boolean Whether or not the payment has been calculated. + * @var string A unique code representing this item. */ - public $isCalculated; + public $systemCode; +} +/** + * An abridged item model used for syncing product catalogs with AvaTax. + */ +class ItemSyncModel +{ /** - * @var string The date when this record was created. + * @var string A unique code representing this item. */ - public $createdDate; + public $itemCode; /** - * @var int The User ID of the user who created this record. + * @var string A friendly description of the item. If your company has enrolled in Streamlined Sales Tax, this description must be auditable. */ - public $createdUserId; + public $description; /** - * @var string The date/time when this record was last modified. + * @var string A group to which the item belongs. */ - public $modifiedDate; + public $itemGroup; /** - * @var int The user ID of the user who last modified this record. + * @var string The tax code of the item (optional) */ - public $modifiedUserId; + public $taxCode; } /** - * + * Represents a request to sync items. */ -class Message +class SyncItemsRequestModel { /** - * @var string - */ - public $details; - /** - * @var string + * @var ItemSyncModel[] A list of items to sync with AvaTax. */ - public $helpLink; + public $items; +} +/** + * The response returned after an item sync was requested. + */ +class SyncItemsResponseModel +{ /** - * @var string + * @var string The status of the request */ - public $name; + public $status; +} +/** + * Represents a bulk upload input model. + */ +class ItemBulkUploadInputModel +{ /** - * @var string + * @var ItemModel[] List of items */ - public $refersTo; + public $items; +} +/** + * Represents a item upload error model. + */ +class ItemUploadErrorModel +{ /** - * @var string + * @var int Row index of an item */ - public $severity; + public $rowIndex; /** - * @var string + * @var string Item code */ - public $source; + public $itemCode; /** - * @var string + * @var string[] List of errors for against given item code */ - public $summary; + public $errors; } /** - * + * Represents a bulk upload response model. */ -class WorksheetDocumentLine +class ItemBulkUploadOutputModel { /** - * @var string - */ - public $reportingDate; - /** - * @var string - */ - public $lineNo; - /** - * @var float + * @var int Count of processed objects */ - public $lineAmount; + public $total; /** - * @var float + * @var ItemUploadErrorModel[] Dictionary of object and respective list of errors */ - public $exemptAmount; + public $failed; +} +/** + * Tells you whether this location object has been correctly set up to the local jurisdiction's standards + */ +class LocationValidationModel +{ /** - * @var float + * @var boolean True if the location has a value for each jurisdiction-required setting. The user is required to ensure that the values are correct according to the jurisdiction; this flag does not indicate whether the taxing jurisdiction has accepted the data you have provided. */ - public $taxableAmount; + public $settingsValidated; /** - * @var float + * @var LocationQuestionModel[] A list of settings that must be defined for this location */ - public $taxAmount; + public $requiredSettings; +} +/** + * Expire a location without restriction then update with new remittance and dates. + */ +class UpdateCompanyLocationRemittanceModel +{ /** - * @var Message[] + * @var string Indicates whether this location is a physical place of business or a temporary salesperson location. (See AddressCategoryId::* for a list of allowable values) */ - public $messages; + public $addressCategoryId; /** - * @var string + * @var string The date when this location was opened for business. */ - public $resultCode; + public $effectiveDate; /** - * @var string + * @var string If this place of business has closed, the date when this location closed business. If null it'll be set to the date of 9998-12-31. */ - public $transactionId; + public $endDate; } /** - * + * Commit this MultiDocument object so that all transactions within it can be reported on a tax filing. */ -class WorksheetDocument +class CommitMultiDocumentModel { /** - * @var string + * @var string Represents the unique code of this MultiDocument transaction. A MultiDocument transaction is uniquely identified by its `accountId`, `code`, and `type`. /// */ - public $docCode; + public $code; /** - * @var string + * @var string Represents the document type of this MultiDocument transaction. For more information about document types, see [DocumentType](https://developer.avalara.com/api-reference/avatax/rest/v2/models/enums/DocumentType/). A MultiDocument transaction is uniquely identified by its `accountId`, `code`, and `type`. (See DocumentType::* for a list of allowable values) */ - public $docDate; + public $type; /** - * @var float + * @var boolean Set this value to be `true` to commit this transaction. Committing a transaction allows it to be reported on a tax filing. Uncommitted transactions will not be reported. */ - public $totalExempt; + public $commit; +} +/** + * An individual tax detail element. Represents the amount of tax calculated for a particular jurisdiction, for a particular line in an invoice. + */ +class TransactionLineDetailModel +{ /** - * @var float + * @var int The unique ID number of this tax detail. */ - public $totalTaxable; + public $id; /** - * @var float + * @var int The unique ID number of the line within this transaction. */ - public $totalTax; + public $transactionLineId; /** - * @var WorksheetDocumentLine[] + * @var int The unique ID number of this transaction. */ - public $lines; + public $transactionId; /** - * @var Message[] + * @var int The unique ID number of the address used for this tax detail. */ - public $messages; + public $addressId; /** - * @var string + * @var string The two character ISO 3166 country code of the country where this tax detail is assigned. */ - public $resultCode; + public $country; /** - * @var string + * @var string The two-or-three character ISO region code for the region where this tax detail is assigned. */ - public $transactionId; -} -/** - * An attachment associated with a filing return - */ -class FilingReturnCreditModel -{ + public $region; /** - * @var float The resourceFileId used to retrieve the attachment + * @var string For U.S. transactions, the Federal Information Processing Standard (FIPS) code for the county where this tax detail is assigned. */ - public $totalSales; + public $countyFIPS; /** - * @var float The resourceFileId used to retrieve the attachment + * @var string For U.S. transactions, the Federal Information Processing Standard (FIPS) code for the state where this tax detail is assigned. */ - public $totalExempt; + public $stateFIPS; /** - * @var float The resourceFileId used to retrieve the attachment + * @var float The amount of this line that was considered exempt in this tax detail. */ - public $totalTaxable; + public $exemptAmount; /** - * @var float The resourceFileId used to retrieve the attachment + * @var int The unique ID number of the exemption reason for this tax detail. */ - public $totalTax; + public $exemptReasonId; /** - * @var WorksheetDocument[] The excluded carry over credit documents + * @var boolean True if this detail element represented an in-state transaction. */ - public $transactionDetails; -} -/** - * Filing Returns Model - */ -class FilingReturnModel -{ + public $inState; /** - * @var int The unique ID number of this filing return. + * @var string The code of the jurisdiction to which this tax detail applies. */ - public $id; + public $jurisCode; /** - * @var int The region id that this return belongs too + * @var string The name of the jurisdiction to which this tax detail applies. */ - public $filingRegionId; + public $jurisName; /** - * @var int The unique ID number of the filing calendar associated with this return. + * @var int The unique ID number of the jurisdiction to which this tax detail applies. */ - public $filingCalendarId; + public $jurisdictionId; /** - * @var int The resourceFileId of the return. Will be null if not available. + * @var string The Avalara-specified signature code of the jurisdiction to which this tax detail applies. */ - public $resourceFileId; + public $signatureCode; /** - * @var int Tax Authority ID of this return + * @var string The state assigned number of the jurisdiction to which this tax detail applies. */ - public $taxAuthorityId; + public $stateAssignedNo; /** - * @var string The current status of the filing return. (See FilingStatusId::* for a list of allowable values) + * @var string DEPRECATED - Date: 12/20/2017, Version: 18.1, Message: Use jurisdictionTypeId instead. The type of the jurisdiction to which this tax detail applies. (See JurisTypeId::* for a list of allowable values) */ - public $status; + public $jurisType; /** - * @var string The filing frequency of the return. (See FilingFrequencyId::* for a list of allowable values) + * @var string The type of the jurisdiction in which this tax detail applies. (See JurisdictionType::* for a list of allowable values) */ - public $filingFrequency; + public $jurisdictionType; /** - * @var string The date the return was filed by Avalara. + * @var float The amount of this line item that was considered nontaxable in this tax detail. */ - public $filedDate; + public $nonTaxableAmount; /** - * @var string The start date of this return + * @var int The rule according to which portion of this detail was considered nontaxable. */ - public $startPeriod; + public $nonTaxableRuleId; /** - * @var string The end date of this return + * @var string The type of nontaxability that was applied to this tax detail. (See TaxRuleTypeId::* for a list of allowable values) */ - public $endPeriod; + public $nonTaxableType; /** - * @var float The sales amount. + * @var float The rate at which this tax detail was calculated. */ - public $salesAmount; + public $rate; /** - * @var string The filing type of the return. (See FilingTypeId::* for a list of allowable values) + * @var int The unique ID number of the rule according to which this tax detail was calculated. */ - public $filingType; + public $rateRuleId; /** - * @var string The name of the form. + * @var int The unique ID number of the source of the rate according to which this tax detail was calculated. */ - public $formName; + public $rateSourceId; /** - * @var float The remittance amount of the return. + * @var string For Streamlined Sales Tax customers, the SST Electronic Return code under which this tax detail should be applied. */ - public $remitAmount; + public $serCode; /** - * @var string The unique code of the form. + * @var string Indicates whether this tax detail applies to the origin or destination of the transaction. (See Sourcing::* for a list of allowable values) */ - public $formCode; + public $sourcing; /** - * @var string A description for the return. + * @var float The amount of tax for this tax detail. */ - public $description; + public $tax; /** - * @var float The taxable amount. + * @var float The taxable amount of this tax detail. */ public $taxableAmount; /** - * @var float The tax amount. + * @var string The type of tax that was calculated. Depends on the company's nexus settings as well as the jurisdiction's tax laws. */ - public $taxAmount; + public $taxType; /** - * @var float The amount collected by avalara for this return + * @var string The id of the tax subtype. */ - public $collectAmount; + public $taxSubTypeId; /** - * @var float The tax due amount. + * @var string The id of the tax type group. */ - public $taxDueAmount; + public $taxTypeGroupId; /** - * @var float The non-taxable amount. + * @var string The name of the tax against which this tax amount was calculated. */ - public $nonTaxableAmount; + public $taxName; /** - * @var float The non-taxable due amount. + * @var int The type of the tax authority to which this tax will be remitted. */ - public $nonTaxableDueAmount; + public $taxAuthorityTypeId; /** - * @var float Consumer use tax liability during the period. + * @var int The unique ID number of the tax region. */ - public $consumerUseTaxAmount; + public $taxRegionId; /** - * @var float Consumer use tax liability accrued during the period. + * @var float The amount of tax that AvaTax calculated. If an override for tax amount is used, there may be a difference between the tax field which applies your override, and the this amount that is calculated without override. */ - public $consumerUseTaxDueAmount; + public $taxCalculated; /** - * @var float Consumer use non-taxable amount. + * @var float The amount of tax override that was specified for this tax line. */ - public $consumerUseNonTaxableAmount; + public $taxOverride; /** - * @var float Consumer use taxable amount. + * @var string DEPRECATED - Date: 12/20/2017, Version: 18.1, Message: Please use rateTypeCode instead. The rate type for this tax detail. (See RateType::* for a list of allowable values) */ - public $consumerUseTaxableAmount; + public $rateType; /** - * @var float Total amount of adjustments on this return + * @var string Indicates the code of the rate type that was used to calculate this tax detail. Use [ListRateTypesByCountry](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListRateTypesByCountry/) API for a full list of rate type codes. */ - public $totalAdjustments; + public $rateTypeCode; /** - * @var float The amount of sales excluded from the liability calculation + * @var float Number of units in this line item that were calculated to be taxable according to this rate detail. */ - public $excludedSalesAmount; + public $taxableUnits; /** - * @var float The amount of non-taxable sales excluded from the liability calculation + * @var float Number of units in this line item that were calculated to be nontaxable according to this rate detail. */ - public $excludedNonTaxableAmount; + public $nonTaxableUnits; /** - * @var float The amount of tax excluded from the liability calculation + * @var float Number of units in this line item that were calculated to be exempt according to this rate detail. */ - public $excludedTaxAmount; + public $exemptUnits; /** - * @var float The amount of carry over sales applied to the liability calculation + * @var string When calculating units, what basis of measurement did we use for calculating the units? */ - public $carryOverSalesAmount; + public $unitOfBasis; /** - * @var float The amount of carry over non taxable sales applied to the liability calculation + * @var boolean True if this value is a non-passthrough tax. A non-passthrough tax is a tax that may not be charged to a customer; it must be paid directly by the company. */ - public $carryOverNonTaxableAmount; + public $isNonPassThru; /** - * @var float The amount of carry over sales tax applied to the liability calculation + * @var boolean The Taxes/Fee component. True if the fee is applied. */ - public $carryOverTaxAmount; + public $isFee; /** - * @var float The amount of carry over consumer use tax applied to the liability calculation + * @var float Number of units in this line item that were calculated to be taxable according to this rate detail in the reporting currency. */ - public $carryOverConsumerUseTaxAmount; + public $reportingTaxableUnits; /** - * @var float The total amount of total tax accrued in the current active period + * @var float Number of units in this line item that were calculated to be nontaxable according to this rate detail in the reporting currency. */ - public $taxAccrualAmount; + public $reportingNonTaxableUnits; /** - * @var float The total amount of sales accrued in the current active period + * @var float Number of units in this line item that were calculated to be exempt according to this rate detail in the reporting currency. */ - public $salesAccrualAmount; + public $reportingExemptUnits; /** - * @var float The total amount of nontaxable sales accrued in the current active period + * @var float The amount of tax for this tax detail in the reporting currency. */ - public $nonTaxableAccrualAmount; + public $reportingTax; /** - * @var float The total amount of taxable sales accrued in the current active period + * @var float The amount of tax that AvaTax calculated in the reporting currency. If an override for tax amount is used, there may be a difference between the tax field which applies your override, and the this amount that is calculated without override. */ - public $taxableAccrualAmount; + public $reportingTaxCalculated; /** - * @var float The total amount of sales tax accrued in the current active period + * @var string LiabilityType identifies the party liable to file the tax. This field is used to filter taxes from reports and tax filings as appropriate. (See LiabilityType::* for a list of allowable values) */ - public $salesTaxAccrualAmount; + public $liabilityType; +} +/** + * Represents information about location types stored in a line + */ +class TransactionLineLocationTypeModel +{ /** - * @var float The total amount of sellers use tax accrued in the current active period + * @var int The unique ID number of this line location address model */ - public $sellersUseTaxAccrualAmount; + public $documentLineLocationTypeId; /** - * @var float The total amount of consumer use tax accrued in the current active period + * @var int The unique ID number of the document line associated with this line location address model */ - public $consumerUseTaxAccrualAmount; + public $documentLineId; /** - * @var float The total amount of consumer use taxable sales accrued in the current active period + * @var int The address ID corresponding to this model */ - public $consumerUseTaxableAccrualAmount; + public $documentAddressId; /** - * @var float The total amount of consumer use non taxable sales accrued in the current active period + * @var string The location type code corresponding to this model */ - public $consumerUseNonTaxableAccrualAmount; + public $locationTypeCode; +} +/** + * One line item on this transaction. + */ +class TransactionLineModel +{ /** - * @var FilingAdjustmentModel[] The Adjustments for this return. + * @var int The unique ID number of this transaction line item. */ - public $adjustments; + public $id; /** - * @var float Total amount of augmentations on this return + * @var int The unique ID number of the transaction to which this line item belongs. */ - public $totalAugmentations; + public $transactionId; /** - * @var FilingAugmentationModel[] The Augmentations for this return. + * @var string The line number or code indicating the line on this invoice or receipt or document. */ - public $augmentations; + public $lineNumber; /** - * @var float Total amount of payments on this return + * @var int The unique ID number of the boundary override applied to this line item. */ - public $totalPayments; + public $boundaryOverrideId; /** - * @var FilingPaymentModel[] The payments for this return. + * @var string DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use entityUseCode instead. The customer usage type for this line item. Usage type often affects taxability rules. */ - public $payments; + public $customerUsageType; /** - * @var string Accrual type of the return (See AccrualType::* for a list of allowable values) + * @var string The entity use code for this line item. Usage type often affects taxability rules. */ - public $accrualType; + public $entityUseCode; /** - * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var string A description of the item or service represented by this line. */ - public $month; + public $description; /** - * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var int The unique ID number of the destination address where this line was delivered or sold. In the case of a point-of-sale transaction, the destination address and origin address will be the same. In the case of a shipped transaction, they will be different. */ - public $year; + public $destinationAddressId; /** - * @var FilingAttachmentModel[] The attachments for this return. + * @var int The unique ID number of the origin address where this line was delivered or sold. In the case of a point-of-sale transaction, the origin address and destination address will be the same. In the case of a shipped transaction, they will be different. */ - public $attachments; + public $originAddressId; /** - * @var FilingReturnCreditModel The excluded carry over credit documents + * @var float The amount of discount that was applied to this line item. This represents the difference between list price and sale price of the item. In general, a discount represents money that did not change hands; tax is calculated on only the amount of money that changed hands. */ - public $excludedCarryOverCredits; + public $discountAmount; /** - * @var FilingReturnCreditModel The applied carry over credit documents + * @var int The type of discount, if any, that was applied to this line item. */ - public $appliedCarryOverCredits; + public $discountTypeId; /** - * @var string The date when this record was created. + * @var float The amount of this line item that was exempt. */ - public $createdDate; + public $exemptAmount; /** - * @var int The User ID of the user who created this record. + * @var int The unique ID number of the exemption certificate that applied to this line item. It is the calc_id associated with a certificate in CertCapture. */ - public $createdUserId; + public $exemptCertId; /** - * @var string The date/time when this record was last modified. + * @var string The CertCapture Certificate ID */ - public $modifiedDate; -} -/** - * Worksheet Checkup Report Suggested Form Model - */ -class FilingsCheckupSuggestedFormModel -{ + public $certificateId; /** - * @var int Tax Authority ID of the suggested form returned + * @var string The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing. If no applicable ECMS entry is available, the AvaTax service will determine if an Exemption Number field is populated or an Entity/Use Code is included in the sales tax calculation request, and will perform exemption processing using either of those two options. */ - public $taxAuthorityId; + public $exemptNo; /** - * @var string Country of the suggested form returned + * @var boolean True if this item is taxable. */ - public $country; + public $isItemTaxable; /** - * @var string Region of the suggested form returned + * @var boolean True if this item is a Streamlined Sales Tax line item. */ - public $region; + public $isSSTP; /** - * @var string Name of the suggested form returned + * @var string The code string of the item represented by this line item. */ - public $taxFormCode; + public $itemCode; /** - * @var string Legacy Name of the suggested form returned + * @var float The total amount of the transaction, including both taxable and exempt. This is the total price for all items. To determine the individual item price, divide this by quantity. */ - public $returnName; -} -/** - * Regions - */ -class FilingRegionModel -{ + public $lineAmount; /** - * @var int The unique ID number of this filing region. + * @var float The quantity of products sold on this line item. */ - public $id; + public $quantity; /** - * @var int The filing id that this region belongs too + * @var string A user-defined reference identifier for this transaction line item. */ - public $filingId; + public $ref1; /** - * @var string The two-character ISO-3166 code for the country. + * @var string A user-defined reference identifier for this transaction line item. + */ + public $ref2; + /** + * @var string The date when this transaction should be reported. By default, all transactions are reported on the date when the actual transaction took place. In some cases, line items may be reported later due to delayed shipments or other business reasons. */ - public $country; + public $reportingDate; /** - * @var string The two or three character region code for the region. + * @var string The revenue account number for this line item. */ - public $region; + public $revAccount; /** - * @var float The sales amount. + * @var string Indicates whether this line item was taxed according to the origin or destination. (See Sourcing::* for a list of allowable values) */ - public $salesAmount; + public $sourcing; /** - * @var float The taxable amount. + * @var float The tax for this line in this transaction. If you used a `taxOverride` of type `taxAmount` for this line, this value will represent the amount of your override. AvaTax will still attempt to calculate the correct tax for this line and will store that calculated value in the `taxCalculated` field. You can compare the `tax` and `taxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. */ - public $taxableAmount; + public $tax; /** - * @var float The tax amount. + * @var float The taxable amount of this line item. */ - public $taxAmount; + public $taxableAmount; /** - * @var float The tax amount due. + * @var float The amount of tax that AvaTax calculated for the transaction. If you used a `taxOverride` of type `taxAmount`, there may be a difference between the `tax` field which applies your override, and the `taxCalculated` field which represents the amount of tax that AvaTax calculated without the override. You can compare the `tax` and `taxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. */ - public $taxDueAmount; + public $taxCalculated; /** - * @var float The amount collected by Avalara for this region + * @var string The code string for the tax code that was used to calculate this line item. */ - public $collectAmount; + public $taxCode; /** - * @var float Total remittance amount of all returns in region + * @var int The unique ID number for the tax code that was used to calculate this line item. */ - public $totalRemittanceAmount; + public $taxCodeId; /** - * @var float The non-taxable amount. + * @var string The date that was used for calculating tax amounts for this line item. By default, this date should be the same as the document date. In some cases, for example when a consumer returns a product purchased previously, line items may be calculated using a tax date in the past so that the consumer can receive a refund for the correct tax amount that was charged when the item was originally purchased. */ - public $nonTaxableAmount; + public $taxDate; /** - * @var float Consumer use tax liability. + * @var string The tax engine identifier that was used to calculate this line item. */ - public $consumerUseTaxAmount; + public $taxEngine; /** - * @var float Consumer use non-taxable amount. + * @var string If a tax override was specified, this indicates the type of tax override. (See TaxOverrideType::* for a list of allowable values) */ - public $consumerUseNonTaxableAmount; + public $taxOverrideType; /** - * @var float Consumer use taxable amount. + * @var string VAT business identification number used for this transaction. */ - public $consumerUseTaxableAmount; + public $businessIdentificationNo; /** - * @var string The date the filing region was approved. + * @var float If a tax override was specified, this indicates the amount of tax that was requested. */ - public $approveDate; + public $taxOverrideAmount; /** - * @var string The start date for the filing cycle. + * @var string If a tax override was specified, represents the reason for the tax override. */ - public $startDate; + public $taxOverrideReason; /** - * @var string The end date for the filing cycle. + * @var boolean Indicates whether the `amount` for this line already includes tax. If this value is `true`, the final price of this line including tax will equal the value in `amount`. If this value is `null` or `false`, the final price will equal `amount` plus whatever taxes apply to this line. */ - public $endDate; + public $taxIncluded; /** - * @var boolean Whether or not you have nexus in this region. + * @var int DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead. ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. */ - public $hasNexus; + public $merchantSellerId; /** - * @var string The current status of the filing region. (See FilingStatusId::* for a list of allowable values) + * @var string ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. */ - public $status; + public $merchantSellerIdentifier; /** - * @var FilingReturnModel[] A list of tax returns in this region. + * @var string This field will identify who is remitting Marketplace or Seller. This field must be populated by Marketplace. (See MarketplaceLiabilityType::* for a list of allowable values) */ - public $returns; + public $marketplaceLiabilityType; /** - * @var FilingsCheckupSuggestedFormModel[] A list of tax returns in this region. + * @var string The transaction's original ID in its origination system */ - public $suggestReturns; + public $originationDocumentId; /** - * @var string The date when this record was created. + * @var string Synonym of Marketplace Origination. Name of the Marketplace where the transaction originated from. */ - public $createdDate; + public $originationSite; /** - * @var int The User ID of the user who created this record. + * @var TransactionLineDetailModel[] Optional: A list of tax details for this line item. Tax details represent taxes being charged by various tax authorities. Taxes that appear in the `details` collection are intended to be displayed to the customer and charged as a 'tax' on the invoice. To fetch this list, add the query string `?$include=Details` to your URL. */ - public $createdUserId; + public $details; /** - * @var string The date/time when this record was last modified. + * @var TransactionLineDetailModel[] Optional: A list of non-passthrough tax details for this line item. Tax details represent taxes being charged by various tax authorities. Taxes that appear in the `nonPassthroughDetails` collection are taxes that must be paid directly by the company and not shown to the customer. */ - public $modifiedDate; + public $nonPassthroughDetails; /** - * @var int The user ID of the user who last modified this record. + * @var TransactionLineLocationTypeModel[] Optional: A list of location types for this line item. To fetch this list, add the query string "?$include=LineLocationTypes" to your URL. */ - public $modifiedUserId; -} -/** - * Represents a listing of all tax calculation data for filings and for accruing to future filings. - */ -class FilingModel -{ + public $lineLocationTypes; /** - * @var int The unique ID number of this filing. + * @var TransactionLineParameterModel[] Contains a list of extra parameters that were set when the transaction was created. */ - public $id; + public $parameters; /** - * @var int The unique ID number of the company for this filing. + * @var TransactionLineUserDefinedFieldModel[] Custom user fields/flex fields for this transaction. */ - public $companyId; + public $userDefinedFields; /** - * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var string The cross-border harmonized system code (HSCode) used to calculate tariffs and duties for this line item. For a full list of HS codes, see `ListCrossBorderCodes()`. */ - public $month; + public $hsCode; /** - * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var float Indicates the cost of insurance and freight for this line. */ - public $year; + public $costInsuranceFreight; /** - * @var string Indicates whether this is an original or an amended filing. (See WorksheetTypeId::* for a list of allowable values) + * @var string Indicates the VAT code for this line item. */ - public $type; + public $vatCode; /** - * @var string The date when this record was created. + * @var int Indicates the VAT number type for this line item. */ - public $createdDate; + public $vatNumberTypeId; /** - * @var int The User ID of the user who created this record. + * @var TransactionLineTaxAmountByTaxTypeModel[] Contains a list of TaxType that are to be overridden with their respective TaxOverrideAmount. */ - public $createdUserId; + public $taxAmountByTaxTypes; /** - * @var string The date/time when this record was last modified. + * @var string Deemed Supplier field indicates which party on the marketplace transaction is liable for collecting and reporting the VAT. This is based on the 2021 E-commerce legislative reforms in EU and UK. This field will not be used until after July 1, 2021. (See DeemedSellerType::* for a list of allowable values) */ - public $modifiedDate; + public $deemedSupplier; /** - * @var int The user ID of the user who last modified this record. + * @var string Product category breadcrumbs. This is the full path to the category where item is included. Categories should be separated by “ > “. Multiple category paths per item are accepted. In this case, category paths should be separated by “;”. */ - public $modifiedUserId; + public $category; /** - * @var FilingRegionModel[] A listing of regional tax filings within this time period. + * @var string A long description of the product. */ - public $filingRegions; + public $summary; } /** - * Represents a listing of all tax calculation data for filings and for accruing to future filings. + * An address used within this transaction. */ -class FilingsTaxSummaryModel +class TransactionAddressModel { /** - * @var float The total sales amount + * @var int The unique ID number of this address. */ - public $salesAmount; + public $id; /** - * @var float The taxable amount + * @var int The unique ID number of the document to which this address belongs. */ - public $taxableAmount; + public $transactionId; /** - * @var float The nontaxable amount + * @var string The boundary level at which this address was validated. (See BoundaryLevel::* for a list of allowable values) */ - public $nonTaxableAmount; + public $boundaryLevel; /** - * @var float The tax amount + * @var string The first line of the address. */ - public $taxAmount; + public $line1; /** - * @var float The remittance amount + * @var string The second line of the address. */ - public $remittanceAmount; + public $line2; /** - * @var float The collect amount + * @var string The third line of the address. */ - public $collectAmount; + public $line3; /** - * @var float The sales accrual amount + * @var string The city for the address. */ - public $salesAccrualAmount; + public $city; /** - * @var float The taxable sales accrual amount + * @var string The ISO 3166 region code. E.g., the second part of ISO 3166-2. */ - public $taxableAccrualAmount; + public $region; /** - * @var float The nontaxable accrual amount + * @var string The postal code or zip code for the address. */ - public $nonTaxableAccrualAmount; + public $postalCode; /** - * @var float The tax accrual amount + * @var string The ISO 3166 country code */ - public $taxAccrualAmount; + public $country; /** - * @var float reportableSalesAmount + * @var int The unique ID number of the tax region for this address. */ - public $reportableSalesAmount; + public $taxRegionId; /** - * @var float reportableNonTaxableAmount + * @var string Latitude for this address */ - public $reportableNonTaxableAmount; + public $latitude; /** - * @var float reportableTaxableAmount + * @var string Longitude for this address */ - public $reportableTaxableAmount; + public $longitude; /** - * @var float reportableTaxAmount + * @var JurisdictionModel[] List of all the qualified jurisdictions for the TaxRegionId. */ - public $reportableTaxAmount; + public $jurisdictions; } /** - * Represents a listing of all tax calculation data for filings and for accruing to future filings. + * Information about a location type */ -class FilingsTaxDetailsModel +class TransactionLocationTypeModel { /** - * @var string The tax type associated with the summary - */ - public $taxType; - /** - * @var float The total sales amount + * @var int Location type ID for this location type in transaction */ - public $salesAmount; + public $documentLocationTypeId; /** - * @var float The nontaxable amount + * @var int Transaction ID */ - public $nonTaxableAmount; + public $documentId; /** - * @var float The tax amount + * @var int Address ID for the transaction */ - public $taxAmount; + public $documentAddressId; /** - * @var int The number of nights + * @var string Location type code */ - public $numberOfNights; + public $locationTypeCode; } /** - * Filing Returns Model + * Summary information about an overall transaction. */ -class MultiTaxFilingReturnModel +class TransactionSummary { /** - * @var int The unique ID number of this filing return. - */ - public $id; - /** - * @var int The unique ID number of the filing calendar associated with this return. - */ - public $filingCalendarId; - /** - * @var string The current status of the filing return. (See FilingStatusId::* for a list of allowable values) - */ - public $status; - /** - * @var string The filing frequency of the return. (See FilingFrequencyId::* for a list of allowable values) - */ - public $filingFrequency; - /** - * @var string The filing type of the return. (See FilingTypeId::* for a list of allowable values) - */ - public $filingType; - /** - * @var string The name of the form. + * @var string Two character ISO-3166 country code. */ - public $formName; + public $country; /** - * @var string The unique code of the form. + * @var string Two or three character ISO region, state or province code, if applicable. */ - public $formCode; + public $region; /** - * @var string A description for the return. + * @var string The type of jurisdiction that collects this tax. (See JurisdictionType::* for a list of allowable values) */ - public $description; + public $jurisType; /** - * @var int Tax Authority ID of this return + * @var string Jurisdiction Code for the taxing jurisdiction */ - public $taxAuthorityId; + public $jurisCode; /** - * @var string The date the return was filed by Avalara. + * @var string The name of the jurisdiction that collects this tax. */ - public $filedDate; + public $jurisName; /** - * @var string Accrual type of the return (See AccrualType::* for a list of allowable values) + * @var int The unique ID of the Tax Authority Type that collects this tax. */ - public $accrualType; + public $taxAuthorityType; /** - * @var string The start date of this return + * @var string The state assigned number of the jurisdiction that collects this tax. */ - public $startPeriod; + public $stateAssignedNo; /** - * @var string The end date of this return + * @var string The tax type of this tax. */ - public $endPeriod; + public $taxType; /** - * @var FilingsTaxSummaryModel A summary of all taxes compbined for this period + * @var string The tax subtype of this tax. */ - public $returnTaxSummary; + public $taxSubType; /** - * @var FilingsTaxDetailsModel[] A detailed breakdown of the taxes in this filing + * @var string The name of the tax. */ - public $returnTaxDetails; + public $taxName; /** - * @var FilingReturnCreditModel The excluded carry over credit documents + * @var string Group code when special grouping is enabled. */ - public $excludedCarryOverCredits; + public $taxGroup; /** - * @var FilingReturnCreditModel The applied carry over credit documents + * @var string DEPRECATED - Date: 3/1/2018, Version: 18.3, Message: Please use rateTypeCode instead. Indicates the tax rate type. (See RateType::* for a list of allowable values) */ - public $appliedCarryOverCredits; + public $rateType; /** - * @var float Total amount of adjustments on this return + * @var string Indicates the code of the rate type. Use [ListRateTypesByCountry](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListRateTypesByCountry/) API for a full list of rate type codes. */ - public $totalAdjustments; + public $rateTypeCode; /** - * @var FilingAdjustmentModel[] The Adjustments for this return. + * @var float Tax Base - The adjusted taxable amount. */ - public $adjustments; + public $taxable; /** - * @var float Total amount of augmentations on this return + * @var float Tax Rate - The rate of taxation, as a fraction of the amount. */ - public $totalAugmentations; + public $rate; /** - * @var FilingAugmentationModel[] The Augmentations for this return. + * @var float Tax amount - The calculated tax (Base * Rate). */ - public $augmentations; + public $tax; /** - * @var float Total amount of payments on this return + * @var float The amount of tax that AvaTax calculated for the transaction. If you used a `taxOverride` of type `taxAmount`, there may be a difference between the `tax` field which applies your override, and the `TaxCalculated` field which represents the amount of tax that AvaTax calculated for this transaction without override. You can use this for comparison. */ - public $totalPayments; + public $taxCalculated; /** - * @var FilingPaymentModel[] The payments for this return. + * @var float The amount of the transaction that was non-taxable. */ - public $payments; + public $nonTaxable; /** - * @var FilingAttachmentModel[] The attachments for this return. + * @var float The amount of the transaction that was exempt. */ - public $attachments; + public $exemption; } /** - * Regions + * Tax Details by Tax subtype */ -class MultiTaxFilingRegionModel +class TaxDetailsByTaxSubType { /** - * @var string The two-character ISO-3166 code for the country. - */ - public $country; - /** - * @var string The two or three character region code for the region. - */ - public $region; - /** - * @var boolean Whether or not you have nexus in this region. - */ - public $hasNexus; - /** - * @var string The current status of the filing region. (See FilingStatusId::* for a list of allowable values) + * @var string Tax subtype */ - public $status; + public $taxSubType; /** - * @var FilingsTaxSummaryModel A summary of all taxes compbined for this period + * @var float Total taxable amount by tax type */ - public $regionTaxSummary; + public $totalTaxable; /** - * @var FilingsTaxDetailsModel[] A detailed breakdown of the taxes in this filing + * @var float Total exempt by tax type */ - public $regionTaxDetails; + public $totalExempt; /** - * @var FilingsCheckupSuggestedFormModel[] A list of tax returns in this region. + * @var float Total non taxable by tax type */ - public $suggestReturns; + public $totalNonTaxable; /** - * @var MultiTaxFilingReturnModel[] A list of tax returns in this region. + * @var float Total tax by tax type */ - public $returns; + public $totalTax; } /** - * Represents a listing of all tax calculation data for filings and for accruing to future filings. + * Tax Details by Tax Type */ -class MultiTaxFilingModel +class TaxDetailsByTaxType { /** - * @var int The unique ID number of this filing. - */ - public $id; - /** - * @var int The unique ID number of the company for this filing. - */ - public $companyId; - /** - * @var int The month of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var string Tax Type */ - public $month; + public $taxType; /** - * @var int The year of the filing period for this tax filing. The filing period represents the year and month of the last day of taxes being reported on this filing. For example, an annual tax filing for Jan-Dec 2015 would have a filing period of Dec 2015. + * @var float Total taxable amount by tax type */ - public $year; + public $totalTaxable; /** - * @var string Indicates whether this is an original or an amended filing. (See WorksheetTypeId::* for a list of allowable values) + * @var float Total exempt by tax type */ - public $type; + public $totalExempt; /** - * @var FilingsTaxSummaryModel A summary of all taxes combined for this period + * @var float Total non taxable by tax type */ - public $taxSummary; + public $totalNonTaxable; /** - * @var FilingsTaxDetailsModel[] A detailed breakdown of the taxes in this filing + * @var float Total tax by tax type */ - public $taxDetails; + public $totalTax; /** - * @var MultiTaxFilingRegionModel[] A listing of regional tax filings within this time period. + * @var TaxDetailsByTaxSubType[] Tax subtype details */ - public $filingRegions; + public $taxSubTypeDetails; } /** - * Rebuild a set of filings. + * Represents a message to be displayed on an invoice. */ -class RebuildFilingsModel +class InvoiceMessageModel { /** - * @var boolean Set this value to true in order to rebuild the filings. + * @var string The content of the invoice message. */ - public $rebuild; -} -/** - * Approve a set of filings. - */ -class ApproveFilingsModel -{ + public $content; /** - * @var boolean Set this value to true in order to approve the filings. + * @var string[] The applicable tax line numbers and codes. */ - public $approve; + public $lineNumbers; } /** - * Cycle Safe Expiration results. + * This object represents a single transaction; for example, a sales invoice or purchase order. */ -class FilingsCheckupAuthorityModel +class TransactionModel { /** - * @var int Unique ID of the tax authority + * @var int The unique ID number of this transaction. */ - public $taxAuthorityId; + public $id; /** - * @var string Location Code of the tax authority + * @var string A unique customer-provided code identifying this transaction. */ - public $locationCode; + public $code; /** - * @var string Name of the tax authority + * @var int The unique ID number of the company that recorded this transaction. */ - public $taxAuthorityName; + public $companyId; /** - * @var int Type Id of the tax authority + * @var string The date on which this transaction occurred. */ - public $taxAuthorityTypeId; + public $date; /** - * @var int Jurisdiction Id of the tax authority + * @var string DEPRECATED - Date: 07/25/2018, Version: 18.7, Message: This field is deprecated and will return null till its removed. The date when payment was made on this transaction. By default, this should be the same as the date of the transaction. */ - public $jurisdictionId; + public $paymentDate; /** - * @var float Amount of tax collected in this tax authority + * @var string The status of the transaction. (See DocumentStatus::* for a list of allowable values) */ - public $tax; + public $status; /** - * @var string Tax Type collected in the tax authority + * @var string The type of the transaction. Transactions of type `SalesOrder`, `ReturnOrder`, and so on are temporary estimates and will not be saved. Transactions of type `SalesInvoice, `ReturnInvoice`, and so on are permanent transactions that can be reported to tax authorities if they are in status `Committed`. A sales transaction represents a sale from the company to a customer. A purchase transaction represents a purchase made by the company. A return transaction represents a customer who decided to request a refund after purchasing a product from the company. An inventory transfer transaction represents goods that were moved from one location of the company to another location without changing ownership. (See DocumentType::* for a list of allowable values) */ - public $taxTypeId; + public $type; /** - * @var FilingsCheckupSuggestedFormModel[] Suggested forms to file due to tax collected + * @var string If this transaction was created as part of a batch, this code indicates which batch. */ - public $suggestedForms; -} -/** - * Results of the Worksheet Checkup report - */ -class FilingsCheckupModel -{ + public $batchCode; /** - * @var FilingsCheckupAuthorityModel[] A collection of authorities in the report + * @var string The three-character ISO 4217 currency code that was used for payment for this transaction. */ - public $authorities; -} -/** - * Account Linkage output model - */ -class FirmClientLinkageOutputModel -{ + public $currencyCode; /** - * @var int The unique ID number of firm-client linkage. + * @var string The three-character ISO 4217 exchange rate currency code that was used for payment for this transaction. */ - public $id; + public $exchangeRateCurrencyCode; /** - * @var int Firm Account to be linked with the firm + * @var string DEPRECATED - Date: 10/16/2017, Version: 17.11, Message: Please use entityUseCode instead. The customer usage type for this transaction. Customer usage types often affect exemption or taxability rules. */ - public $firmAccountId; + public $customerUsageType; /** - * @var string FIrm Account name + * @var string The entity use code for this transaction. Entity use codes often affect exemption or taxability rules. */ - public $firmAccountName; + public $entityUseCode; /** - * @var int Client Account to be linked with the firm + * @var string DEPRECATED - Date: 3/1/2018, Version: 18.3, Message: Please use `customerCode` This field has been renamed to `customerCode` to match documentation for other APIs related to exemption customers. */ - public $clientAccountId; + public $customerVendorCode; /** - * @var string Client Account name + * @var string Unique code identifying the customer that requested this transaction. When you specify a `customerCode`, AvaTax will look to see if a customer exists with this code in the exemption certificate system. If that customer exists, and if that customer has uploaded an exemption certificate that applies to this transaction, the relevant parts of this transaction that can use the exemption certificate will be treated as exempt. */ - public $clientAccountName; + public $customerCode; /** - * @var string Created date of the linkage + * @var string The customer Tax Id Number (tax_number) associated with a certificate - Sales tax calculation requests first determine if there is an applicable ECMS entry available, and will utilize it for exemption processing. If no applicable ECMS entry is available, the AvaTax service will determine if an Exemption Number field is populated or an Entity/Use Code is included in the sales tax calculation request, and will perform exemption processing using either of those two options. */ - public $createdDate; + public $exemptNo; /** - * @var int User who created the linkage + * @var boolean If this transaction has been reconciled against the company's ledger, this value is set to true. */ - public $createdUserId; + public $reconciled; /** - * @var string Modified date of the linkage + * @var string DEPRECATED - Date: 3/1/2018, Version: 18.3, Message: In order to ensure consistency of field names, Please use reportingLocationCode instead. This field has been replaced by the reportingLocationCode field */ - public $modifiedDate; + public $locationCode; /** - * @var int User who modified the linkage + * @var string For customers who use [location-based tax reporting](https://developer.avalara.com/avatax/dev-guide/locations/location-based-reporting), this field controls how this transaction will be filed for multi-location tax filings. If you specify a non-null value for this field, AvaTax will ensure that this transaction is reported on the tax return associated with the [LocationModel](https://developer.avalara.com/api-reference/avatax/rest/v2/models/LocationModel/) identified by this code. This field does not affect any addresses for the transaction. It only controls the tax filing behavior of this transaction. If you are looking for information about how to set up addresses for a transaction, please see [Using Address Types](https://developer.avalara.com/avatax/dev-guide/customizing-transaction/address-types/) in the AvaTax Developer Guide. */ - public $modifiedUserId; + public $reportingLocationCode; /** - * @var string The status of the account linkage. The following are the available statuses * Requested - When a linkage is requested * Approved - When the linkage is approved * Rejected - When the linkage is rejected * Revoked - When the linkage is revoked. (See FirmClientLinkageStatus::* for a list of allowable values) + * @var string The customer-supplied purchase order number of this transaction. + */ + public $purchaseOrderNo; + /** + * @var string A user-defined reference code for this transaction. + */ + public $referenceCode; + /** + * @var string The salesperson who provided this transaction. Not required. + */ + public $salespersonCode; + /** + * @var string If a tax override was applied to this transaction, indicates what type of tax override was applied. (See TaxOverrideType::* for a list of allowable values) + */ + public $taxOverrideType; + /** + * @var float If a tax override was applied to this transaction, indicates the amount of tax that was requested by the customer. + */ + public $taxOverrideAmount; + /** + * @var string If a tax override was applied to this transaction, indicates the reason for the tax override. */ - public $status; + public $taxOverrideReason; /** - * @var boolean This is set to 1 if the linkage is deleted. + * @var float The total amount of this transaction. */ - public $isDeleted; + public $totalAmount; /** - * @var string Name of the firm's point of contact person for the client + * @var float The amount of this transaction that was exempt. */ - public $firmContactName; + public $totalExempt; /** - * @var string Email of the firm's point of contact person for the client + * @var float The total amount of discounts applied to all lines within this transaction. */ - public $firmContactEmail; -} -/** - * Account Linkage Input model - */ -class FirmClientLinkageInputModel -{ + public $totalDiscount; /** - * @var int Client AccountId that needs to be linked to the firm + * @var float The total tax for all lines in this transaction. If you used a `taxOverride` of type `taxAmount` for any lines in this transaction, this value may be different than the amount of tax calculated by AvaTax. The amount of tax calculated by AvaTax will be stored in the `totalTaxCalculated` field, whereas this field will contain the total tax that was charged on the transaction. You can compare the `totalTax` and `totalTaxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. */ - public $clientAccountId; + public $totalTax; /** - * @var string Client AccountName that needs to be linked to the firm + * @var float The portion of the total amount of this transaction that was taxable. */ - public $clientAccountName; -} -/** - * Represents a request for a new account with Avalara for a new Firm client. - */ -class NewFirmClientAccountRequestModel -{ + public $totalTaxable; /** - * @var string The name of the account to create + * @var float The amount of tax that AvaTax calculated for the transaction. If you used a `taxOverride` of type `taxAmount` for any lines in this transaction, this value will represent the amount that AvaTax calculated for this transaction without applying the override. The field `totalTax` will be the total amount of tax after all overrides are applied. You can compare the `totalTax` and `totalTaxCalculated` fields to check for any discrepancies between an external tax calculation provider and the calculation performed by AvaTax. */ - public $accountName; + public $totalTaxCalculated; /** - * @var string First name of the primary contact person for this account + * @var string If this transaction was adjusted, indicates the unique ID number of the reason why the transaction was adjusted. (See AdjustmentReason::* for a list of allowable values) */ - public $firstName; + public $adjustmentReason; /** - * @var string Last name of the primary contact person for this account + * @var string If this transaction was adjusted, indicates a description of the reason why the transaction was adjusted. */ - public $lastName; + public $adjustmentDescription; /** - * @var string Title of the primary contact person for this account + * @var boolean If this transaction has been reported to a tax authority, this transaction is considered locked and may not be adjusted after reporting. */ - public $title; + public $locked; /** - * @var string Phone number of the primary contact person for this account + * @var string The two-or-three character ISO region code of the region for this transaction. */ - public $phoneNumber; + public $region; /** - * @var string Email of the primary contact person for this account + * @var string The two-character ISO 3166 code of the country for this transaction. */ - public $email; + public $country; /** - * @var string Company code to be assigned to the company created for this account. If no company code is provided, this will be defaulted to "DEFAULT" company code. + * @var int If this transaction was adjusted, this indicates the version number of this transaction. Incremented each time the transaction is adjusted. */ - public $companyCode; + public $version; /** - * @var CompanyAddress Address information of the account being created. + * @var string The software version used to calculate this transaction. */ - public $companyAddress; + public $softwareVersion; /** - * @var string United States Taxpayer ID number, usually your Employer Identification Number if you are a business or your Social Security Number if you are an individual. This value is required if the address provided is inside the US. Otherwise it is optional. + * @var int The unique ID number of the origin address for this transaction. */ - public $taxPayerIdNumber; + public $originAddressId; /** - * @var string[] Properties of the primary contact person for this account + * @var int The unique ID number of the destination address for this transaction. */ - public $properties; -} -/** - * Product classification input model. - */ -class ItemClassificationInputModel -{ + public $destinationAddressId; /** - * @var string The product code of an item in a given system. + * @var string If this transaction included foreign currency exchange, this is the date as of which the exchange rate was calculated. */ - public $productCode; + public $exchangeRateEffectiveDate; /** - * @var string The system code in which the product belongs. + * @var float If this transaction included foreign currency exchange, this is the exchange rate that was used. */ - public $systemCode; -} -/** - * Product classification output model. - */ -class ItemClassificationOutputModel -{ + public $exchangeRate; /** - * @var int The unique ID number of this product. + * @var boolean By default, the value is null, when the value is null, the value can be set at nexus level and used. If the value is not null, it will override the value at nexus level. If true, this seller was considered the importer of record of a product shipped internationally. If this transaction is not an international transaction, this field may be left blank. The "importer of record" is liable to pay customs and import duties for products shipped internationally. If you specify that the seller is the importer of record, then estimates of customs and import duties will be added as tax details to the transaction. Otherwise, the buyer is considered the importer of record, and customs and import duties will not be added to the tax details for this transaction. */ - public $id; + public $isSellerImporterOfRecord; /** - * @var int The unique ID number of the item this product belongs to. + * @var string Description of this transaction. Field permits unicode values. */ - public $itemId; + public $description; /** - * @var int The system id which the product belongs. + * @var string Email address associated with this transaction. */ - public $systemId; + public $email; /** - * @var string A unique code representing this item. + * @var string VAT business identification number used for this transaction. */ - public $productCode; + public $businessIdentificationNo; /** - * @var string A unique code representing this item. + * @var string The date/time when this record was last modified. */ - public $systemCode; -} -/** - * An abridged item model used for syncing product catalogs with AvaTax. - */ -class ItemSyncModel -{ + public $modifiedDate; /** - * @var string A unique code representing this item. + * @var int The user ID of the user who last modified this record. */ - public $itemCode; + public $modifiedUserId; /** - * @var string A friendly description of the item. If your company has enrolled in Streamlined Sales Tax, this description must be auditable. + * @var string Tax date for this transaction */ - public $description; + public $taxDate; /** - * @var string A group to which the item belongs. + * @var TransactionLineModel[] A list of line items in this transaction. To fetch this list, add the query string `?$include=Lines` or `?$include=Details` to your URL. */ - public $itemGroup; + public $lines; /** - * @var string The tax code of the item (optional) + * @var TransactionAddressModel[] A list of line items in this transaction. To fetch this list, add the query string `?$include=Addresses` to your URL. For more information about transaction addresses, please see [Using Address Types](https://developer.avalara.com/avatax/dev-guide/customizing-transaction/address-types/) in the AvaTax Developer Guide. */ - public $taxCode; -} -/** - * Represents a request to sync items. - */ -class SyncItemsRequestModel -{ + public $addresses; /** - * @var ItemSyncModel[] A list of items to sync with AvaTax. + * @var TransactionLocationTypeModel[] A list of location types in this transaction. To fetch this list, add the query string `?$include=Addresses` to your URL. */ - public $items; -} -/** - * The response returned after an item sync was requested. - */ -class SyncItemsResponseModel -{ + public $locationTypes; /** - * @var string The status of the request + * @var TransactionSummary[] Contains a summary of tax on this transaction. */ - public $status; -} -/** - * Tells you whether this location object has been correctly set up to the local jurisdiction's standards - */ -class LocationValidationModel -{ + public $summary; /** - * @var boolean True if the location has a value for each jurisdiction-required setting. The user is required to ensure that the values are correct according to the jurisdiction; this flag does not indicate whether the taxing jurisdiction has accepted the data you have provided. + * @var TaxDetailsByTaxType[] Contains the tax details per tax type */ - public $settingsValidated; + public $taxDetailsByTaxType; /** - * @var LocationQuestionModel[] A list of settings that must be defined for this location + * @var TransactionParameterModel[] Contains a list of extra parameters that were set when the transaction was created. */ - public $requiredSettings; -} -/** - * Expire a location without restriction then update with new remittance and dates. - */ -class UpdateCompanyLocationRemittanceModel -{ + public $parameters; /** - * @var string Indicates whether this location is a physical place of business or a temporary salesperson location. (See AddressCategoryId::* for a list of allowable values) + * @var TransactionUserDefinedFieldModel[] Custom user fields/flex fields for this transaction. */ - public $addressCategoryId; + public $userDefinedFields; /** - * @var string The date when this location was opened for business. + * @var AvaTaxMessage[] List of informational and warning messages regarding this API call. These messages are only relevant to the current API call. */ - public $effectiveDate; + public $messages; /** - * @var string If this place of business has closed, the date when this location closed business. If null it'll be set to the date of 9998-12-31. + * @var InvoiceMessageModel[] Invoice messages associated with this document. Currently, this stores legally-required VAT messages. */ - public $endDate; -} -/** - * Commit this MultiDocument object so that all transactions within it can be reported on a tax filing. - */ -class CommitMultiDocumentModel -{ + public $invoiceMessages; /** - * @var string Represents the unique code of this MultiDocument transaction. A MultiDocument transaction is uniquely identified by its `accountId`, `code`, and `type`. /// + * @var string The name of the supplier / exporter / seller. For sales doctype this will be the name of your own company for which you are reporting. For purchases doctype this will be the name of the supplier you have purchased from. */ - public $code; + public $customerSupplierName; /** - * @var string Represents the document type of this MultiDocument transaction. For more information about document types, see [DocumentType](https://developer.avalara.com/api-reference/avatax/rest/v2/models/enums/DocumentType/). A MultiDocument transaction is uniquely identified by its `accountId`, `code`, and `type`. (See DocumentType::* for a list of allowable values) + * @var int The Id of the datasource from which this transaction originated. This value will be overridden by the system to take the datasource Id from the call header. */ - public $type; + public $dataSourceId; /** - * @var boolean Set this value to be `true` to commit this transaction. Committing a transaction allows it to be reported on a tax filing. Uncommitted transactions will not be reported. + * @var string The Delivery Terms is a field used in conjunction with Importer of Record to influence whether AvaTax includes Import Duty and Tax values in the transaction totals or not. Delivered at Place (DAP) and Delivered Duty Paid (DDP) are two delivery terms that indicate that Import Duty and Tax should be included in the transaction total. This field is also used for reports. This field is used for future feature support. This field is not currently in use. (See DeliveryTerms::* for a list of allowable values) */ - public $commit; + public $deliveryTerms; } /** * A MultiDocument transaction represents a sale or purchase that occurred between more than two companies. @@ -9899,14 +10185,22 @@ class MultiDocumentLineItemModel * @var TransactionLineParameterModel[] Special parameters that apply to this line within this transaction. To get a full list of available parameters, please use the `ListParameters` API. */ public $parameters; + /** + * @var TransactionLineUserDefinedFieldModel[] Custom user fields/flex fields for this line. + */ + public $userDefinedFields; /** * @var string The Item code for Custom Duty / Global Import tax determination Harmonized Tariff System code for this transaction. For a list of harmonized tariff codes, see the Definitions API for harmonized tariff codes. */ public $hsCode; /** - * @var int ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. + * @var int DEPRECATED - Date: 04/15/2021, Version: 21.4, Message: Please use merchantSellerIdentifier instead. ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. */ public $merchantSellerId; + /** + * @var string ID of the merchant selling on the Marketplace. This field must be populated by Marketplace. + */ + public $merchantSellerIdentifier; /** * @var string This field will identify who is remitting Marketplace or Seller. This field must be populated by Marketplace. (See MarketplaceLiabilityType::* for a list of allowable values) */ @@ -9919,6 +10213,14 @@ class MultiDocumentLineItemModel * @var string Synonym of Marketplace Origination. Name of the Marketplace where the transaction originated from. */ public $originationSite; + /** + * @var string Product category breadcrumbs. This is the full path to the category where item is included. Categories should be separated by “ > “. Multiple category paths per item are accepted. In this case, category paths should be separated by “;”. + */ + public $category; + /** + * @var string A long description of the product. + */ + public $summary; } /** * A MultiDocument transaction represents a sale or purchase that occurred between more than two companies. @@ -9990,6 +10292,10 @@ class CreateMultiDocumentModel * @var TransactionParameterModel[] Special parameters for this transaction. To get a full list of available parameters, please use the [ListParameters](https://developer.avalara.com/api-reference/avatax/rest/v2/methods/Definitions/ListParameters/) endpoint. */ public $parameters; + /** + * @var TransactionUserDefinedFieldModel[] Custom user fields/flex fields for this transaction. + */ + public $userDefinedFields; /** * @var string Customer-provided Reference Code with information about this transaction. This field could be used to reference the original document for a return invoice, or for any other reference purpose. */ @@ -10062,6 +10368,10 @@ class CreateMultiDocumentModel * @var int The Id of the datasource from which this transaction originated. This value will be overridden by the system to take the datasource Id from the call header. */ public $dataSourceId; + /** + * @var string The Delivery Terms is a field used in conjunction with Importer of Record to influence whether AvaTax includes Import Duty and Tax values in the transaction totals or not. Delivered at Place (DAP) and Delivered Duty Paid (DDP) are two delivery terms that indicate that Import Duty and Tax should be included in the transaction total. This field is also used for reports. This field is used for future feature support. This field is not currently in use. (See DeliveryTerms::* for a list of allowable values) + */ + public $deliveryTerms; } /** * Replace an existing MultiDocument transaction recorded in AvaTax with a new one. @@ -10704,6 +11014,42 @@ class NoticeModel */ public $modifiedUserId; } +/** + * Model to create a new tax notice responsibility type. + */ +class CreateNoticeResponsibilityTypeModel +{ + /** + * @var string The description name of this notice responsibility + */ + public $description; + /** + * @var boolean Defines if the responsibility is active + */ + public $isActive; + /** + * @var int The sort order of this responsibility + */ + public $sortOrder; +} +/** + * Model to create a new tax notice root cause type. + */ +class CreateNoticeRootCauseTypeModel +{ + /** + * @var string The description name of this notice RootCause + */ + public $description; + /** + * @var boolean Defines if the RootCause is active + */ + public $isActive; + /** + * @var int The sort order of this RootCause + */ + public $sortOrder; +} /** * Encapsulates the result of uploading a file to the resource system */ @@ -10876,14 +11222,6 @@ class ExportDocumentLineModel * @var string The transaction type you want to run a report on (See ReportDocType::* for a list of allowable values) */ public $docType; - /** - * @var string Format of dates in your rendered report. Example: "MM/dd/yyyy" - */ - public $dateFormat; - /** - * @var string In which culture your report is produced with. Example: "en-US" - */ - public $culture; /** * @var string The currency your report is displayed in. Example: "USD" */ @@ -10901,9 +11239,9 @@ class ExportDocumentLineModel */ public $isLocked; /** - * @var int If set, include only documents associated with this merchantSellerId. + * @var string If set, include only documents associated with this merchantSellerId. */ - public $merchantSellerId; + public $merchantSellerIdentifier; } /** * The output model for report parameter definitions @@ -10959,7 +11297,7 @@ class ReportParametersModel */ public $isLocked; /** - * @var int If set, include only documents associated with this merchantSellerId. + * @var string If set, include only documents associated with this merchantSellerId. */ public $merchantSellerId; }