From 50768fa8179c83095589e4b75cc53dd22f5067f0 Mon Sep 17 00:00:00 2001 From: svc-developer Date: Tue, 23 Apr 2024 17:22:18 +0000 Subject: [PATCH] 24.4.2 --- src/Constants.php | 174 +++++++++++----- src/Methods.php | 123 ++--------- src/Models.php | 505 ++++++++++++++++++++++++++++++++++++++++------ 3 files changed, 575 insertions(+), 227 deletions(-) diff --git a/src/Constants.php b/src/Constants.php index 6dbacd0..0b37011 100644 --- a/src/Constants.php +++ b/src/Constants.php @@ -2,7 +2,7 @@ namespace Avalara; use GuzzleHttp\Client; -define('AVATAX_SDK_VERSION', '24.2.0'); +define('AVATAX_SDK_VERSION', '24.4.2'); /***************************************************************************** * * @@ -357,6 +357,24 @@ class StackAggregationOption } +/** + * Swagger Name: AvaTaxClient + * AP Config Tolerance Type + */ +class ApConfigToleranceType +{ + /** + * RealTime + */ + const C_REALTIME = 0; + + /** + * Batch + */ + const C_BATCH = 1; + +} + /** * Swagger Name: AvaTaxClient * Status of an Avalara account @@ -537,6 +555,24 @@ class AdjustmentReason } +/** + * Swagger Name: AvaTaxClient + * + */ +class BulkImportStatus +{ const C_NONE = 0; + const C_SUCCESS = 1; + const C_CREATED = 2; + const C_UPDATED = 4; + const C_NOTIMPORTED = 8; + const C_IGNORED = 16; + const C_ERROR = 32; + const C_VALIDATIONFAILED = 64; + const C_PARTIALSUCCESS = 128; + const C_INVALID = 256; + +} + /** * Swagger Name: AvaTaxClient * Indicates what level of auditing information is available for a transaction @@ -1669,6 +1705,7 @@ class ErrorCodeId const C_INVALIDFILENAME = 1737; const C_NOCLASSIFICATIONFORSAMEHSCODE = 1738; const C_INVALIDVALUEERROR = 1739; + const C_ITEMDUALWRITEPARAMETERVALUEMISMATCHERROR = 1740; /** * SendSales API errors @@ -1740,6 +1777,7 @@ class ErrorCodeId const C_FIELDLENGTHERROR = 2400; const C_INPUTCONTAINSBLACKLISTEDCHARACTERS = 2401; const C_CANNOTCREATENESTEDOBJECTS = 2402; + const C_INVALIDUSERNAME = 2403; /** * User's SubjectId not updated by DB query @@ -2660,119 +2698,119 @@ class AddressCategoryId /** * Swagger Name: AvaTaxClient - * Types of jurisdiction referenced in a transaction + * Describes the different types of statuses which describe an entity (company). */ -class JurisTypeId +class NexusTypeId { /** - * State + * Indicates no nexus */ - const C_STA = 1; + const C_NONE = 0; /** - * County + * Indicates the entity is voluntarily collecting tax (default) */ - const C_CTY = 2; + const C_SALESORSELLERSUSETAX = 1; /** - * City + * Indicates the entity is required to collect tax in the state */ - const C_CIT = 3; + const C_SALESTAX = 2; /** - * Special + * Indicates the entity is registered as a Volunteer in an SST state. + * Only your SST administrator may set this option. */ - const C_STJ = 4; + const C_SSTVOLUNTEER = 3; /** - * Country + * Indicates the entity is registered as a Non-Volunteer in an SST state. + * Only your SST administrator may set this option. */ - const C_CNT = 5; + const C_SSTNONVOLUNTEER = 4; } /** * Swagger Name: AvaTaxClient - * Describes the different types of statuses which describe an entity (company). + * Describes nexus type id */ -class NexusTypeId +class LocalNexusTypeId { /** - * Indicates no nexus - */ - const C_NONE = 0; - - /** - * Indicates the entity is voluntarily collecting tax (default) - */ - const C_SALESORSELLERSUSETAX = 1; - - /** - * Indicates the entity is required to collect tax in the state + * Only the specific nexus objects declared for this company are declared. */ - const C_SALESTAX = 2; + const C_SELECTED = 0; /** - * Indicates the entity is registered as a Volunteer in an SST state. - * Only your SST administrator may set this option. + * Customer declares nexus in all state administered taxing authorities. + * + * This value only takes effect if you set `hasLocalNexus` = true. */ - const C_SSTVOLUNTEER = 3; + const C_STATEADMINISTERED = 1; /** - * Indicates the entity is registered as a Non-Volunteer in an SST state. - * Only your SST administrator may set this option. + * Customer declares nexus in all local taxing authorities. + * + * This value only takes effect if you set `hasLocalNexus` = true. */ - const C_SSTNONVOLUNTEER = 4; + const C_ALL = 2; } /** * Swagger Name: AvaTaxClient - * Sourcing + * Types of jurisdiction referenced in a transaction */ -class Sourcing +class JurisTypeId { /** - * Mixed sourcing, for states that do both origin and destination calculation + * State */ - const C_MIXED = 42; + const C_STA = 1; /** - * Destination + * County */ - const C_DESTINATION = 68; + const C_CTY = 2; /** - * Origin + * City */ - const C_ORIGIN = 79; + const C_CIT = 3; + + /** + * Special + */ + const C_STJ = 4; + + /** + * Country + */ + const C_CNT = 5; } /** * Swagger Name: AvaTaxClient - * Describes nexus type id + * Sourcing */ -class LocalNexusTypeId +class Sourcing { /** - * Only the specific nexus objects declared for this company are declared. + * Mixed sourcing, for states that do both origin and destination calculation */ - const C_SELECTED = 0; + const C_MIXED = 42; /** - * Customer declares nexus in all state administered taxing authorities. - * - * This value only takes effect if you set `hasLocalNexus` = true. + * Destination */ - const C_STATEADMINISTERED = 1; + const C_DESTINATION = 68; /** - * Customer declares nexus in all local taxing authorities. - * - * This value only takes effect if you set `hasLocalNexus` = true. + * Origin */ - const C_ALL = 2; + const C_ORIGIN = 79; } @@ -3342,6 +3380,36 @@ class DeemedSellerType } +/** + * Swagger Name: AvaTaxClient + * /// The user can set some tolerance or threshold limits inorder to take appropriate actions when + * their transactions are above or below certain threshold limits. + * Account Payable (AP) status code indicates an action that needs to be taken when the tolerance/threshold falls between certain range. + */ +class APStatus +{ const C_PAYASBILLEDMATCH = 0; + const C_SHORTPAYITEMSACCRUEMATCH = 1; + const C_MARKFORREVIEWMATCH = 2; + const C_REJECTMATCH = 3; + const C_PAYASBILLEDNOACCRUAL = 4; + const C_PAYASBILLEDACCRUEUNDERCHARGE = 5; + const C_SHORTPAYITEMSACCRUEUNDERCHARGE = 6; + const C_MARKFORREVIEWUNDERCHARGE = 7; + const C_REJECTUNDERCHARGE = 8; + const C_PAYASBILLEDOVERCHARGE = 9; + const C_SHORTPAYAVALARACALCULATED = 10; + const C_SHORTPAYITEMSACCRUEOVERCHARGE = 11; + const C_MARKFORREVIEWOVERCHARGE = 12; + const C_REJECTOVERCHARGE = 13; + const C_AMOUNTTHRESHOLDNOTMET = 14; + const C_COSTCENTEREXEMPTED = 15; + const C_ITEMEXEMPTED = 16; + const C_TRUSTEDVENDOR = 17; + const C_ACCRUEDBYVENDOR = 18; + const C_IGNORED = 19; + +} + /** * Swagger Name: AvaTaxClient * Indicates the level of companies that can be accessed diff --git a/src/Methods.php b/src/Methods.php index 636f196..2028e8a 100644 --- a/src/Methods.php +++ b/src/Methods.php @@ -457,103 +457,6 @@ public function resolveAddressPost($model) { return $this->restCall($path, 'POST', $guzzleParams, AVATAX_SDK_VERSION ); } - /** - * Create a lookup file for a company - * - * - * Swagger Name: AvaTaxClient - * - * @param int $accountId The ID of the account for the company - * @param int $companyId The ID of the company for which the lookup file is to be created - * @param AdvancedRuleLookupFileModel $model The lookup file you wish to create - * @return \stdClass - */ - public function createCompanyLookupFile($accountId, $companyId, $model) { - $path = "/api/v2/advancedrules/accounts/{$accountId}/companies/{$companyId}/lookupFiles"; - $guzzleParams = [ - 'query' => [], - 'body' => json_encode($model) - ]; - return $this->restCall($path, 'POST', $guzzleParams, AVATAX_SDK_VERSION ); - } - - /** - * Delete a lookup file - * - * - * Swagger Name: AvaTaxClient - * - * @param int $accountId The ID of the account for the company the lookup file is for - * @param string $id The unique ID/GUID for the company lookup file to be deleted - * @return \stdClass - */ - public function deleteLookupFile($accountId, $id) { - $path = "/api/v2/advancedrules/accounts/{$accountId}/lookupFiles/{$id}"; - $guzzleParams = [ - 'query' => [], - 'body' => null - ]; - return $this->restCall($path, 'DELETE', $guzzleParams, AVATAX_SDK_VERSION ); - } - - /** - * Get the lookup files for a company - * - * - * Swagger Name: AvaTaxClient - * - * @param int $accountId The account ID for the company - * @param int $companyId The ID of the company for which to retrieve lookup files - * @return \stdClass - */ - public function getCompanyLookupFiles($accountId, $companyId) { - $path = "/api/v2/advancedrules/accounts/{$accountId}/companies/{$companyId}/lookupFiles"; - $guzzleParams = [ - 'query' => [], - 'body' => null - ]; - return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); - } - - /** - * Get a lookup file for an accountId and companyLookupFileId - * - * - * Swagger Name: AvaTaxClient - * - * @param int $accountId The ID of the account for the lookup file - * @param string $id The unique ID/GUID of the company lookup file to return - * @return \stdClass - */ - public function getLookupFile($accountId, $id) { - $path = "/api/v2/advancedrules/accounts/{$accountId}/lookupFiles/{$id}"; - $guzzleParams = [ - 'query' => [], - 'body' => null - ]; - return $this->restCall($path, 'GET', $guzzleParams, AVATAX_SDK_VERSION ); - } - - /** - * Update a lookup file - * - * - * Swagger Name: AvaTaxClient - * - * @param int $accountId The ID of the account for the company the lookup file is for - * @param string $id The unique ID/GUID of the company lookup file to be updated - * @param AdvancedRuleLookupFileModel $model The new values to update the lookup file - * @return \stdClass - */ - public function updateLookupFile($accountId, $id, $model) { - $path = "/api/v2/advancedrules/accounts/{$accountId}/lookupFiles/{$id}"; - $guzzleParams = [ - 'query' => [], - 'body' => json_encode($model) - ]; - return $this->restCall($path, 'PUT', $guzzleParams, AVATAX_SDK_VERSION ); - } - /** * Create new rule * @@ -580,7 +483,7 @@ public function createAPConfigSetting($companyid, $model) { * Swagger Name: AvaTaxClient * * @param int $companyid The ID of the company that defined this rule - * @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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + * @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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent, apConfigToleranceType, payAsBilledNoAccrual, payAsBilledAccrueUndercharge, shortPayItemsAccrueUndercharge, markForReviewUndercharge, rejectUndercharge, payAsBilledOvercharge, shortPayAvalaraCalculated, shortPayItemsAccrueOvercharge, markForReviewOvercharge, rejectOvercharge, isActive * @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. @@ -602,7 +505,7 @@ public function getAPConfigSettingByCompany($companyid, $filter=null, $include=n * * Swagger Name: AvaTaxClient * - * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent + * @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:* meta, amount, varianceForIgnore, varianceForAccrue, variancePercent, apConfigToleranceType, payAsBilledNoAccrual, payAsBilledAccrueUndercharge, shortPayItemsAccrueUndercharge, markForReviewUndercharge, rejectUndercharge, payAsBilledOvercharge, shortPayAvalaraCalculated, shortPayItemsAccrueOvercharge, markForReviewOvercharge, rejectOvercharge, isActive * @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. @@ -4206,7 +4109,7 @@ public function listMarketplaceLocations($marketplaceId, $top=null, $skip=null, * This API is intended to be useful if your user interface needs to display a selectable list of nexus. * Swagger Name: AvaTaxClient * - * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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`. @@ -4238,7 +4141,7 @@ public function listNexus($filter=null, $top=null, $skip=null, $orderBy=null) * @param string $region Name or ISO 3166 code identifying the region portion of the address. 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`. * @param string $postalCode The postal code or zip code portion of this address. * @param string $country Name or ISO 3166 code identifying the country portion of this address. 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`. - * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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`. @@ -4262,7 +4165,7 @@ public function listNexusByAddress($line1, $line2, $line3, $city, $region, $post * Swagger Name: AvaTaxClient * * @param string $country The country in which you want to fetch the system nexus - * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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`. @@ -4287,7 +4190,7 @@ public function listNexusByCountry($country, $filter=null, $top=null, $skip=null * * @param string $country The two-character ISO-3166 code for the country. * @param string $region The two or three character region code for the region. - * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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`. @@ -4343,7 +4246,7 @@ public function listNexusByFormCode($formCode) { * Swagger Name: AvaTaxClient * * @param string $taxTypeGroup The tax type group to fetch the supporting system nexus for. - * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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`. @@ -8261,7 +8164,7 @@ public function getNexusParameter($companyId, $nexusId, $id) { * Swagger Name: AvaTaxClient * * @param int $companyId The ID of the company that owns these nexus objects - * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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. @@ -8299,7 +8202,7 @@ public function listNexusByCompany($companyId, $filter=null, $include=null, $top * * @param int $companyId The ID of the company that owns these nexus objects * @param string $taxTypeGroup Name of TaxTypeGroup to filter by - * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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. @@ -8370,7 +8273,7 @@ public function listNexusParameters($companyId, $nexusId, $filter=null, $top=nul * * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser. * Swagger Name: AvaTaxClient * - * @param string $filter A filter statement to identify specific records to retrieve. For more information on filtering, see [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/).
*Not filterable:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters, taxableNexus + * @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:* streamlinedSalesTax, isSSTActive, taxTypeGroup, taxAuthorityId, taxName, parameters * @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. @@ -8688,8 +8591,8 @@ public function requestNewAccount($model) { /** * Request a new entitilement to an existing customer * - * This API is for use by partner provisioning services customers only. This will allow the partners to allow - * the add new entitlement to an existing customer + * This API is for use by partner provisioning services customers only. This allows the partners to add + * new entitlements to an existing customer. * * ### Security Policies * @@ -10881,7 +10784,7 @@ public function getVarianceReportByCompanyCodeByTransactionId($companyCode, $tra * @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, userDefinedFields, messages, invoiceMessages, isFakeTransaction, deliveryTerms + * @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, apStatusCode, apStatus * @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 475302c..55fa0b8 100644 --- a/src/Models.php +++ b/src/Models.php @@ -60,21 +60,69 @@ class ACHEntryDetailModel class APConfigSettingRequestModel { /** - * @var int The Amount + * @var float The Amount */ public $amount; /** - * @var int The Variance For Ignore + * @var float The Variance For Ignore */ public $varianceForIgnore; /** - * @var int The Variance For Accrue + * @var float The Variance For Accrue */ public $varianceForAccrue; /** - * @var int The Variance Percent + * @var float The Variance Percent */ public $variancePercent; + /** + * @var string The Ap Config Tolerance Type BATCH or REALTIME (See ApConfigToleranceType::* for a list of allowable values) + */ + public $apConfigToleranceType; + /** + * @var float Pay Billed Do Not Accrue + */ + public $payAsBilledNoAccrual; + /** + * @var float Pay Billed Accrue + */ + public $payAsBilledAccrueUndercharge; + /** + * @var float ShortPay Items UnderCharge + */ + public $shortPayItemsAccrueUndercharge; + /** + * @var float Review UnderCharge + */ + public $markForReviewUndercharge; + /** + * @var float Reject UnderCharge + */ + public $rejectUndercharge; + /** + * @var float Pay As BilledOvercharge + */ + public $payAsBilledOvercharge; + /** + * @var float Short Pay Avalara CalculatedTax + */ + public $shortPayAvalaraCalculated; + /** + * @var float Short Pay Items + */ + public $shortPayItemsAccrueOvercharge; + /** + * @var float Review OverCharge + */ + public $markForReviewOvercharge; + /** + * @var float Reject OverCharge + */ + public $rejectOvercharge; + /** + * @var boolean Is Active + */ + public $isActive; } /** * AP Config Setting Response Model @@ -95,21 +143,69 @@ class APConfigSettingSuccessResponseModel */ public $meta; /** - * @var int The Amount + * @var float The Amount */ public $amount; /** - * @var int The Variance For Ignore + * @var float The Variance For Ignore */ public $varianceForIgnore; /** - * @var int The Variance For Accrue + * @var float The Variance For Accrue */ public $varianceForAccrue; /** - * @var int The Variance Percent + * @var float The Variance Percent */ public $variancePercent; + /** + * @var string The Ap Config Tolerance Type BATCH or REALTIME (See ApConfigToleranceType::* for a list of allowable values) + */ + public $apConfigToleranceType; + /** + * @var float Pay Billed Do Not Accrue + */ + public $payAsBilledNoAccrual; + /** + * @var float Pay Billed Accrue + */ + public $payAsBilledAccrueUndercharge; + /** + * @var float ShortPay Items UnderCharge + */ + public $shortPayItemsAccrueUndercharge; + /** + * @var float Review UnderCharge + */ + public $markForReviewUndercharge; + /** + * @var float Reject UnderCharge + */ + public $rejectUndercharge; + /** + * @var float Pay As BilledOvercharge + */ + public $payAsBilledOvercharge; + /** + * @var float Short Pay Avalara CalculatedTax + */ + public $shortPayAvalaraCalculated; + /** + * @var float Short Pay Items + */ + public $shortPayItemsAccrueOvercharge; + /** + * @var float Review OverCharge + */ + public $markForReviewOvercharge; + /** + * @var float Reject OverCharge + */ + public $rejectOvercharge; + /** + * @var boolean Is Active + */ + public $isActive; } /** * Represents one configuration setting for this account @@ -270,6 +366,10 @@ class AccountModel * @var boolean Is Saml based authentication used by this account for user to login via AI. */ public $isSamlEnabled; + /** + * @var boolean A boolean flag to identify if the account is deleted + */ + public $isDeleted; } /** * Specifies a duration for which to grant TSA accounts write access. @@ -622,6 +722,40 @@ class AdjustTransactionModel */ public $newTransaction; } +/** + * Input model for the Advanced Rules bulk import API + * Swagger Name: AvaTaxClient + */ +class AdvancedRuleBulkImportModel +{ + /** + * @var boolean Flag to try updating existing rules instead of just append + */ + public $replaceExisting; + /** + * @var AdvancedRuleExecutionModel[] List of rule executions to import + */ + public $executions; +} +/** + * Output model for the Advanced Rules bulk import API + * Swagger Name: AvaTaxClient + */ +class AdvancedRuleBulkImportResultModel +{ + /** + * @var string Aggregated import result code (See BulkImportStatus::* for a list of allowable values) + */ + public $importResult; + /** + * @var string Aggregated import result message + */ + public $importMessage; + /** + * @var AdvancedRuleImportResultModel[] Import results for individual rule executions + */ + public $executions; +} /** * Model for retrieving customer data schema * Swagger Name: AvaTaxClient @@ -683,6 +817,22 @@ class AdvancedRuleExecutionModel * @var string Unique identifier of customer data used in rule execution */ public $customerDataId; + /** + * @var string Creator of the rule + */ + public $createdBy; + /** + * @var string When the rule execution was created + */ + public $createdOn; + /** + * @var string Last updater of the rule execution + */ + public $modifiedBy; + /** + * @var string When the rule execution was last updated + */ + public $modifiedOn; } /** * Model for updating rule execution order @@ -701,18 +851,6 @@ class AdvancedRuleExecutionOrderModel */ class AdvancedRuleFullDetailsModel { - /** - * @var string The code script for the rule - */ - public $script; - /** - * @var string Script run for validating customer data - */ - public $customerDataValidatorScript; - /** - * @var boolean Has the rule been approved - */ - public $isApproved; /** * @var string Creator of the rule */ @@ -721,18 +859,6 @@ class AdvancedRuleFullDetailsModel * @var string When the rule was created */ public $createdOn; - /** - * @var string Last updater of the rule - */ - public $modifiedBy; - /** - * @var string When the rule was last updated - */ - public $modifiedOn; - /** - * @var string Approver of the rule - */ - public $approvedBy; /** * @var boolean Is this a system rule as opposed to customer-facing */ @@ -753,10 +879,6 @@ class AdvancedRuleFullDetailsModel * @var int The version of the rule */ public $version; - /** - * @var int[] Account Ids the rule is visible for in CUP, when IsVisibleInCUP = false - */ - public $accountsVisibleFor; /** * @var string Unique identifier for a rule */ @@ -778,6 +900,33 @@ class AdvancedRuleFullDetailsModel */ public $executionPosition; } +/** + * Model for the results of importing a single rule execution with the Advanced Rules bulk import API + * Swagger Name: AvaTaxClient + */ +class AdvancedRuleImportResultModel +{ + /** + * @var string Name of rule execution + */ + public $name; + /** + * @var string Import result status code (e.g. Success, ValidationFailed, NotCreated, etc.) + */ + public $importResult; + /** + * @var string Import result status message (e.g. list of validation errors) + */ + public $importDetails; + /** + * @var string Rule execution unique identifier + */ + public $ruleExecutionId; + /** + * @var string Unique identifier of rule to execute + */ + public $ruleId; +} /** * Model representing a lookup file for a company * Swagger Name: AvaTaxClient @@ -852,32 +1001,6 @@ class AdvancedRuleModel */ public $executionPosition; } -/** - * Model for toggling visibility of an advanced rule for an account - * Swagger Name: AvaTaxClient - */ -class AdvancedRuleVisibilityModel -{ - /** - * @var boolean Should the rule be visible or not visible - */ - public $isVisible; - /** - * @var int The account Id for which the rule is to be visible/not visible - */ - public $accountId; -} -/** - * Model for changing the approved status of an advanced rule - * Swagger Name: AvaTaxClient - */ -class ApproveAdvancedRuleModel -{ - /** - * @var boolean Should the rule be approved - */ - public $isApproved; -} /** * Approve a set of filings. * Swagger Name: AvaTaxClient @@ -2310,6 +2433,10 @@ class CompanyModel * @var CustomerSupplierModel[] The customers and suppliers of a company */ public $supplierandcustomers; + /** + * @var boolean A boolean flag to identify if the company is deleted + */ + public $isDeleted; } /** * Represents a parameter associated with a company. @@ -2719,7 +2846,7 @@ class ComplianceStateConfigModel */ public $country; /** - * @var int IsJaasEnabled + * @var boolean IsJaasEnabled */ public $isJaasEnabled; /** @@ -2781,6 +2908,26 @@ class ComplianceTaxRateModel * @var int The rate type tax type mapping id. */ public $rateTypeTaxTypeMappingId; + /** + * @var string The date this rate was created. + */ + public $createDate; + /** + * @var string The Source. + */ + public $source; + /** + * @var string The currency Code. + */ + public $currencyCode; + /** + * @var int The uom Id. + */ + public $uomId; + /** + * @var string The date this rate was modified. + */ + public $modifiedDate; } /** * A contact person for a company. @@ -4460,9 +4607,21 @@ class DeterminationFactorModel */ public $names; /** - * @var string The name of the user who created the determination factor. + * @var string[] The name of the user who created any applied determination factor. */ public $createdBy; + /** + * @var string The determination factor entityUseCode. + */ + public $entityUseCode; + /** + * @var string The determination factor exemptCertId. + */ + public $exemptCertId; + /** + * @var string The determination factor exemptNo. + */ + public $exemptNo; } /** * ViewModel to receive DomainName from user @@ -8248,6 +8407,10 @@ class JurisdictionNexusModel * @var string TaxName for Nexus of Jurisdiction */ public $taxName; + /** + * @var boolean Shows if system nexus records are associated with tax collection + */ + public $taxableNexus; } /** * Represents an override of tax jurisdictions for a specific address. @@ -9610,6 +9773,108 @@ class NexusByTaxFormModel */ public $companyNexus; } +/** + * Reponse model for the returns specific nexus fetch API + * Swagger Name: AvaTaxClient + */ +class NexusForReturnsModel +{ + /** + * @var int The nexus's id + */ + public $id; + /** + * @var int Company Id + */ + public $companyId; + /** + * @var int For region nexus, the assigned id for the country. For country nexus, null. + */ + public $assignedToCountryId; + /** + * @var string The two character ISO-3166 country code of the country in which this company declared nexus. + */ + public $country; + /** + * @var string The two or three character ISO region code of the region, state, or province in which this company declared nexus. + */ + public $region; + /** + * @var string Jurisdiction Name + */ + public $jurisName; + /** + * @var string Nexus Tax Type Group + */ + public $nexusTaxTypeGroup; + /** + * @var string Nexus Type + */ + public $nexusTypeId; + /** + * @var boolean Has Local Nexus? + */ + public $hasLocalNexus; + /** + * @var string Local Nexus Tax Type or null if no local nexus + */ + public $localNexusType; + /** + * @var int The id of the SST nexus record if there is one. + */ + public $sstNexusId; + /** + * @var string If has SST Nexus, the nexus type id of the nexus + */ + public $sstType; + /** + * @var string Min the effective Date can be + */ + public $effectiveDate; + /** + * @var string Max the end date can be + */ + public $endDate; + /** + * @var string SST Effective Date + */ + public $sstEffectiveDate; + /** + * @var string SST End Date + */ + public $sstEndDate; + /** + * @var boolean Has nexus parameter IsRemoteSeller? + */ + public $isRemoteSeller; +} +/** + * Request model for the returns specific nexus fetch API + * Swagger Name: AvaTaxClient + */ +class NexusForReturnsRequestModel +{ + /** + * @var string Description of the desired nexus tax type group (e.g. SalesAndUse, Lodging, etc.) + */ + public $nexusTaxTypeGroup; + /** + * @var string The nexus type id desired (optional) (See NexusTypeId::* for a list of allowable values) + */ + public $nexusTypeId; + /** + * @var string The local nexus type id desired (optional) (See LocalNexusTypeId::* for a list of allowable values) + */ + public $localNexusTypeId; + /** + * @var boolean Flag indicating whether the response should include inactive nexus entries (optional) + */ + public $showHistorical; + /** + * @var boolean Flag indicating whether to only include SST nexus entries in the response (optional) + */ + public $showSSTOnly; +} /** * Represents a declaration of nexus within a particular taxing jurisdiction. * @@ -11157,6 +11422,25 @@ class RateModel */ public $type; } +/** + * Represents RateType1703 Model + * Swagger Name: AvaTaxClient + */ +class RateType1703Model +{ + /** + * @var int RateTypeIdSK + */ + public $rateTypeIdSK; + /** + * @var string RateTypeId + */ + public $rateTypeId; + /** + * @var string Description + */ + public $description; +} /** * Rate type Model * Swagger Name: AvaTaxClient @@ -11176,6 +11460,29 @@ class RateTypeModel */ public $country; } +/** + * Represents RateTypeTaxTypeMappingModel Model + * Swagger Name: AvaTaxClient + */ +class RateTypeTaxTypeMappingModel +{ + /** + * @var int TaxTypeMappingId + */ + public $rateTypeTaxTypeMappingId; + /** + * @var int TaxTypeMappingId + */ + public $taxTypeMappingId; + /** + * @var int RateTypeIdSK + */ + public $rateTypeIdSK; + /** + * @var string RateTypeId + */ + public $rateTypeId; +} /** * Rate types Model * Swagger Name: AvaTaxClient @@ -12324,6 +12631,18 @@ class TaxRegionModel * @var DenormalizedJurisModel[] List of jurisdictions associated with this tax region. */ public $jurisdictions; + /** + * @var string The date this tax region was created. + */ + public $createDate; + /** + * @var string The date this tax region was modified. + */ + public $modifiedDate; + /** + * @var string Food SER Code + */ + public $foodSERCode; } /** * Represents a tax rule that changes the behavior of Avalara's tax engine for certain products and/or entity use codes @@ -12542,6 +12861,25 @@ class TaxRuleProductDetailModel */ public $systemId; } +/** + * Represents RateTypeTaxTypeMapping Model + * Swagger Name: AvaTaxClient + */ +class TaxSubType1703Model +{ + /** + * @var int TaxSubTypeIdSK + */ + public $taxSubTypeIdSK; + /** + * @var string TaxSubTypeId + */ + public $taxSubTypeId; + /** + * @var string Description + */ + public $description; +} /** * Represents a tax subtype * Swagger Name: AvaTaxClient @@ -12565,6 +12903,25 @@ class TaxSubTypeModel */ public $taxTypeGroup; } +/** + * Represents TaxType1703 Model + * Swagger Name: AvaTaxClient + */ +class TaxType1703Model +{ + /** + * @var int TaxTypeIdSK + */ + public $taxTypeIdSK; + /** + * @var string TaxTypeId + */ + public $taxTypeId; + /** + * @var string Description + */ + public $description; +} /** * Represents a tax type group * Swagger Name: AvaTaxClient @@ -12807,6 +13164,10 @@ class TransactionLineDetailModel * @var int The unique ID number of the exemption reason for this tax detail. */ public $exemptReasonId; + /** + * @var int The rule according to which portion of this detail was considered exempt. + */ + public $exemptRuleId; /** * @var boolean True if this detail element represented an in-state transaction. */ @@ -13548,6 +13909,14 @@ class TransactionModel * @var string Delivery Terms (or Incoterms) refer to agreed-upon conditions between a buyer and a seller for the delivery of goods. They are three-letter trade terms that describe the practical arrangements for the delivery of goods from sellers to buyers and set out the obligations, costs, and risks between the two parties. The DeliveryTerms field determines who acts as the Importer of Record and who arranges the Transport of the goods when this information is not separately sent to AvaTax in the request. When used in conjunction with isSellerImporterOfRecord, this parameter can also influence whether AvaTax includes Import Duty and Tax in the transaction totals. If the fields for transport or isSellerImporterOfRecord are passed in the request and conflict with the DeliveryTerms, the values provided in the first will take priority over the DeliveryTerms parameter. If neither transport nor isSellerImporterOfRecord is passed in the request and DeliveryTerms is passed, AvaTax will determine who acts as Importer of Record and who arranges the Transport of the goods based on the specified DeliveryTerms. If none of these fields is passed, AvaTax will keep the current behavior and default transport to "Seller" for goods and isSellerImporterOfRecord to "False" (i.e., the AvaTax user does not act as Importer of record)." Finally, this field is also used for reports. The Delivery Terms that the user can pass are the following: 1. Ex Works (EXW) 2. Free Carrier (FCA) 3. Carrier and Insurance Paid to (CIP) 4. Carriage Paid To (CPT) 5. Delivered at Place (DAP) 6. Delivered at Place Unloaded (DPU) 7. Delivered Duty Paid (DDP) 8. Free Alongside Ship (FAS) 9. Free on Board (FOB) 10. Cost and Freight (CFR) 11. Cost, Insurance and Freight (CIF) DAP and DDP are two delivery terms that indicate that Import Duty and Tax should be included in the transaction total. (See DeliveryTerms::* for a list of allowable values) */ public $deliveryTerms; + /** + * @var string Users can set tolerance or threshold limits on transactions and inform users of appropriate actions to take if a transaction falls outside of these values. An Accounts Payable (AP) status code indicates the action that needs to be taken when the tolerance/threshold falls above or below the tolerance/threshold limits. Available AP status codes are: 1. PayAsBilledMatch 2. PayAsBilledNoAccrual 3. PayAsBilledAccrueUndercharge 4. ShortPayItemsAccrueUndercharge 5. MarkForReviewUndercharge 6. RejectUndercharge 7. ShortPayItemsAccrueOvercharge 8. MarkForReviewOvercharge 9. RejectOvercharge 10. RejectMatch 11. MarkForReviewMatch 12. ShortPayItemsAccrueMatch 13. PayAsBilledOvercharge 14. ShortPayAvalaraCalculated 15. AmountThresholdNotMet 16. TrustedVendor 17. CostCenterExempted 18. ItemExempted 19. AccruedByVendor (See APStatus::* for a list of allowable values) + */ + public $apStatusCode; + /** + * @var string An Accounts Payable (AP) status indicates an action that needs to be taken when the tolerance amount falls above or below certain threshold limits. Available AP statuses are: 1. Ignored - No variance, pay as billed (PayAsBilledMatch) 2. Ignored - Undercharged, pay as billed (PayAsBilledNoAccrual) 3. Accrued - Pay bill and accrue undercharge variance (PayAsBilledAccrueUndercharge) 4. Accrued - Pay for items and accrue all tax (ShortPayItemsAccrueUndercharge) 5. Needs review - Undercharged (MarkForReviewUndercharge) 6. Ignored - Reject undercharged transaction (RejectUndercharge) 7. Accrued - Pay for items and accrue all tax (ShortPayItemsAccrueOvercharge) 8. Needs review - Overcharged (MarkForReviewOvercharge) 9. Ignored - Reject overcharged transaction (RejectOvercharge) 10. Ignored - No variance, reject transaction (RejectMatch) 11. Needs review - No variance (MarkForReviewMatch) 12. Accrued - No variance, pay for items and accrue all tax (ShortPayItemsAccrueMatch) 13. Ignored - Overcharged, pay as billed (PayAsBilledOvercharge) 14. Ignored - Overcharged, pay Avalara’s calculated tax (ShortPayAvalaraCalculated) 15. Ignored - Amount threshold not met (AmountThresholdNotMet) 16. Ignored - Use trusted vendor’s calculations (TrustedVendor) 17. Ignored - Cost center exempted from tax (CostCenterExempted) 18. Ignored - Item exempted from tax (ItemExempted) 19. Accrued - Accrued by Vendor (AccruedByVendor) + */ + public $apStatus; } /** * Represents a transaction parameter. @@ -13754,6 +14123,10 @@ class UnitOfBasisModel * @var string UnitOfBasis Name */ public $unitOfBasis; + /** + * @var boolean A boolean value based on the current definition of a Fee in AvaTax + */ + public $isFee; } /** * The "Unit of Measurement" model captures information about a type of measurement. Types of measurement refer to @@ -13908,6 +14281,10 @@ class UserModel * @var boolean Suppress new user email */ public $suppressNewUserEmail; + /** + * @var boolean A boolean flag to identify if the user is deleted + */ + public $isDeleted; } /** * Represents a validated address