avatax 17.5.0 → 17.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/README.md +2 -1
- data/lib/avatax/client/accounts.rb +29 -39
- data/lib/avatax/client/addresses.rb +21 -25
- data/lib/avatax/client/batches.rb +33 -45
- data/lib/avatax/client/companies.rb +101 -72
- data/lib/avatax/client/contacts.rb +35 -47
- data/lib/avatax/client/definitions.rb +176 -218
- data/lib/avatax/client/filingcalendars.rb +172 -200
- data/lib/avatax/client/filings.rb +170 -194
- data/lib/avatax/client/free.rb +43 -41
- data/lib/avatax/client/fundingrequests.rb +11 -15
- data/lib/avatax/client/items.rb +36 -48
- data/lib/avatax/client/jurisdictionoverrides.rb +38 -50
- data/lib/avatax/client/locations.rb +39 -76
- data/lib/avatax/client/nexus.rb +43 -57
- data/lib/avatax/client/notices.rb +111 -111
- data/lib/avatax/client/onboarding.rb +3 -5
- data/lib/avatax/client/pointofsale.rb +3 -5
- data/lib/avatax/client/registrar.rb +60 -82
- data/lib/avatax/client/settings.rb +40 -52
- data/lib/avatax/client/subscriptions.rb +19 -25
- data/lib/avatax/client/taxcodes.rb +35 -47
- data/lib/avatax/client/taxcontent.rb +54 -0
- data/lib/avatax/client/taxrules.rb +35 -47
- data/lib/avatax/client/transactions.rb +141 -179
- data/lib/avatax/client/upcs.rb +35 -47
- data/lib/avatax/client/users.rb +36 -46
- data/lib/avatax/client/utilities.rb +8 -14
- data/lib/avatax/version.rb +1 -1
- metadata +3 -2
data/lib/avatax/client/upcs.rb
CHANGED
@@ -4,106 +4,94 @@ module AvaTax
|
|
4
4
|
|
5
5
|
|
6
6
|
# Create a new UPC
|
7
|
-
#
|
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
|
-
#
|
11
|
-
# @param
|
12
|
-
# @
|
13
|
-
# @return UPCModel[]
|
10
|
+
# @param companyId [Integer] The ID of the company that owns this UPC.
|
11
|
+
# @param model [object[]] The UPC you wish to create.
|
12
|
+
# @return [object[]]
|
14
13
|
def create_u_p_cs(companyId, model)
|
15
14
|
path = "/api/v2/companies/#{companyId}/upcs"
|
16
|
-
|
17
15
|
post(path, model)
|
18
16
|
end
|
19
17
|
|
20
18
|
|
21
19
|
# Delete a single UPC
|
22
|
-
#
|
20
|
+
#
|
23
21
|
# Marks the UPC object identified by this URL as deleted.
|
24
|
-
#
|
25
|
-
# @param
|
26
|
-
# @
|
27
|
-
# @return ErrorDetail[]
|
22
|
+
# @param companyId [Integer] The ID of the company that owns this UPC.
|
23
|
+
# @param id [Integer] The ID of the UPC you wish to delete.
|
24
|
+
# @return [object[]]
|
28
25
|
def delete_u_p_c(companyId, id)
|
29
26
|
path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
30
|
-
|
31
27
|
delete(path)
|
32
28
|
end
|
33
29
|
|
34
30
|
|
35
31
|
# Retrieve a single UPC
|
36
|
-
#
|
32
|
+
#
|
37
33
|
# Get the UPC object identified by this URL.
|
38
34
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
39
|
-
#
|
40
|
-
# @param
|
41
|
-
# @
|
42
|
-
# @return UPCModel
|
35
|
+
# @param companyId [Integer] The ID of the company that owns this UPC
|
36
|
+
# @param id [Integer] The primary key of this UPC
|
37
|
+
# @return [Object]
|
43
38
|
def get_u_p_c(companyId, id)
|
44
39
|
path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
45
|
-
|
46
40
|
get(path)
|
47
41
|
end
|
48
42
|
|
49
43
|
|
50
44
|
# Retrieve UPCs for this company
|
51
|
-
#
|
45
|
+
#
|
52
46
|
# List all UPC objects attached to this company.
|
53
47
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
54
|
-
#
|
48
|
+
#
|
55
49
|
# 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
50
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
57
|
-
#
|
58
|
-
# @param
|
59
|
-
# @param
|
60
|
-
# @param
|
61
|
-
# @param
|
62
|
-
# @param
|
63
|
-
# @
|
64
|
-
# @return FetchResult
|
51
|
+
# @param companyId [Integer] The ID of the company that owns these UPCs
|
52
|
+
# @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/) .
|
53
|
+
# @param include [String] A comma separated list of child objects to return underneath the primary object.
|
54
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
55
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
56
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
57
|
+
# @return [FetchResult]
|
65
58
|
def list_u_p_cs_by_company(companyId, options={})
|
66
59
|
path = "/api/v2/companies/#{companyId}/upcs"
|
67
|
-
|
68
60
|
get(path, options)
|
69
61
|
end
|
70
62
|
|
71
63
|
|
72
64
|
# Retrieve all UPCs
|
73
|
-
#
|
65
|
+
#
|
74
66
|
# Get multiple UPC objects across all companies.
|
75
67
|
# A UPC represents a single UPC code in your catalog and matches this product to the tax code identified by this UPC.
|
76
|
-
#
|
68
|
+
#
|
77
69
|
# 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
70
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
79
|
-
#
|
80
|
-
# @param
|
81
|
-
# @param
|
82
|
-
# @param
|
83
|
-
# @param
|
84
|
-
# @
|
85
|
-
# @return FetchResult
|
71
|
+
# @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/) .
|
72
|
+
# @param include [String] A comma separated list of child objects to return underneath the primary object.
|
73
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
74
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
75
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
76
|
+
# @return [FetchResult]
|
86
77
|
def query_u_p_cs(options={})
|
87
78
|
path = "/api/v2/upcs"
|
88
|
-
|
89
79
|
get(path, options)
|
90
80
|
end
|
91
81
|
|
92
82
|
|
93
83
|
# Update a single UPC
|
94
|
-
#
|
84
|
+
#
|
95
85
|
# Replace the existing UPC object at this URL with an updated object.
|
96
86
|
# 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.
|
87
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
98
88
|
# 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
|
-
# @param
|
101
|
-
# @param
|
102
|
-
# @
|
103
|
-
# @return UPCModel
|
89
|
+
# @param companyId [Integer] The ID of the company that this UPC belongs to.
|
90
|
+
# @param id [Integer] The ID of the UPC you wish to update
|
91
|
+
# @param model [Object] The UPC you wish to update.
|
92
|
+
# @return [Object]
|
104
93
|
def update_u_p_c(companyId, id, model)
|
105
94
|
path = "/api/v2/companies/#{companyId}/upcs/#{id}"
|
106
|
-
|
107
95
|
put(path, model)
|
108
96
|
end
|
109
97
|
|
data/lib/avatax/client/users.rb
CHANGED
@@ -4,106 +4,96 @@ module AvaTax
|
|
4
4
|
|
5
5
|
|
6
6
|
# Retrieve a single user
|
7
|
-
#
|
7
|
+
#
|
8
8
|
# Get the user object identified by this URL.
|
9
9
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
10
|
-
#
|
11
|
-
# @param
|
12
|
-
# @param
|
13
|
-
# @
|
14
|
-
# @return UserModel
|
10
|
+
# @param id [Integer] The ID of the user to retrieve.
|
11
|
+
# @param accountId [Integer] The accountID of the user you wish to get.
|
12
|
+
# @param include [String] A comma separated list of child objects to return underneath the primary object.
|
13
|
+
# @return [Object]
|
15
14
|
def get_user(id, accountId, options={})
|
16
15
|
path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
17
|
-
|
18
16
|
get(path, options)
|
19
17
|
end
|
20
18
|
|
21
19
|
|
22
20
|
# Retrieve all entitlements for a single user
|
23
|
-
#
|
21
|
+
#
|
24
22
|
# Return a list of all entitlements to which this user has rights to access.
|
25
|
-
# Entitlements are a list of specified API calls the user is permitted to make, a list of identifier numbers for companies the user is
|
23
|
+
# Entitlements are a list of specified API calls the user is permitted to make, a list of identifier numbers for companies the user is
|
26
24
|
# allowed to use, and an access level identifier that indicates what types of access roles the user is allowed to use.
|
27
25
|
# This API call is intended to provide a validation endpoint to determine, before making an API call, whether this call is likely to succeed.
|
28
26
|
# 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
|
29
27
|
# entitlements and predict whether this call would succeed:
|
30
|
-
#
|
31
|
-
# * Retrieve entitlements by calling '/api/v2/accounts/999/users/567/entitlements' . If the call fails, you do not have accurate
|
28
|
+
#
|
29
|
+
# * Retrieve entitlements by calling '/api/v2/accounts/999/users/567/entitlements' . If the call fails, you do not have accurate
|
32
30
|
# credentials for this user.
|
33
31
|
# * If the 'accessLevel' field within entitlements is 'None', the call will fail.
|
34
32
|
# * If the 'accessLevel' field within entitlements is 'SingleCompany' or 'SingleAccount', the call will fail if the companies
|
35
33
|
# table does not contain the ID number 12345.
|
36
34
|
# * If the 'permissions' array within entitlements does not contain 'AccountSvc.CompanySave', the call will fail.
|
37
|
-
#
|
35
|
+
#
|
38
36
|
# For a full list of defined permissions, please use '/api/v2/definitions/permissions' .
|
39
|
-
#
|
40
|
-
# @param
|
41
|
-
# @
|
42
|
-
# @return UserEntitlementModel
|
37
|
+
# @param id [Integer] The ID of the user to retrieve.
|
38
|
+
# @param accountId [Integer] The accountID of the user you wish to get.
|
39
|
+
# @return [Object]
|
43
40
|
def get_user_entitlements(id, accountId)
|
44
41
|
path = "/api/v2/accounts/#{accountId}/users/#{id}/entitlements"
|
45
|
-
|
46
42
|
get(path)
|
47
43
|
end
|
48
44
|
|
49
45
|
|
50
46
|
# Retrieve users for this account
|
51
|
-
#
|
47
|
+
#
|
52
48
|
# List all user objects attached to this account.
|
53
49
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
54
|
-
#
|
50
|
+
#
|
55
51
|
# 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
52
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
57
|
-
#
|
58
|
-
# @param
|
59
|
-
# @param
|
60
|
-
# @param
|
61
|
-
# @param
|
62
|
-
# @param
|
63
|
-
# @
|
64
|
-
# @return FetchResult
|
53
|
+
# @param accountId [Integer] The accountID of the user you wish to list.
|
54
|
+
# @param include [String] A comma separated list of child objects to return underneath the primary object.
|
55
|
+
# @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/) .
|
56
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
57
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
58
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
59
|
+
# @return [FetchResult]
|
65
60
|
def list_users_by_account(accountId, options={})
|
66
61
|
path = "/api/v2/accounts/#{accountId}/users"
|
67
|
-
|
68
62
|
get(path, options)
|
69
63
|
end
|
70
64
|
|
71
65
|
|
72
66
|
# Retrieve all users
|
73
|
-
#
|
67
|
+
#
|
74
68
|
# Get multiple user objects across all accounts.
|
75
69
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
76
|
-
#
|
70
|
+
#
|
77
71
|
# 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
72
|
# Paginate your results using the `$top`, `$skip`, and `$orderby` parameters.
|
79
|
-
#
|
80
|
-
# @param
|
81
|
-
# @param
|
82
|
-
# @param
|
83
|
-
# @param
|
84
|
-
# @
|
85
|
-
# @return FetchResult
|
73
|
+
# @param include [String] A comma separated list of child objects to return underneath the primary object.
|
74
|
+
# @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/) .
|
75
|
+
# @param top [Integer] If nonzero, return no more than this number of results. Used with $skip to provide pagination for large datasets.
|
76
|
+
# @param skip [Integer] If nonzero, skip this number of results before returning data. Used with $top to provide pagination for large datasets.
|
77
|
+
# @param orderBy [String] A comma separated list of sort statements in the format `(fieldname) [ASC|DESC]`, for example `id ASC`.
|
78
|
+
# @return [FetchResult]
|
86
79
|
def query_users(options={})
|
87
80
|
path = "/api/v2/users"
|
88
|
-
|
89
81
|
get(path, options)
|
90
82
|
end
|
91
83
|
|
92
84
|
|
93
85
|
# Update a single user
|
94
|
-
#
|
86
|
+
#
|
95
87
|
# Replace the existing user object at this URL with an updated object.
|
96
88
|
# A user represents one person with access privileges to make API calls and work with a specific account.
|
97
|
-
# All data from the existing object will be replaced with data in the object you PUT.
|
89
|
+
# All data from the existing object will be replaced with data in the object you PUT.
|
98
90
|
# 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
|
-
# @param
|
101
|
-
# @param
|
102
|
-
# @
|
103
|
-
# @return UserModel
|
91
|
+
# @param id [Integer] The ID of the user you wish to update.
|
92
|
+
# @param accountId [Integer] The accountID of the user you wish to update.
|
93
|
+
# @param model [Object] The user object you wish to update.
|
94
|
+
# @return [Object]
|
104
95
|
def update_user(id, accountId, model)
|
105
96
|
path = "/api/v2/accounts/#{accountId}/users/#{id}"
|
106
|
-
|
107
97
|
put(path, model)
|
108
98
|
end
|
109
99
|
|
@@ -4,46 +4,40 @@ module AvaTax
|
|
4
4
|
|
5
5
|
|
6
6
|
# Checks if the current user is subscribed to a specific service
|
7
|
-
#
|
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
|
# This API call is intended to allow you to identify whether you have the necessary account configuration to access certain
|
10
10
|
# features of AvaTax, and would be useful in debugging access privilege problems.
|
11
|
-
#
|
12
|
-
# @
|
13
|
-
# @return SubscriptionModel
|
11
|
+
# @param serviceTypeId [String] The service to check (See ServiceTypeId::* for a list of allowable values)
|
12
|
+
# @return [Object]
|
14
13
|
def get_my_subscription(serviceTypeId)
|
15
14
|
path = "/api/v2/utilities/subscriptions/#{serviceTypeId}"
|
16
|
-
|
17
15
|
get(path)
|
18
16
|
end
|
19
17
|
|
20
18
|
|
21
19
|
# List all services to which the current user is subscribed
|
22
|
-
#
|
20
|
+
#
|
23
21
|
# Returns the list of all subscriptions enabled for the current account.
|
24
22
|
# This API is intended to help you determine whether you have the necessary subscription to use certain API calls
|
25
23
|
# within AvaTax.
|
26
|
-
#
|
27
|
-
# @return FetchResult
|
24
|
+
# @return [FetchResult]
|
28
25
|
def list_my_subscriptions()
|
29
26
|
path = "/api/v2/utilities/subscriptions"
|
30
|
-
|
31
27
|
get(path)
|
32
28
|
end
|
33
29
|
|
34
30
|
|
35
31
|
# Tests connectivity and version of the service
|
36
|
-
#
|
37
|
-
# This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
|
32
|
+
#
|
33
|
+
# This API helps diagnose connectivity problems between your application and AvaTax; you may call this API even
|
38
34
|
# if you do not have verified connection credentials.
|
39
35
|
# The results of this API call will help you determine whether your computer can contact AvaTax via the network,
|
40
36
|
# whether your authentication credentials are recognized, and the roundtrip time it takes to communicate with
|
41
37
|
# AvaTax.
|
42
|
-
#
|
43
|
-
# @return PingResultModel
|
38
|
+
# @return [Object]
|
44
39
|
def ping()
|
45
40
|
path = "/api/v2/utilities/ping"
|
46
|
-
|
47
41
|
get(path)
|
48
42
|
end
|
49
43
|
|
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: 17.
|
4
|
+
version: 17.6.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: 2017-06-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -150,6 +150,7 @@ files:
|
|
150
150
|
- lib/avatax/client/settings.rb
|
151
151
|
- lib/avatax/client/subscriptions.rb
|
152
152
|
- lib/avatax/client/taxcodes.rb
|
153
|
+
- lib/avatax/client/taxcontent.rb
|
153
154
|
- lib/avatax/client/taxrules.rb
|
154
155
|
- lib/avatax/client/transactions.rb
|
155
156
|
- lib/avatax/client/upcs.rb
|