Skip to content

Commit 72a8e02

Browse files
author
svc-developer
committed
25.5.1
1 parent 0459f90 commit 72a8e02

File tree

3 files changed

+183
-24
lines changed

3 files changed

+183
-24
lines changed

src/Constants.php

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
namespace Avalara;
33
use GuzzleHttp\Client;
44

5-
define('AVATAX_SDK_VERSION', '25.3.2');
5+
define('AVATAX_SDK_VERSION', '25.5.1');
66

77
/*****************************************************************************
88
* *
@@ -1209,6 +1209,8 @@ class ErrorCodeId
12091209
const C_INVALIDMEDIATYPE = 4017;
12101210
const C_FILESIZELIMITEXCEEDED = 4018;
12111211
const C_INVALIDIMAGE = 4019;
1212+
const C_IMAGEALREADYLINKED = 4020;
1213+
const C_ITEMIDMISMATCH = 4021;
12121214

12131215
/**
12141216
* Error string from the service unknown
@@ -1458,6 +1460,7 @@ class BatchType
14581460
const C_COSTCENTERIMPORT = 15;
14591461
const C_GLACCOUNTIMPORT = 16;
14601462
const C_ADVANCEDRULESIMPORT = 17;
1463+
const C_ITEMIMPORTV2 = 18;
14611464

14621465
}
14631466

@@ -3776,6 +3779,46 @@ class SecurityRoleId
37763779
* ECMCompanyUser
37773780
*/
37783781
const C_ECMCOMPANYUSER = 27;
3782+
3783+
/**
3784+
* ReturnsOnlyAccountAdmin
3785+
*/
3786+
const C_RETURNSONLYACCOUNTADMIN = 28;
3787+
3788+
/**
3789+
* ReturnsOnlyAccountUser
3790+
*/
3791+
const C_RETURNSONLYACCOUNTUSER = 29;
3792+
3793+
/**
3794+
* ReturnsOnlyCompanyAdmin
3795+
*/
3796+
const C_RETURNSONLYCOMPANYADMIN = 30;
3797+
3798+
/**
3799+
* ReturnsOnlyCompanyUser
3800+
*/
3801+
const C_RETURNSONLYCOMPANYUSER = 31;
3802+
3803+
/**
3804+
* AvaTaxOnlyAccountAdmin
3805+
*/
3806+
const C_AVATAXONLYACCOUNTADMIN = 32;
3807+
3808+
/**
3809+
* AvaTaxOnlyAccountUser
3810+
*/
3811+
const C_AVATAXONLYACCOUNTUSER = 33;
3812+
3813+
/**
3814+
* AvaTaxOnlyCompanyAdmin
3815+
*/
3816+
const C_AVATAXONLYCOMPANYADMIN = 34;
3817+
3818+
/**
3819+
* AvaTaxOnlyCompanyUser
3820+
*/
3821+
const C_AVATAXONLYCOMPANYUSER = 35;
37793822

37803823
}
37813824

src/Methods.php

