avatax 20.1.0 → 20.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/avatax.gemspec +0 -1
- data/lib/avatax/client/accounts.rb +236 -172
- data/lib/avatax/client/addresses.rb +54 -54
- data/lib/avatax/client/advancedrules.rb +63 -162
- data/lib/avatax/client/avafileforms.rb +78 -78
- data/lib/avatax/client/batches.rb +223 -170
- data/lib/avatax/client/certexpressinvites.rb +97 -97
- data/lib/avatax/client/certificates.rb +424 -424
- data/lib/avatax/client/companies.rb +457 -350
- data/lib/avatax/client/compliance.rb +15 -15
- data/lib/avatax/client/contacts.rb +106 -106
- data/lib/avatax/client/customers.rb +376 -376
- data/lib/avatax/client/datasources.rb +99 -99
- data/lib/avatax/client/definitions.rb +862 -847
- data/lib/avatax/client/distancethresholds.rb +122 -122
- data/lib/avatax/client/ecommercetoken.rb +37 -0
- data/lib/avatax/client/filingcalendars.rb +20 -508
- data/lib/avatax/client/filings.rb +37 -26
- data/lib/avatax/client/firmclientlinkages.rb +123 -123
- data/lib/avatax/client/free.rb +100 -100
- data/lib/avatax/client/fundingrequests.rb +52 -52
- data/lib/avatax/client/items.rb +423 -423
- data/lib/avatax/client/jurisdictionoverrides.rb +118 -118
- data/lib/avatax/client/locations.rb +253 -139
- data/lib/avatax/client/multidocument.rb +390 -310
- data/lib/avatax/client/nexus.rb +341 -201
- data/lib/avatax/client/notifications.rb +75 -75
- data/lib/avatax/client/provisioning.rb +49 -49
- data/lib/avatax/client/registrar.rb +198 -198
- data/lib/avatax/client/reports.rb +97 -97
- data/lib/avatax/client/settings.rb +156 -156
- data/lib/avatax/client/subscriptions.rb +62 -62
- data/lib/avatax/client/taxcodes.rb +120 -120
- data/lib/avatax/client/taxcontent.rb +133 -133
- data/lib/avatax/client/taxrules.rb +170 -170
- data/lib/avatax/client/transactions.rb +836 -791
- data/lib/avatax/client/upcs.rb +111 -111
- data/lib/avatax/client/users.rb +183 -183
- data/lib/avatax/client/utilities.rb +61 -61
- data/lib/avatax/connection.rb +3 -3
- data/lib/avatax/request.rb +2 -0
- data/lib/avatax/version.rb +1 -1
- metadata +4 -17
data/lib/avatax/client/upcs.rb
CHANGED
@@ -1,112 +1,112 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Upcs
|
4
|
-
|
5
|
-
|
6
|
-
# Create a new UPC
|
7
|
-
#
|
8
|
-
# Create one or more new UPC objects attached to this company.
|
9
|
-
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
10
|
-
#
|
11
|
-
# ### Security Policies
|
12
|
-
#
|
13
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
14
|
-
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
15
|
-
# @param companyId [Integer] The ID of the company that owns this UPC.
|
16
|
-
# @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
|
-
#
|
23
|
-
# Marks the UPC object identified by this URL as deleted.
|
24
|
-
#
|
25
|
-
# ### Security Policies
|
26
|
-
#
|
27
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
28
|
-
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
29
|
-
# @param companyId [Integer] The ID of the company that owns this UPC.
|
30
|
-
# @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
|
-
#
|
37
|
-
# Get the UPC object identified by this URL.
|
38
|
-
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
39
|
-
#
|
40
|
-
# ### Security Policies
|
41
|
-
#
|
42
|
-
# * 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<br />*Required* (all): AvaUpc.
|
44
|
-
# @param companyId [Integer] The ID of the company that owns this UPC
|
45
|
-
# @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
|
-
#
|
52
|
-
# List all UPC objects attached to this company.
|
53
|
-
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
54
|
-
#
|
55
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
56
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
57
|
-
#
|
58
|
-
# ### Security Policies
|
59
|
-
#
|
60
|
-
# * 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<br />*Required* (all): AvaUpc.
|
62
|
-
# @param companyId [Integer] The ID of the company that owns these UPCs
|
63
|
-
# @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
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
65
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
67
|
-
# @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
|
-
#
|
74
|
-
# Get multiple UPC objects across all companies.
|
75
|
-
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
76
|
-
#
|
77
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
78
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
79
|
-
#
|
80
|
-
# ### Security Policies
|
81
|
-
#
|
82
|
-
# * 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<br />*Required* (all): AvaUpc.
|
84
|
-
# @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
|
-
# @param include [String] A comma separated list of additional data to retrieve.
|
86
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
88
|
-
# @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
|
-
#
|
95
|
-
# Replace the existing UPC object at this URL with an updated object.
|
96
|
-
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
97
|
-
# All data from the existing object will be replaced with data in the object you PUT.
|
98
|
-
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
99
|
-
#
|
100
|
-
# ### Security Policies
|
101
|
-
#
|
102
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
103
|
-
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
104
|
-
# @param companyId [Integer] The ID of the company that this UPC belongs to.
|
105
|
-
# @param id [Integer] The ID of the UPC you wish to update
|
106
|
-
# @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
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Upcs
|
4
|
+
|
5
|
+
|
6
|
+
# Create a new UPC
|
7
|
+
#
|
8
|
+
# Create one or more new UPC objects attached to this company.
|
9
|
+
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
10
|
+
#
|
11
|
+
# ### Security Policies
|
12
|
+
#
|
13
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
14
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
15
|
+
# @param companyId [Integer] The ID of the company that owns this UPC.
|
16
|
+
# @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
|
+
#
|
23
|
+
# Marks the UPC object identified by this URL as deleted.
|
24
|
+
#
|
25
|
+
# ### Security Policies
|
26
|
+
#
|
27
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
28
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
29
|
+
# @param companyId [Integer] The ID of the company that owns this UPC.
|
30
|
+
# @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
|
+
#
|
37
|
+
# Get the UPC object identified by this URL.
|
38
|
+
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
39
|
+
#
|
40
|
+
# ### Security Policies
|
41
|
+
#
|
42
|
+
# * 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<br />*Required* (all): AvaUpc.
|
44
|
+
# @param companyId [Integer] The ID of the company that owns this UPC
|
45
|
+
# @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
|
+
#
|
52
|
+
# List all UPC objects attached to this company.
|
53
|
+
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
54
|
+
#
|
55
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
56
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
57
|
+
#
|
58
|
+
# ### Security Policies
|
59
|
+
#
|
60
|
+
# * 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<br />*Required* (all): AvaUpc.
|
62
|
+
# @param companyId [Integer] The ID of the company that owns these UPCs
|
63
|
+
# @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
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
65
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
67
|
+
# @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
|
+
#
|
74
|
+
# Get multiple UPC objects across all companies.
|
75
|
+
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
76
|
+
#
|
77
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
78
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
79
|
+
#
|
80
|
+
# ### Security Policies
|
81
|
+
#
|
82
|
+
# * 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<br />*Required* (all): AvaUpc.
|
84
|
+
# @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
|
+
# @param include [String] A comma separated list of additional data to retrieve.
|
86
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
88
|
+
# @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
|
+
#
|
95
|
+
# Replace the existing UPC object at this URL with an updated object.
|
96
|
+
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
97
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
98
|
+
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
99
|
+
#
|
100
|
+
# ### Security Policies
|
101
|
+
#
|
102
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, CSPTester, SSTAdmin, TechnicalSupportAdmin.
|
103
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
104
|
+
# @param companyId [Integer] The ID of the company that this UPC belongs to.
|
105
|
+
# @param id [Integer] The ID of the UPC you wish to update
|
106
|
+
# @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
|
112
112
|
end
|
data/lib/avatax/client/users.rb
CHANGED
@@ -1,184 +1,184 @@
|
|
1
|
-
module AvaTax
|
2
|
-
class Client
|
3
|
-
module Users
|
4
|
-
|
5
|
-
|
6
|
-
# Change Password
|
7
|
-
#
|
8
|
-
# Allows a user to change their password via an API call.
|
9
|
-
#
|
10
|
-
# This API allows an authenticated user to change their password via an API call. This feature is only available
|
11
|
-
# for accounts that do not use SAML integrated password validation.
|
12
|
-
#
|
13
|
-
# This API only allows the currently authenticated user to change their password; it cannot be used to apply to a
|
14
|
-
# different user than the one authenticating the current API call.
|
15
|
-
#
|
16
|
-
# ### Security Policies
|
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.
|
19
|
-
# @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
|
-
#
|
26
|
-
# Create one or more new user objects attached to this account.
|
27
|
-
#
|
28
|
-
# A user represents one person with access privileges to make API calls and work with a specific account.
|
29
|
-
#
|
30
|
-
# Users who are account administrators or company users are permitted to create user records to invite
|
31
|
-
# additional team members to work with AvaTax.
|
32
|
-
#
|
33
|
-
# A newly created user will receive an email inviting them to create their password. This means that you
|
34
|
-
# must provide a valid email address for all user accounts created.
|
35
|
-
#
|
36
|
-
# ### Security Policies
|
37
|
-
#
|
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
|
-
# @param accountId [Integer] The unique ID number of the account where these users will be created.
|
40
|
-
# @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
|
-
#
|
47
|
-
# Mark the user object identified by this URL as deleted.
|
48
|
-
#
|
49
|
-
# This API is available for use by account and company administrators only.
|
50
|
-
#
|
51
|
-
# Account and company administrators may only delete users within the appropriate organizations
|
52
|
-
# they control.
|
53
|
-
#
|
54
|
-
# ### Security Policies
|
55
|
-
#
|
56
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
|
57
|
-
# @param id [Integer] The ID of the user you wish to delete.
|
58
|
-
# @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
|
-
#
|
65
|
-
# Get the user object identified by this URL.
|
66
|
-
# A user represents one person with access privileges to make API calls and work with a specific account.
|
67
|
-
#
|
68
|
-
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
69
|
-
#
|
70
|
-
# * FetchDeleted
|
71
|
-
#
|
72
|
-
# ### Security Policies
|
73
|
-
#
|
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.
|
75
|
-
# @param id [Integer] The ID of the user to retrieve.
|
76
|
-
# @param accountId [Integer] The accountID of the user you wish to get.
|
77
|
-
# @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
|
-
#
|
84
|
-
# Return a list of all entitlements to which this user has rights to access.
|
85
|
-
# 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
|
-
# allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use.
|
87
|
-
# This API call is intended to provide a validation endpoint to determine, before making an API call, whether this call is likely to succeed.
|
88
|
-
# For example, if user 567 within account 999 is attempting to create a new child company underneath company 12345, you could preview the user's
|
89
|
-
# entitlements and predict whether this call would succeed:
|
90
|
-
#
|
91
|
-
# * Retrieve entitlements by calling '/api/v2/accounts/999/users/567/entitlements' . If the call fails, you do not have accurate
|
92
|
-
# credentials for this user.
|
93
|
-
# * If the 'accessLevel' field within entitlements is 'None', the call will fail.
|
94
|
-
# * If the 'accessLevel' field within entitlements is 'SingleCompany' or 'SingleAccount', the call will fail if the companies
|
95
|
-
# table does not contain the ID number 12345.
|
96
|
-
# * If the 'permissions' array within entitlements does not contain 'AccountSvc.CompanySave', the call will fail.
|
97
|
-
#
|
98
|
-
# For a full list of defined permissions, please use '/api/v2/definitions/permissions' .
|
99
|
-
#
|
100
|
-
# ### Security Policies
|
101
|
-
#
|
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.
|
103
|
-
# @param id [Integer] The ID of the user to retrieve.
|
104
|
-
# @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
|
-
#
|
111
|
-
# List all user objects attached to this account.
|
112
|
-
# A user represents one person with access privileges to make API calls and work with a specific account.
|
113
|
-
#
|
114
|
-
# When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key.
|
115
|
-
# By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
|
116
|
-
#
|
117
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
118
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
119
|
-
#
|
120
|
-
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
121
|
-
#
|
122
|
-
# * FetchDeleted
|
123
|
-
#
|
124
|
-
# ### Security Policies
|
125
|
-
#
|
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.
|
127
|
-
# @param accountId [Integer] The accountID of the user you wish to list.
|
128
|
-
# @param include [String] Optional fetch commands.
|
129
|
-
# @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/).
|
130
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
132
|
-
# @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
|
-
# Get multiple user objects across all accounts.
|
140
|
-
#
|
141
|
-
# 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
|
142
|
-
# via either username / password authentication, an OpenID / OAuth Bearer Token, or a legacy AvaTax License Key.
|
143
|
-
#
|
144
|
-
# When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key.
|
145
|
-
# By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
|
146
|
-
#
|
147
|
-
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
148
|
-
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
149
|
-
#
|
150
|
-
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
151
|
-
#
|
152
|
-
# * FetchDeleted
|
153
|
-
#
|
154
|
-
# ### Security Policies
|
155
|
-
#
|
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.
|
157
|
-
# @param include [String] Optional fetch commands.
|
158
|
-
# @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/).
|
159
|
-
# @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
|
-
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
161
|
-
# @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
|
-
#
|
168
|
-
# Replace the existing user object at this URL with an updated object.
|
169
|
-
# A user represents one person with access privileges to make API calls and work with a specific account.
|
170
|
-
# All data from the existing object will be replaced with data in the object you PUT.
|
171
|
-
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
172
|
-
#
|
173
|
-
# ### Security Policies
|
174
|
-
#
|
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.
|
176
|
-
# @param id [Integer] The ID of the user you wish to update.
|
177
|
-
# @param accountId [Integer] The accountID of the user you wish to update.
|
178
|
-
# @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
|
1
|
+
module AvaTax
|
2
|
+
class Client
|
3
|
+
module Users
|
4
|
+
|
5
|
+
|
6
|
+
# Change Password
|
7
|
+
#
|
8
|
+
# Allows a user to change their password via an API call.
|
9
|
+
#
|
10
|
+
# This API allows an authenticated user to change their password via an API call. This feature is only available
|
11
|
+
# for accounts that do not use SAML integrated password validation.
|
12
|
+
#
|
13
|
+
# This API only allows the currently authenticated user to change their password; it cannot be used to apply to a
|
14
|
+
# different user than the one authenticating the current API call.
|
15
|
+
#
|
16
|
+
# ### Security Policies
|
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.
|
19
|
+
# @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
|
+
#
|
26
|
+
# Create one or more new user objects attached to this account.
|
27
|
+
#
|
28
|
+
# A user represents one person with access privileges to make API calls and work with a specific account.
|
29
|
+
#
|
30
|
+
# Users who are account administrators or company users are permitted to create user records to invite
|
31
|
+
# additional team members to work with AvaTax.
|
32
|
+
#
|
33
|
+
# A newly created user will receive an email inviting them to create their password. This means that you
|
34
|
+
# must provide a valid email address for all user accounts created.
|
35
|
+
#
|
36
|
+
# ### Security Policies
|
37
|
+
#
|
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
|
+
# @param accountId [Integer] The unique ID number of the account where these users will be created.
|
40
|
+
# @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
|
+
#
|
47
|
+
# Mark the user object identified by this URL as deleted.
|
48
|
+
#
|
49
|
+
# This API is available for use by account and company administrators only.
|
50
|
+
#
|
51
|
+
# Account and company administrators may only delete users within the appropriate organizations
|
52
|
+
# they control.
|
53
|
+
#
|
54
|
+
# ### Security Policies
|
55
|
+
#
|
56
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
|
57
|
+
# @param id [Integer] The ID of the user you wish to delete.
|
58
|
+
# @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
|
+
#
|
65
|
+
# Get the user object identified by this URL.
|
66
|
+
# A user represents one person with access privileges to make API calls and work with a specific account.
|
67
|
+
#
|
68
|
+
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
69
|
+
#
|
70
|
+
# * FetchDeleted
|
71
|
+
#
|
72
|
+
# ### Security Policies
|
73
|
+
#
|
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.
|
75
|
+
# @param id [Integer] The ID of the user to retrieve.
|
76
|
+
# @param accountId [Integer] The accountID of the user you wish to get.
|
77
|
+
# @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
|
+
#
|
84
|
+
# Return a list of all entitlements to which this user has rights to access.
|
85
|
+
# 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
|
+
# allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use.
|
87
|
+
# This API call is intended to provide a validation endpoint to determine, before making an API call, whether this call is likely to succeed.
|
88
|
+
# For example, if user 567 within account 999 is attempting to create a new child company underneath company 12345, you could preview the user's
|
89
|
+
# entitlements and predict whether this call would succeed:
|
90
|
+
#
|
91
|
+
# * Retrieve entitlements by calling '/api/v2/accounts/999/users/567/entitlements' . If the call fails, you do not have accurate
|
92
|
+
# credentials for this user.
|
93
|
+
# * If the 'accessLevel' field within entitlements is 'None', the call will fail.
|
94
|
+
# * If the 'accessLevel' field within entitlements is 'SingleCompany' or 'SingleAccount', the call will fail if the companies
|
95
|
+
# table does not contain the ID number 12345.
|
96
|
+
# * If the 'permissions' array within entitlements does not contain 'AccountSvc.CompanySave', the call will fail.
|
97
|
+
#
|
98
|
+
# For a full list of defined permissions, please use '/api/v2/definitions/permissions' .
|
99
|
+
#
|
100
|
+
# ### Security Policies
|
101
|
+
#
|
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.
|
103
|
+
# @param id [Integer] The ID of the user to retrieve.
|
104
|
+
# @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
|
+
#
|
111
|
+
# List all user objects attached to this account.
|
112
|
+
# A user represents one person with access privileges to make API calls and work with a specific account.
|
113
|
+
#
|
114
|
+
# When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key.
|
115
|
+
# By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
|
116
|
+
#
|
117
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
118
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
119
|
+
#
|
120
|
+
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
121
|
+
#
|
122
|
+
# * FetchDeleted
|
123
|
+
#
|
124
|
+
# ### Security Policies
|
125
|
+
#
|
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.
|
127
|
+
# @param accountId [Integer] The accountID of the user you wish to list.
|
128
|
+
# @param include [String] Optional fetch commands.
|
129
|
+
# @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/).
|
130
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
132
|
+
# @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
|
+
# Get multiple user objects across all accounts.
|
140
|
+
#
|
141
|
+
# 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
|
142
|
+
# via either username / password authentication, an OpenID / OAuth Bearer Token, or a legacy AvaTax License Key.
|
143
|
+
#
|
144
|
+
# When an API is called using a legacy AvaTax License Key, the API log entry is recorded as being performed by a special user attached to that license key.
|
145
|
+
# By default, this API will not return a listing of license key users. Users with registrar-level security may call this API to list license key users.
|
146
|
+
#
|
147
|
+
# Search for specific objects using the criteria in the `$filter` parameter; full documentation is available on [Filtering in REST](http://developer.avalara.com/avatax/filtering-in-rest/) .
|
148
|
+
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
149
|
+
#
|
150
|
+
# You may specify one or more of the following values in the `$include` parameter to fetch additional nested data, using commas to separate multiple values:
|
151
|
+
#
|
152
|
+
# * FetchDeleted
|
153
|
+
#
|
154
|
+
# ### Security Policies
|
155
|
+
#
|
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.
|
157
|
+
# @param include [String] Optional fetch commands.
|
158
|
+
# @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/).
|
159
|
+
# @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
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
161
|
+
# @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
|
+
#
|
168
|
+
# Replace the existing user object at this URL with an updated object.
|
169
|
+
# A user represents one person with access privileges to make API calls and work with a specific account.
|
170
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
171
|
+
# To set a field's value to null, you may either set its value to null or omit that field from the object you post.
|
172
|
+
#
|
173
|
+
# ### Security Policies
|
174
|
+
#
|
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.
|
176
|
+
# @param id [Integer] The ID of the user you wish to update.
|
177
|
+
# @param accountId [Integer] The accountID of the user you wish to update.
|
178
|
+
# @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
|
184
184
|
end
|