avatax 21.7.1 → 21.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avatax/client/accounts.rb +94 -83
- data/lib/avatax/client/addresses.rb +22 -20
- data/lib/avatax/client/advancedrules.rb +46 -41
- data/lib/avatax/client/ageverification.rb +29 -0
- data/lib/avatax/client/avafileforms.rb +46 -41
- data/lib/avatax/client/batches.rb +70 -62
- data/lib/avatax/client/certexpressinvites.rb +30 -27
- data/lib/avatax/client/certificates.rb +126 -111
- data/lib/avatax/client/companies.rb +174 -153
- data/lib/avatax/client/compliance.rb +25 -14
- data/lib/avatax/client/contacts.rb +54 -48
- data/lib/avatax/client/customers.rb +110 -97
- data/lib/avatax/client/datasources.rb +54 -48
- data/lib/avatax/client/definitions.rb +624 -450
- data/lib/avatax/client/distancethresholds.rb +54 -48
- data/lib/avatax/client/ecommercetoken.rb +20 -18
- data/lib/avatax/client/filingcalendars.rb +44 -20
- data/lib/avatax/client/filings.rb +24 -20
- data/lib/avatax/client/firmclientlinkages.rb +78 -69
- data/lib/avatax/client/free.rb +14 -13
- data/lib/avatax/client/fundingrequests.rb +22 -20
- data/lib/avatax/client/items.rb +209 -181
- data/lib/avatax/client/jurisdictionoverrides.rb +54 -48
- data/lib/avatax/client/locations.rb +102 -90
- data/lib/avatax/client/multidocument.rb +86 -76
- data/lib/avatax/client/nexus.rb +148 -105
- data/lib/avatax/client/notices.rb +30 -26
- data/lib/avatax/client/notifications.rb +30 -27
- data/lib/avatax/client/provisioning.rb +22 -20
- data/lib/avatax/client/registrar.rb +94 -83
- data/lib/avatax/client/reports.rb +38 -34
- data/lib/avatax/client/settings.rb +54 -48
- data/lib/avatax/client/shippingverification.rb +66 -0
- data/lib/avatax/client/subscriptions.rb +30 -27
- data/lib/avatax/client/taxcodes.rb +54 -48
- data/lib/avatax/client/taxcontent.rb +46 -41
- data/lib/avatax/client/taxrules.rb +56 -50
- data/lib/avatax/client/transactions.rb +174 -153
- data/lib/avatax/client/upcs.rb +54 -48
- data/lib/avatax/client/userdefinedfields.rb +52 -0
- data/lib/avatax/client/users.rb +70 -62
- data/lib/avatax/client/utilities.rb +30 -27
- data/lib/avatax/client.rb +2 -0
- data/lib/avatax/connection.rb +1 -1
- data/lib/avatax/request.rb +21 -12
- data/lib/avatax/version.rb +1 -1
- metadata +6 -3
data/lib/avatax/client/upcs.rb
CHANGED
@@ -1,54 +1,57 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Upcs
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new UPC
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Upcs
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new UPC
|
7
|
+
#
|
8
8
|
# Create one or more new UPC objects attached to this company.
|
9
9
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
10
10
|
#
|
11
11
|
# ### Security Policies
|
12
12
|
#
|
13
13
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
14
|
-
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
14
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
15
|
+
# Swagger Name: AvaTaxClient
|
15
16
|
# @param companyId [Integer] The ID of the company that owns this UPC.
|
16
17
|
# @param model [UPCModel[]] The UPC you wish to create.
|
17
|
-
# @return [UPCModel[]]
|
18
|
-
def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
|
19
|
-
post(path, model) end
|
20
|
-
|
21
|
-
# Delete a single UPC
|
22
|
-
#
|
18
|
+
# @return [UPCModel[]]
|
19
|
+
def create_u_p_cs(companyId, model) path = "/api/v2/companies/#{companyId}/upcs"
|
20
|
+
post(path, model, {}, "21.12.0") end
|
21
|
+
|
22
|
+
# Delete a single UPC
|
23
|
+
#
|
23
24
|
# Marks the UPC object identified by this URL as deleted.
|
24
25
|
#
|
25
26
|
# ### Security Policies
|
26
27
|
#
|
27
28
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
28
|
-
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
29
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
30
|
+
# Swagger Name: AvaTaxClient
|
29
31
|
# @param companyId [Integer] The ID of the company that owns this UPC.
|
30
32
|
# @param id [Integer] The ID of the UPC you wish to delete.
|
31
|
-
# @return [ErrorDetail[]]
|
32
|
-
def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
33
|
-
delete(path) end
|
34
|
-
|
35
|
-
# Retrieve a single UPC
|
36
|
-
#
|
33
|
+
# @return [ErrorDetail[]]
|
34
|
+
def delete_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
35
|
+
delete(path, {}, "21.12.0") end
|
36
|
+
|
37
|
+
# Retrieve a single UPC
|
38
|
+
#
|
37
39
|
# Get the UPC object identified by this URL.
|
38
40
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
39
41
|
#
|
40
42
|
# ### Security Policies
|
41
43
|
#
|
42
44
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
43
|
-
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
45
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
46
|
+
# Swagger Name: AvaTaxClient
|
44
47
|
# @param companyId [Integer] The ID of the company that owns this UPC
|
45
48
|
# @param id [Integer] The primary key of this UPC
|
46
|
-
# @return [Object]
|
47
|
-
def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
48
|
-
get(path) end
|
49
|
-
|
50
|
-
# Retrieve UPCs for this company
|
51
|
-
#
|
49
|
+
# @return [Object]
|
50
|
+
def get_u_p_c(companyId, id) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
51
|
+
get(path, {}, "21.12.0") end
|
52
|
+
|
53
|
+
# Retrieve UPCs for this company
|
54
|
+
#
|
52
55
|
# List all UPC objects attached to this company.
|
53
56
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
54
57
|
#
|
@@ -58,19 +61,20 @@ module AvaTax
|
|
58
61
|
# ### Security Policies
|
59
62
|
#
|
60
63
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
61
|
-
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
64
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
65
|
+
# Swagger Name: AvaTaxClient
|
62
66
|
# @param companyId [Integer] The ID of the company that owns these UPCs
|
63
67
|
# @param filter [String] 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/).
|
64
68
|
# @param include [String] A comma separated list of additional data to retrieve.
|
65
69
|
# @param top [Integer] 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.
|
66
70
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
67
71
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
68
|
-
# @return [FetchResult]
|
69
|
-
def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
|
70
|
-
get(path, options) end
|
71
|
-
|
72
|
-
# Retrieve all UPCs
|
73
|
-
#
|
72
|
+
# @return [FetchResult]
|
73
|
+
def list_u_p_cs_by_company(companyId, options={}) path = "/api/v2/companies/#{companyId}/upcs"
|
74
|
+
get(path, options, "21.12.0") end
|
75
|
+
|
76
|
+
# Retrieve all UPCs
|
77
|
+
#
|
74
78
|
# Get multiple UPC objects across all companies.
|
75
79
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
76
80
|
#
|
@@ -80,18 +84,19 @@ module AvaTax
|
|
80
84
|
# ### Security Policies
|
81
85
|
#
|
82
86
|
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, CSPAdmin, CSPTester, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
|
83
|
-
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
87
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
88
|
+
# Swagger Name: AvaTaxClient
|
84
89
|
# @param filter [String] 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/).
|
85
90
|
# @param include [String] A comma separated list of additional data to retrieve.
|
86
91
|
# @param top [Integer] 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.
|
87
92
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
88
93
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
89
|
-
# @return [FetchResult]
|
90
|
-
def query_u_p_cs(options={}) path = "/api/v2/upcs"
|
91
|
-
get(path, options) end
|
92
|
-
|
93
|
-
# Update a single UPC
|
94
|
-
#
|
94
|
+
# @return [FetchResult]
|
95
|
+
def query_u_p_cs(options={}) path = "/api/v2/upcs"
|
96
|
+
get(path, options, "21.12.0") end
|
97
|
+
|
98
|
+
# Update a single UPC
|
99
|
+
#
|
95
100
|
# Replace the existing UPC object at this URL with an updated object.
|
96
101
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
97
102
|
# All data from the existing object will be replaced with data in the object you PUT.
|
@@ -100,13 +105,14 @@ module AvaTax
|
|
100
105
|
# ### Security Policies
|
101
106
|
#
|
102
107
|
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
103
|
-
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
108
|
+
# * This API depends on the following active services:*Required* (all): AvaUpc.
|
109
|
+
# Swagger Name: AvaTaxClient
|
104
110
|
# @param companyId [Integer] The ID of the company that this UPC belongs to.
|
105
111
|
# @param id [Integer] The ID of the UPC you wish to update
|
106
112
|
# @param model [Object] The UPC you wish to update.
|
107
|
-
# @return [Object]
|
108
|
-
def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
109
|
-
put(path, model) end
|
110
|
-
end
|
111
|
-
end
|
113
|
+
# @return [Object]
|
114
|
+
def update_u_p_c(companyId, id, model) path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
115
|
+
put(path, model, {}, "21.12.0") end
|
116
|
+
end
|
117
|
+
end
|
112
118
|
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module UserDefinedFields
|
4
|
+
|
5
|
+
|
6
|
+
# Delete a User Defined Field by User Defined Field id for a company.
|
7
|
+
#
|
8
|
+
# Marks the existing user defined field for a company as deleted.
|
9
|
+
#
|
10
|
+
# ### Security Policies
|
11
|
+
#
|
12
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
13
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
14
|
+
# Swagger Name: AvaTaxClient
|
15
|
+
# @param companyId [Integer] The id of the company the User Defined Field belongs to.
|
16
|
+
# @param id [Integer] The id of the User Defined Field you wish to delete.
|
17
|
+
# @return [ErrorDetail[]]
|
18
|
+
def delete_user_defined_field(companyId, id) path = "/api/v2/companies/#{companyId}/userdefinedfields/#{id}"
|
19
|
+
delete(path, {}, "21.12.0") end
|
20
|
+
|
21
|
+
#
|
22
|
+
#
|
23
|
+
# ### Security Policies
|
24
|
+
#
|
25
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
26
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
27
|
+
# Swagger Name: AvaTaxClient
|
28
|
+
# @param companyId [Integer]
|
29
|
+
# @param udfType [String] Document or Line level UDF (See UserDefinedFieldType::* for a list of allowable values)
|
30
|
+
# @param allowDefaults [Boolean] If true this will add defaulted UDFs to the list that are not named yet
|
31
|
+
# @return [FetchResult]
|
32
|
+
def list_user_defined_fields_by_company_id(companyId, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
|
33
|
+
get(path, options, "21.12.0") end
|
34
|
+
|
35
|
+
# Update a User Defined Field identified by id for a company
|
36
|
+
#
|
37
|
+
# Updates a User Defined Field for a company.
|
38
|
+
#
|
39
|
+
# ### Security Policies
|
40
|
+
#
|
41
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin.
|
42
|
+
# * This API depends on the following active services:*Required* (all): AvaTaxPro, BasicReturns.
|
43
|
+
# Swagger Name: AvaTaxClient
|
44
|
+
# @param companyId [Integer] The id of the company the user defined field belongs to.
|
45
|
+
# @param id [Integer]
|
46
|
+
# @param model [Object]
|
47
|
+
# @return [Object]
|
48
|
+
def update_user_defined_field(companyId, model, options={}) path = "/api/v2/companies/#{companyId}/userdefinedfields"
|
49
|
+
post(path, model, options, "21.12.0") end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/avatax/client/users.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Users
|
4
|
-
|
5
|
-
|
6
|
-
# Change Password
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Users
|
4
|
+
|
5
|
+
|
6
|
+
# Change Password
|
7
|
+
#
|
8
8
|
# Allows a user to change their password via an API call.
|
9
9
|
#
|
10
10
|
# This API allows an authenticated user to change their password via an API call. This feature is only available
|
@@ -15,14 +15,15 @@ module AvaTax
|
|
15
15
|
#
|
16
16
|
# ### Security Policies
|
17
17
|
#
|
18
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
18
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
19
|
+
# Swagger Name: AvaTaxClient
|
19
20
|
# @param model [Object] An object containing your current password and the new password.
|
20
|
-
# @return [String]
|
21
|
-
def change_password(model) path = "/api/v2/passwords"
|
22
|
-
put(path, model) end
|
23
|
-
|
24
|
-
# Create new users
|
25
|
-
#
|
21
|
+
# @return [String]
|
22
|
+
def change_password(model) path = "/api/v2/passwords"
|
23
|
+
put(path, model, {}, "21.12.0") end
|
24
|
+
|
25
|
+
# Create new users
|
26
|
+
#
|
26
27
|
# Create one or more new user objects attached to this account.
|
27
28
|
#
|
28
29
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
@@ -35,15 +36,16 @@ module AvaTax
|
|
35
36
|
#
|
36
37
|
# ### Security Policies
|
37
38
|
#
|
38
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
39
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
40
|
+
# Swagger Name: AvaTaxClient
|
39
41
|
# @param accountId [Integer] The unique ID number of the account where these users will be created.
|
40
42
|
# @param model [UserModel[]] The user or array of users you wish to create.
|
41
|
-
# @return [UserModel[]]
|
42
|
-
def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users"
|
43
|
-
post(path, model) end
|
44
|
-
|
45
|
-
# Delete a single user
|
46
|
-
#
|
43
|
+
# @return [UserModel[]]
|
44
|
+
def create_users(accountId, model) path = "/api/v2/accounts/#{accountId}/users"
|
45
|
+
post(path, model, {}, "21.12.0") end
|
46
|
+
|
47
|
+
# Delete a single user
|
48
|
+
#
|
47
49
|
# Mark the user object identified by this URL as deleted.
|
48
50
|
#
|
49
51
|
# This API is available for use by account and company administrators only.
|
@@ -53,15 +55,16 @@ module AvaTax
|
|
53
55
|
#
|
54
56
|
# ### Security Policies
|
55
57
|
#
|
56
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
|
58
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
|
59
|
+
# Swagger Name: AvaTaxClient
|
57
60
|
# @param id [Integer] The ID of the user you wish to delete.
|
58
61
|
# @param accountId [Integer] The accountID of the user you wish to delete.
|
59
|
-
# @return [ErrorDetail[]]
|
60
|
-
def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
61
|
-
delete(path) end
|
62
|
-
|
63
|
-
# Retrieve a single user
|
64
|
-
#
|
62
|
+
# @return [ErrorDetail[]]
|
63
|
+
def delete_user(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
64
|
+
delete(path, {}, "21.12.0") end
|
65
|
+
|
66
|
+
# Retrieve a single user
|
67
|
+
#
|
65
68
|
# Get the user object identified by this URL.
|
66
69
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
67
70
|
#
|
@@ -71,16 +74,17 @@ module AvaTax
|
|
71
74
|
#
|
72
75
|
# ### Security Policies
|
73
76
|
#
|
74
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
77
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
78
|
+
# Swagger Name: AvaTaxClient
|
75
79
|
# @param id [Integer] The ID of the user to retrieve.
|
76
80
|
# @param accountId [Integer] The accountID of the user you wish to get.
|
77
81
|
# @param include [String] Optional fetch commands.
|
78
|
-
# @return [Object]
|
79
|
-
def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
80
|
-
get(path, options) end
|
81
|
-
|
82
|
-
# Retrieve all entitlements for a single user
|
83
|
-
#
|
82
|
+
# @return [Object]
|
83
|
+
def get_user(id, accountId, options={}) path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
84
|
+
get(path, options, "21.12.0") end
|
85
|
+
|
86
|
+
# Retrieve all entitlements for a single user
|
87
|
+
#
|
84
88
|
# Return a list of all entitlements to which this user has rights to access.
|
85
89
|
# Entitlements are a list of specified API calls the user is permitted to make, a list of identifier numbers for companies the user is
|
86
90
|
# allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use.
|
@@ -99,15 +103,16 @@ module AvaTax
|
|
99
103
|
#
|
100
104
|
# ### Security Policies
|
101
105
|
#
|
102
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
106
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
107
|
+
# Swagger Name: AvaTaxClient
|
103
108
|
# @param id [Integer] The ID of the user to retrieve.
|
104
109
|
# @param accountId [Integer] The accountID of the user you wish to get.
|
105
|
-
# @return [Object]
|
106
|
-
def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
|
107
|
-
get(path) end
|
108
|
-
|
109
|
-
# Retrieve users for this account
|
110
|
-
#
|
110
|
+
# @return [Object]
|
111
|
+
def get_user_entitlements(id, accountId) path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
|
112
|
+
get(path, {}, "21.12.0") end
|
113
|
+
|
114
|
+
# Retrieve users for this account
|
115
|
+
#
|
111
116
|
# List all user objects attached to this account.
|
112
117
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
113
118
|
#
|
@@ -123,19 +128,20 @@ module AvaTax
|
|
123
128
|
#
|
124
129
|
# ### Security Policies
|
125
130
|
#
|
126
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
131
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
132
|
+
# Swagger Name: AvaTaxClient
|
127
133
|
# @param accountId [Integer] The accountID of the user you wish to list.
|
128
134
|
# @param include [String] Optional fetch commands.
|
129
135
|
# @param filter [String] 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:* SuppressNewUserEmail
|
130
136
|
# @param top [Integer] 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.
|
131
137
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
132
138
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
133
|
-
# @return [FetchResult]
|
134
|
-
def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users"
|
135
|
-
get(path, options) end
|
136
|
-
|
137
|
-
# Retrieve all users
|
138
|
-
#
|
139
|
+
# @return [FetchResult]
|
140
|
+
def list_users_by_account(accountId, options={}) path = "/api/v2/accounts/#{accountId}/users"
|
141
|
+
get(path, options, "21.12.0") end
|
142
|
+
|
143
|
+
# Retrieve all users
|
144
|
+
#
|
139
145
|
# Get multiple user objects across all accounts.
|
140
146
|
#
|
141
147
|
# A user represents one person or set of credentials with access privileges to make API calls and work with a specific account. A user can be authenticated
|
@@ -153,18 +159,19 @@ module AvaTax
|
|
153
159
|
#
|
154
160
|
# ### Security Policies
|
155
161
|
#
|
156
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
162
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountOperator, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPAdmin, CSPTester, FirmAdmin, FirmUser, ProStoresOperator, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, SystemOperator, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
163
|
+
# Swagger Name: AvaTaxClient
|
157
164
|
# @param include [String] Optional fetch commands.
|
158
165
|
# @param filter [String] 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:* SuppressNewUserEmail
|
159
166
|
# @param top [Integer] 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.
|
160
167
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
161
168
|
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
162
|
-
# @return [FetchResult]
|
163
|
-
def query_users(options={}) path = "/api/v2/users"
|
164
|
-
get(path, options) end
|
165
|
-
|
166
|
-
# Update a single user
|
167
|
-
#
|
169
|
+
# @return [FetchResult]
|
170
|
+
def query_users(options={}) path = "/api/v2/users"
|
171
|
+
get(path, options, "21.12.0") end
|
172
|
+
|
173
|
+
# Update a single user
|
174
|
+
#
|
168
175
|
# Replace the existing user object at this URL with an updated object.
|
169
176
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
170
177
|
# All data from the existing object will be replaced with data in the object you PUT.
|
@@ -172,13 +179,14 @@ module AvaTax
|
|
172
179
|
#
|
173
180
|
# ### Security Policies
|
174
181
|
#
|
175
|
-
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
182
|
+
# * This API requires one of the following user roles: AccountAdmin, AccountUser, CompanyAdmin, CompanyUser, Compliance Root User, ComplianceAdmin, ComplianceUser, CSPTester, FirmAdmin, FirmUser, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser, TreasuryAdmin, TreasuryUser.
|
183
|
+
# Swagger Name: AvaTaxClient
|
176
184
|
# @param id [Integer] The ID of the user you wish to update.
|
177
185
|
# @param accountId [Integer] The accountID of the user you wish to update.
|
178
186
|
# @param model [Object] The user object you wish to update.
|
179
|
-
# @return [Object]
|
180
|
-
def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
181
|
-
put(path, model) end
|
182
|
-
end
|
183
|
-
end
|
187
|
+
# @return [Object]
|
188
|
+
def update_user(id, accountId, model) path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
189
|
+
put(path, model, {}, "21.12.0") end
|
190
|
+
end
|
191
|
+
end
|
184
192
|
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Utilities
|
4
|
-
|
5
|
-
|
6
|
-
# Checks if the current user is subscribed to a specific service
|
7
|
-
#
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Utilities
|
4
|
+
|
5
|
+
|
6
|
+
# Checks if the current user is subscribed to a specific service
|
7
|
+
#
|
8
8
|
# Returns a subscription object for the current account, or 404 Not Found if this subscription is not enabled for this account.
|
9
9
|
#
|
10
10
|
# This API will return an error if it is called with invalid authentication credentials.
|
@@ -12,14 +12,15 @@ module AvaTax
|
|
12
12
|
# This API is intended to help you determine whether you have the necessary subscription to use certain API calls
|
13
13
|
# within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
|
14
14
|
# or subscription to provide useful information to the current user as to whether they are entitled to use
|
15
|
-
# specific features of AvaTax.
|
15
|
+
# specific features of AvaTax.
|
16
|
+
# Swagger Name: AvaTaxClient
|
16
17
|
# @param serviceTypeId [String] The service to check
|
17
|
-
# @return [Object]
|
18
|
-
def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
|
19
|
-
get(path) end
|
20
|
-
|
21
|
-
# List all services to which the current user is subscribed
|
22
|
-
#
|
18
|
+
# @return [Object]
|
19
|
+
def get_my_subscription(serviceTypeId) path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
|
20
|
+
get(path, {}, "21.12.0") end
|
21
|
+
|
22
|
+
# List all services to which the current user is subscribed
|
23
|
+
#
|
23
24
|
# Returns the list of all subscriptions enabled for the currently logged in user.
|
24
25
|
#
|
25
26
|
# This API will return an error if it is called with invalid authentication credentials.
|
@@ -27,13 +28,14 @@ module AvaTax
|
|
27
28
|
# This API is intended to help you determine whether you have the necessary subscription to use certain API calls
|
28
29
|
# within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
|
29
30
|
# or subscription to provide useful information to the current user as to whether they are entitled to use
|
30
|
-
# specific features of AvaTax.
|
31
|
-
#
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
#
|
31
|
+
# specific features of AvaTax.
|
32
|
+
# Swagger Name: AvaTaxClient
|
33
|
+
# @return [FetchResult]
|
34
|
+
def list_my_subscriptions() path = "/api/v2/utilities/subscriptions"
|
35
|
+
get(path, {}, "21.12.0") end
|
36
|
+
|
37
|
+
# Tests connectivity and version of the service
|
38
|
+
#
|
37
39
|
# Check connectivity to AvaTax and return information about the AvaTax API server.
|
38
40
|
#
|
39
41
|
# This API is intended to help you verify that your connection is working. This API will always succeed and will
|
@@ -53,10 +55,11 @@ module AvaTax
|
|
53
55
|
#
|
54
56
|
# ### Security Policies
|
55
57
|
#
|
56
|
-
# * This API may be called without providing authentication credentials.
|
57
|
-
#
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
58
|
+
# * This API may be called without providing authentication credentials.
|
59
|
+
# Swagger Name: AvaTaxClient
|
60
|
+
# @return [Object]
|
61
|
+
def ping() path = "/api/v2/utilities/ping"
|
62
|
+
get(path, {}, "21.12.0") end
|
63
|
+
end
|
64
|
+
end
|
62
65
|
end
|
data/lib/avatax/client.rb
CHANGED
data/lib/avatax/connection.rb
CHANGED
@@ -8,7 +8,7 @@ module AvaTax
|
|
8
8
|
REMOVED_LABEL = '\1[REMOVED]'
|
9
9
|
|
10
10
|
def connection
|
11
|
-
client_id = "#{app_name};#{app_version};RubySdk;#{
|
11
|
+
client_id = "#{app_name};#{app_version};RubySdk;API_VERSION;#{machine_name}"
|
12
12
|
options = {
|
13
13
|
:headers =>
|
14
14
|
{
|
data/lib/avatax/request.rb
CHANGED
@@ -1,32 +1,35 @@
|
|
1
1
|
require 'faraday'
|
2
2
|
require 'json'
|
3
|
+
require "erb"
|
4
|
+
|
3
5
|
|
4
6
|
module AvaTax
|
5
7
|
module Request
|
6
8
|
|
7
|
-
def get(path, options={})
|
8
|
-
request(:get, path, nil, options)
|
9
|
+
def get(path, options={}, apiversion="")
|
10
|
+
request(:get, path, nil, options, apiversion)
|
9
11
|
end
|
10
12
|
|
11
|
-
def post(path, model, options={})
|
12
|
-
request(:post, path, model, options)
|
13
|
+
def post(path, model, options={}, apiversion="")
|
14
|
+
request(:post, path, model, options, apiversion)
|
13
15
|
end
|
14
16
|
|
15
|
-
def put(path, model, options={})
|
16
|
-
request(:put, path, model, options)
|
17
|
+
def put(path, model, options={}, apiversion="")
|
18
|
+
request(:put, path, model, options, apiversion)
|
17
19
|
end
|
18
20
|
|
19
|
-
def delete(path, options={})
|
20
|
-
request(:delete, path, nil, options)
|
21
|
+
def delete(path, options={}, apiversion="")
|
22
|
+
request(:delete, path, nil, options, apiversion)
|
21
23
|
end
|
22
24
|
|
23
|
-
def request(method, path, model, options={})
|
25
|
+
def request(method, path, model, options={}, apiversion="")
|
24
26
|
response = connection.send(method) do |request|
|
27
|
+
request.headers['X-Avalara-Client'] = request.headers['X-Avalara-Client'].gsub("API_VERSION", apiversion)
|
25
28
|
case method
|
26
29
|
when :get, :delete
|
27
|
-
request.url("#{
|
30
|
+
request.url("#{encode_path(path)}?#{URI.encode_www_form(options)}")
|
28
31
|
when :post, :put
|
29
|
-
request.url("#{
|
32
|
+
request.url("#{encode_path(path)}?#{URI.encode_www_form(options)}")
|
30
33
|
request.headers['Content-Type'] = 'application/json'
|
31
34
|
request.body = model.to_json unless model.empty?
|
32
35
|
end
|
@@ -38,5 +41,11 @@ module AvaTax
|
|
38
41
|
response.body
|
39
42
|
end
|
40
43
|
end
|
44
|
+
|
45
|
+
private
|
46
|
+
|
47
|
+
def encode_path(path)
|
48
|
+
path.split('/').map { |part| ERB::Util.url_encode(part) }.join('/')
|
49
|
+
end
|
41
50
|
end
|
42
|
-
end
|
51
|
+
end
|
data/lib/avatax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 21.
|
4
|
+
version: 21.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcus Vorwaller
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -121,6 +121,7 @@ files:
|
|
121
121
|
- lib/avatax/client/accounts.rb
|
122
122
|
- lib/avatax/client/addresses.rb
|
123
123
|
- lib/avatax/client/advancedrules.rb
|
124
|
+
- lib/avatax/client/ageverification.rb
|
124
125
|
- lib/avatax/client/avafileforms.rb
|
125
126
|
- lib/avatax/client/batches.rb
|
126
127
|
- lib/avatax/client/certexpressinvites.rb
|
@@ -153,6 +154,7 @@ files:
|
|
153
154
|
- lib/avatax/client/registrar.rb
|
154
155
|
- lib/avatax/client/reports.rb
|
155
156
|
- lib/avatax/client/settings.rb
|
157
|
+
- lib/avatax/client/shippingverification.rb
|
156
158
|
- lib/avatax/client/subscriptions.rb
|
157
159
|
- lib/avatax/client/taxContent/README.txt
|
158
160
|
- lib/avatax/client/taxRatesByZip/README.txt
|
@@ -162,6 +164,7 @@ files:
|
|
162
164
|
- lib/avatax/client/taxrules.rb
|
163
165
|
- lib/avatax/client/transactions.rb
|
164
166
|
- lib/avatax/client/upcs.rb
|
167
|
+
- lib/avatax/client/userdefinedfields.rb
|
165
168
|
- lib/avatax/client/users.rb
|
166
169
|
- lib/avatax/client/utilities.rb
|
167
170
|
- lib/avatax/configuration.rb
|
@@ -206,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
206
209
|
- !ruby/object:Gem::Version
|
207
210
|
version: 2.0.0
|
208
211
|
requirements: []
|
209
|
-
rubygems_version: 3.
|
212
|
+
rubygems_version: 3.0.3
|
210
213
|
signing_key:
|
211
214
|
specification_version: 4
|
212
215
|
summary: Ruby wrapper for the AvaTax API
|