avatax 20.5.0 → 20.6.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/lib/avatax/client/accounts.rb +116 -83
- data/lib/avatax/client/addresses.rb +26 -20
- data/lib/avatax/client/advancedrules.rb +56 -41
- data/lib/avatax/client/avafileforms.rb +56 -41
- data/lib/avatax/client/batches.rb +125 -48
- data/lib/avatax/client/certexpressinvites.rb +36 -27
- data/lib/avatax/client/certificates.rb +156 -111
- data/lib/avatax/client/companies.rb +166 -118
- data/lib/avatax/client/compliance.rb +16 -13
- data/lib/avatax/client/contacts.rb +66 -48
- data/lib/avatax/client/customers.rb +136 -97
- data/lib/avatax/client/datasources.rb +66 -48
- data/lib/avatax/client/definitions.rb +596 -419
- data/lib/avatax/client/distancethresholds.rb +66 -48
- data/lib/avatax/client/filingcalendars.rb +16 -13
- data/lib/avatax/client/filings.rb +16 -13
- data/lib/avatax/client/firmclientlinkages.rb +96 -69
- data/lib/avatax/client/free.rb +36 -27
- data/lib/avatax/client/fundingrequests.rb +26 -20
- data/lib/avatax/client/items.rb +196 -139
- data/lib/avatax/client/jurisdictionoverrides.rb +66 -48
- data/lib/avatax/client/locations.rb +76 -55
- data/lib/avatax/client/multidocument.rb +106 -76
- data/lib/avatax/client/nexus.rb +82 -183
- data/lib/avatax/client/notifications.rb +36 -27
- data/lib/avatax/client/provisioning.rb +26 -20
- data/lib/avatax/client/registrar.rb +106 -76
- data/lib/avatax/client/reports.rb +46 -34
- data/lib/avatax/client/settings.rb +66 -48
- data/lib/avatax/client/subscriptions.rb +36 -27
- data/lib/avatax/client/taxcodes.rb +66 -48
- data/lib/avatax/client/taxcontent.rb +36 -27
- data/lib/avatax/client/taxrules.rb +66 -48
- data/lib/avatax/client/transactions.rb +216 -153
- data/lib/avatax/client/upcs.rb +66 -48
- data/lib/avatax/client/users.rb +86 -62
- data/lib/avatax/client/utilities.rb +36 -27
- data/lib/avatax/version.rb +1 -1
- metadata +2 -2
data/lib/avatax/client/upcs.rb
CHANGED
@@ -1,54 +1,63 @@
|
|
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<br />*Required* (all): AvaUpc.
|
14
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
15
15
|
# @param companyId [Integer] The ID of the company that owns this UPC.
|
16
16
|
# @param model [UPCModel[]] The UPC you wish to create.
|
17
|
-
# @return [UPCModel[]]
|
18
|
-
def create_u_p_cs(companyId, model)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
# @return [UPCModel[]]
|
18
|
+
def create_u_p_cs(companyId, model)
|
19
|
+
path = "/api/v2/companies/#{companyId}/upcs"
|
20
|
+
post(path, model)
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# Delete a single UPC
|
25
|
+
#
|
23
26
|
# Marks the UPC object identified by this URL as deleted.
|
24
27
|
#
|
25
28
|
# ### Security Policies
|
26
29
|
#
|
27
30
|
# * 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.
|
31
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
29
32
|
# @param companyId [Integer] The ID of the company that owns this UPC.
|
30
33
|
# @param id [Integer] The ID of the UPC you wish to delete.
|
31
|
-
# @return [ErrorDetail[]]
|
32
|
-
def delete_u_p_c(companyId, id)
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
# @return [ErrorDetail[]]
|
35
|
+
def delete_u_p_c(companyId, id)
|
36
|
+
path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
37
|
+
delete(path)
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
# Retrieve a single UPC
|
42
|
+
#
|
37
43
|
# Get the UPC object identified by this URL.
|
38
44
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
39
45
|
#
|
40
46
|
# ### Security Policies
|
41
47
|
#
|
42
48
|
# * 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.
|
49
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
44
50
|
# @param companyId [Integer] The ID of the company that owns this UPC
|
45
51
|
# @param id [Integer] The primary key of this UPC
|
46
|
-
# @return [Object]
|
47
|
-
def get_u_p_c(companyId, id)
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
+
# @return [Object]
|
53
|
+
def get_u_p_c(companyId, id)
|
54
|
+
path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
55
|
+
get(path)
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
# Retrieve UPCs for this company
|
60
|
+
#
|
52
61
|
# List all UPC objects attached to this company.
|
53
62
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
54
63
|
#
|
@@ -58,19 +67,22 @@ module AvaTax
|
|
58
67
|
# ### Security Policies
|
59
68
|
#
|
60
69
|
# * 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.
|
70
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
62
71
|
# @param companyId [Integer] The ID of the company that owns these UPCs
|
63
72
|
# @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
73
|
# @param include [String] A comma separated list of additional data to retrieve.
|
65
74
|
# @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
75
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
67
76
|
# @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={})
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
77
|
+
# @return [FetchResult]
|
78
|
+
def list_u_p_cs_by_company(companyId, options={})
|
79
|
+
path = "/api/v2/companies/#{companyId}/upcs"
|
80
|
+
get(path, options)
|
81
|
+
end
|
82
|
+
|
83
|
+
|
84
|
+
# Retrieve all UPCs
|
85
|
+
#
|
74
86
|
# Get multiple UPC objects across all companies.
|
75
87
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
76
88
|
#
|
@@ -80,18 +92,21 @@ module AvaTax
|
|
80
92
|
# ### Security Policies
|
81
93
|
#
|
82
94
|
# * 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.
|
95
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
84
96
|
# @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
97
|
# @param include [String] A comma separated list of additional data to retrieve.
|
86
98
|
# @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
99
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
88
100
|
# @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={})
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
101
|
+
# @return [FetchResult]
|
102
|
+
def query_u_p_cs(options={})
|
103
|
+
path = "/api/v2/upcs"
|
104
|
+
get(path, options)
|
105
|
+
end
|
106
|
+
|
107
|
+
|
108
|
+
# Update a single UPC
|
109
|
+
#
|
95
110
|
# Replace the existing UPC object at this URL with an updated object.
|
96
111
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
97
112
|
# All data from the existing object will be replaced with data in the object you PUT.
|
@@ -100,13 +115,16 @@ module AvaTax
|
|
100
115
|
# ### Security Policies
|
101
116
|
#
|
102
117
|
# * 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.
|
118
|
+
# * This API depends on the following active services<br />*Required* (all): AvaUpc.
|
104
119
|
# @param companyId [Integer] The ID of the company that this UPC belongs to.
|
105
120
|
# @param id [Integer] The ID of the UPC you wish to update
|
106
121
|
# @param model [Object] The UPC you wish to update.
|
107
|
-
# @return [Object]
|
108
|
-
def update_u_p_c(companyId, id, model)
|
109
|
-
|
110
|
-
|
111
|
-
|
122
|
+
# @return [Object]
|
123
|
+
def update_u_p_c(companyId, id, model)
|
124
|
+
path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
125
|
+
put(path, model)
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
129
|
+
end
|
112
130
|
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,17 @@ 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
19
|
# @param model [Object] An object containing your current password and the new password.
|
20
|
-
# @return [String]
|
21
|
-
def change_password(model)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
20
|
+
# @return [String]
|
21
|
+
def change_password(model)
|
22
|
+
path = "/api/v2/passwords"
|
23
|
+
put(path, model)
|
24
|
+
end
|
25
|
+
|
26
|
+
|
27
|
+
# Create new users
|
28
|
+
#
|
26
29
|
# Create one or more new user objects attached to this account.
|
27
30
|
#
|
28
31
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
@@ -35,15 +38,18 @@ module AvaTax
|
|
35
38
|
#
|
36
39
|
# ### Security Policies
|
37
40
|
#
|
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.
|
41
|
+
# * 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
42
|
# @param accountId [Integer] The unique ID number of the account where these users will be created.
|
40
43
|
# @param model [UserModel[]] The user or array of users you wish to create.
|
41
|
-
# @return [UserModel[]]
|
42
|
-
def create_users(accountId, model)
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
44
|
+
# @return [UserModel[]]
|
45
|
+
def create_users(accountId, model)
|
46
|
+
path = "/api/v2/accounts/#{accountId}/users"
|
47
|
+
post(path, model)
|
48
|
+
end
|
49
|
+
|
50
|
+
|
51
|
+
# Delete a single user
|
52
|
+
#
|
47
53
|
# Mark the user object identified by this URL as deleted.
|
48
54
|
#
|
49
55
|
# This API is available for use by account and company administrators only.
|
@@ -53,15 +59,18 @@ module AvaTax
|
|
53
59
|
#
|
54
60
|
# ### Security Policies
|
55
61
|
#
|
56
|
-
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
|
62
|
+
# * This API requires one of the following user roles: AccountAdmin, CompanyAdmin, Compliance Root User, CSPTester, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TreasuryAdmin.
|
57
63
|
# @param id [Integer] The ID of the user you wish to delete.
|
58
64
|
# @param accountId [Integer] The accountID of the user you wish to delete.
|
59
|
-
# @return [ErrorDetail[]]
|
60
|
-
def delete_user(id, accountId)
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
+
# @return [ErrorDetail[]]
|
66
|
+
def delete_user(id, accountId)
|
67
|
+
path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
68
|
+
delete(path)
|
69
|
+
end
|
70
|
+
|
71
|
+
|
72
|
+
# Retrieve a single user
|
73
|
+
#
|
65
74
|
# Get the user object identified by this URL.
|
66
75
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
67
76
|
#
|
@@ -71,16 +80,19 @@ module AvaTax
|
|
71
80
|
#
|
72
81
|
# ### Security Policies
|
73
82
|
#
|
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.
|
83
|
+
# * 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
84
|
# @param id [Integer] The ID of the user to retrieve.
|
76
85
|
# @param accountId [Integer] The accountID of the user you wish to get.
|
77
86
|
# @param include [String] Optional fetch commands.
|
78
|
-
# @return [Object]
|
79
|
-
def get_user(id, accountId, options={})
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
87
|
+
# @return [Object]
|
88
|
+
def get_user(id, accountId, options={})
|
89
|
+
path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
90
|
+
get(path, options)
|
91
|
+
end
|
92
|
+
|
93
|
+
|
94
|
+
# Retrieve all entitlements for a single user
|
95
|
+
#
|
84
96
|
# Return a list of all entitlements to which this user has rights to access.
|
85
97
|
# 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
98
|
# allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use.
|
@@ -99,15 +111,18 @@ module AvaTax
|
|
99
111
|
#
|
100
112
|
# ### Security Policies
|
101
113
|
#
|
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.
|
114
|
+
# * 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
115
|
# @param id [Integer] The ID of the user to retrieve.
|
104
116
|
# @param accountId [Integer] The accountID of the user you wish to get.
|
105
|
-
# @return [Object]
|
106
|
-
def get_user_entitlements(id, accountId)
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
117
|
+
# @return [Object]
|
118
|
+
def get_user_entitlements(id, accountId)
|
119
|
+
path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
|
120
|
+
get(path)
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
# Retrieve users for this account
|
125
|
+
#
|
111
126
|
# List all user objects attached to this account.
|
112
127
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
113
128
|
#
|
@@ -123,19 +138,22 @@ module AvaTax
|
|
123
138
|
#
|
124
139
|
# ### Security Policies
|
125
140
|
#
|
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.
|
141
|
+
# * 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
142
|
# @param accountId [Integer] The accountID of the user you wish to list.
|
128
143
|
# @param include [String] Optional fetch commands.
|
129
144
|
# @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
145
|
# @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
146
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
132
147
|
# @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={})
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
148
|
+
# @return [FetchResult]
|
149
|
+
def list_users_by_account(accountId, options={})
|
150
|
+
path = "/api/v2/accounts/#{accountId}/users"
|
151
|
+
get(path, options)
|
152
|
+
end
|
153
|
+
|
154
|
+
|
155
|
+
# Retrieve all users
|
156
|
+
#
|
139
157
|
# Get multiple user objects across all accounts.
|
140
158
|
#
|
141
159
|
# 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 +171,21 @@ module AvaTax
|
|
153
171
|
#
|
154
172
|
# ### Security Policies
|
155
173
|
#
|
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.
|
174
|
+
# * 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
175
|
# @param include [String] Optional fetch commands.
|
158
176
|
# @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
177
|
# @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
178
|
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with `$top` to provide pagination for large datasets.
|
161
179
|
# @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={})
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
180
|
+
# @return [FetchResult]
|
181
|
+
def query_users(options={})
|
182
|
+
path = "/api/v2/users"
|
183
|
+
get(path, options)
|
184
|
+
end
|
185
|
+
|
186
|
+
|
187
|
+
# Update a single user
|
188
|
+
#
|
168
189
|
# Replace the existing user object at this URL with an updated object.
|
169
190
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
170
191
|
# All data from the existing object will be replaced with data in the object you PUT.
|
@@ -172,13 +193,16 @@ module AvaTax
|
|
172
193
|
#
|
173
194
|
# ### Security Policies
|
174
195
|
#
|
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.
|
196
|
+
# * 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
197
|
# @param id [Integer] The ID of the user you wish to update.
|
177
198
|
# @param accountId [Integer] The accountID of the user you wish to update.
|
178
199
|
# @param model [Object] The user object you wish to update.
|
179
|
-
# @return [Object]
|
180
|
-
def update_user(id, accountId, model)
|
181
|
-
|
182
|
-
|
183
|
-
|
200
|
+
# @return [Object]
|
201
|
+
def update_user(id, accountId, model)
|
202
|
+
path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
203
|
+
put(path, model)
|
204
|
+
end
|
205
|
+
|
206
|
+
end
|
207
|
+
end
|
184
208
|
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,17 @@ 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
16
|
# @param serviceTypeId [String] The service to check
|
17
|
-
# @return [Object]
|
18
|
-
def get_my_subscription(serviceTypeId)
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
# @return [Object]
|
18
|
+
def get_my_subscription(serviceTypeId)
|
19
|
+
path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
|
20
|
+
get(path)
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# List all services to which the current user is subscribed
|
25
|
+
#
|
23
26
|
# Returns the list of all subscriptions enabled for the currently logged in user.
|
24
27
|
#
|
25
28
|
# This API will return an error if it is called with invalid authentication credentials.
|
@@ -27,13 +30,16 @@ module AvaTax
|
|
27
30
|
# This API is intended to help you determine whether you have the necessary subscription to use certain API calls
|
28
31
|
# within AvaTax. You can examine the subscriptions returned from this API call to look for a particular product
|
29
32
|
# or subscription to provide useful information to the current user as to whether they are entitled to use
|
30
|
-
# specific features of AvaTax.
|
31
|
-
# @return [FetchResult]
|
32
|
-
def list_my_subscriptions()
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
# specific features of AvaTax.
|
34
|
+
# @return [FetchResult]
|
35
|
+
def list_my_subscriptions()
|
36
|
+
path = "/api/v2/utilities/subscriptions"
|
37
|
+
get(path)
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
# Tests connectivity and version of the service
|
42
|
+
#
|
37
43
|
# Check connectivity to AvaTax and return information about the AvaTax API server.
|
38
44
|
#
|
39
45
|
# This API is intended to help you verify that your connection is working. This API will always succeed and will
|
@@ -53,10 +59,13 @@ module AvaTax
|
|
53
59
|
#
|
54
60
|
# ### Security Policies
|
55
61
|
#
|
56
|
-
# * This API may be called without providing authentication credentials.
|
57
|
-
# @return [Object]
|
58
|
-
def ping()
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
+
# * This API may be called without providing authentication credentials.
|
63
|
+
# @return [Object]
|
64
|
+
def ping()
|
65
|
+
path = "/api/v2/utilities/ping"
|
66
|
+
get(path)
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
70
|
+
end
|
62
71
|
end
|