Lines changed: 51 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,7 @@ public function listMrsCompanies() {
24122412
* Swagger Name: AvaTaxClient
24132413
*
24142414
* @param string $include A comma separated list of objects to fetch underneath this company. Any object with a URL path underneath this company can be fetched by specifying its name.
2415-
* @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/).<br />*Not filterable:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts, parameters, supplierandcustomers
2415+
* @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/).<br />*Not filterable:* IsFein, contacts, items, locations, nexus, settings, taxCodes, taxRules, upcs, nonReportingChildCompanies, exemptCerts, parameters, supplierandcustomers, isAdvSave
24162416
* @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.
24172417
* @param int $skip If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
24182418
* @param string $orderBy A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
@@ -4234,7 +4234,7 @@ public function listFilingFrequencies($filter=null, $top=null, $skip=null, $orde
42344234
*
42354235
* ### Security Policies
42364236
*
4237-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
4237+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
42384238
* Swagger Name: AvaTaxClient
42394239
*
42404240
* @return \stdClass
@@ -4253,7 +4253,7 @@ public function listItemHSCodeClassificationStatus() {
42534253
*
42544254
* ### Security Policies
42554255
*
4256-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
4256+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
42574257
* Swagger Name: AvaTaxClient
42584258
*
42594259
* @return \stdClass
@@ -4272,7 +4272,7 @@ public function listItemsRecommendationsStatus() {
42724272
*
42734273
* ### Security Policies
42744274
*
4275-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
4275+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
42764276
* Swagger Name: AvaTaxClient
42774277
*
42784278
* @return \stdClass
@@ -4949,7 +4949,7 @@ public function listParametersByAccount($accountId, $filter=null, $top=null, $sk
49494949
*
49504950
* ### Security Policies
49514951
*
4952-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
4952+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
49534953
* Swagger Name: AvaTaxClient
49544954
*
49554955
* @param string $companyCode Company code.
@@ -6896,7 +6896,7 @@ public function dismissHSCodeClassificationStatus($companyId, $itemId, $country)
68966896
*
68976897
* ### Security Policies
68986898
*
6899-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
6899+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
69006900
* Swagger Name: AvaTaxClient
69016901
*
69026902
* @param int $companyId The ID of the company for which to retrieve the SLA details.
@@ -6924,7 +6924,7 @@ public function getHSCodeClassificationSLA($companyId) {
69246924
*
69256925
* ### Security Policies
69266926
*
6927-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
6927+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
69286928
* Swagger Name: AvaTaxClient
69296929
*
69306930
* @param int $companyId The ID of the company that owns this item object
@@ -6952,7 +6952,7 @@ public function getItem($companyId, $id, $include=null) {
69526952
*
69536953
* ### Security Policies
69546954
*
6955-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
6955+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
69566956
* Swagger Name: AvaTaxClient
69576957
*
69586958
* @param int $companyId The company id.
@@ -6982,7 +6982,7 @@ public function getItemClassification($companyId, $itemId, $id) {
69826982
*
69836983
* ### Security Policies
69846984
*
6985-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
6985+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
69866986
* Swagger Name: AvaTaxClient
69876987
*
69886988
* @param int $companyId The company id
@@ -7008,7 +7008,7 @@ public function getItemParameter($companyId, $itemId, $id) {
70087008
*
70097009
* ### Security Policies
70107010
*
7011-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7011+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70127012
* Swagger Name: AvaTaxClient
70137013
*
70147014
* @param int $companyId The ID of the company that defined these items
@@ -7034,7 +7034,7 @@ public function getItemTags($companyId, $itemId, $filter=null, $top=null, $skip=
70347034
*
70357035
* ### Security Policies
70367036
*
7037-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7037+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70387038
* Swagger Name: AvaTaxClient
70397039
*
70407040
* @param int $companyId
@@ -7066,7 +7066,7 @@ public function getItemTaxCodeRecommendations($companyId, $itemId) {
70667066
*
70677067
* ### Security Policies
70687068
*
7069-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7069+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
70707070
* Swagger Name: AvaTaxClient
70717071
*
70727072
* @param int $companyId The ID of the company that owns this item object
@@ -7121,7 +7121,7 @@ public function initiateHSCodeClassification($companyId, $model=null) {
71217121
*
71227122
* ### Security Policies
71237123
*
7124-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7124+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
71257125
* Swagger Name: AvaTaxClient
71267126
*
71277127
* @param int $companyId The ID of the company that owns this item object
@@ -7155,7 +7155,7 @@ public function listImportRestrictions($companyId, $itemCode, $countryOfImport,
71557155
*
71567156
* ### Security Policies
71577157
*
7158-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7158+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
71597159
* Swagger Name: AvaTaxClient
71607160
*
71617161
* @param int $companyId The company id.
@@ -7191,7 +7191,7 @@ public function listItemClassifications($companyId, $itemId, $filter=null, $top=
71917191
*
71927192
* ### Security Policies
71937193
*
7194-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7194+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
71957195
* Swagger Name: AvaTaxClient
71967196
*
71977197
* @param int $companyId The company id
@@ -7227,7 +7227,7 @@ public function listItemParameters($companyId, $itemId, $filter=null, $top=null,
72277227
*
72287228
* ### Security Policies
72297229
*
7230-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7230+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72317231
* Swagger Name: AvaTaxClient
72327232
*
72337233
* @param int $companyId The ID of the company that owns this item object.
@@ -7286,7 +7286,7 @@ public function listItemPremiumClassifications($companyId, $itemCode, $filter=nu
72867286
*
72877287
* ### Security Policies
72887288
*
7289-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7289+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
72907290
* Swagger Name: AvaTaxClient
72917291
*
72927292
* @param int $companyId The ID of the company that defined these items
@@ -7321,7 +7321,7 @@ public function listItemsByCompany($companyId, $filter=null, $include=null, $top
73217321
*
73227322
* ### Security Policies
73237323
*
7324-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7324+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
73257325
* Swagger Name: AvaTaxClient
73267326
*
73277327
* @param int $companyId Company Identifier.
@@ -7393,7 +7393,7 @@ public function patchItem($companyId, $id, $model=null) {
73937393
*
73947394
* ### Security Policies
73957395
*
7396-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7396+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
73977397
* Swagger Name: AvaTaxClient
73987398
*
73997399
* @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/).<br />*Not filterable:* taxCode, source, sourceEntityId, itemType, upc, summary, classifications, parameters, tags, properties, itemStatus, taxCodeRecommendationStatus, taxCodeRecommendations, taxCodeDetails, hsCodeClassificationStatus
@@ -7429,7 +7429,7 @@ public function queryItems($filter=null, $include=null, $top=null, $skip=null, $
74297429
*
74307430
* ### Security Policies
74317431
*
7432-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7432+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
74337433
* Swagger Name: AvaTaxClient
74347434
*
74357435
* @param int $companyId The ID of the company that defined these items
@@ -7466,7 +7466,7 @@ public function queryItemsBySystemCode($companyId, $systemCode, $top=null, $skip
74667466
*
74677467
* ### Security Policies
74687468
*
7469-
* * This API requires one of the following user roles: AccountAdmin, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
7469+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, BatchServiceAdmin, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
74707470
* Swagger Name: AvaTaxClient
74717471
*
74727472
* @param int $companyId The ID of the company that defined these items.
@@ -7679,6 +7679,36 @@ public function upsertItemClassifications($companyId, $itemId, $model=null) {
76797679
return $this->restCall($path, 'PUT', $guzzleParams, AVATAX_SDK_VERSION );
76807680
}
76817681

7682+
/**
7683+
* Add/update an item parameter.
7684+
*
7685+
* Add/update an item parameter.
7686+
*
7687+
* Some items can be taxed differently depending on the properties of that item, such as the item grade or by a particular measurement of that item. In AvaTax, these tax-affecting properties are called "parameters".
7688+
*
7689+
* A parameter added to an item will be used by default in tax calculation but will not show on the transaction line referencing the item .
7690+
*
7691+
* A parameter specified on a transaction line will override an item parameter if they share the same parameter name.
7692+
*
7693+
* ### Security Policies
7694+
*
7695+
* * This API requires one of the following user roles: AccountAdmin, AccountOperator, BatchServiceAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
7696+
* Swagger Name: AvaTaxClient
7697+
*
7698+
* @param int $companyId The ID of the company that this item belongs to.
7699+
* @param int $itemId The ID of the item you want to update.
7700+
* @param ItemParameterModel[] $model The item parameter object you want to upsert.
7701+
* @return \stdClass
7702+
*/
7703+
public function upsertItemParameter($companyId, $itemId, $model=null) {
7704+
$path = "/api/v2/companies/{$companyId}/items/{$itemId}/parameters";
7705+
$guzzleParams = [
7706+
'query' => [],
7707+
'body' => json_encode($model)
7708+
];
7709+
return $this->restCall($path, 'PUT', $guzzleParams, AVATAX_SDK_VERSION );
7710+
}
7711+
76827712
/**
76837713
* Create one or more overrides
76847714
*

0 commit comments

Comments
 (0)